Hello all, i am receiving this message only when i am loged in as a user, when i view the page as a visitor there is no error. this is the code in the file, if someone know what the problem coul be please tell me. thanx
<?php
include("admin/config.php");
$ipgf=99;
include("admin/$languagefile");
include("functions.php");
if (isset($_GET['open'])) include("functions_pcode.php");
include("auth.php");
//Title
session_start();
$_SESSION['titlu_pagina'] = "Cabinete medicale, servicii medicale, farmacii";
if (isset($_GET['oi']))
{
$id_categorie=(int)$_GET['oi'];
$sql_111 = "SELECT `descr` FROM dj_items WHERE id={$id_categorie};";
$res_111 = mysql_query($sql_111);
$_SESSION['titlu_pagina'] = mysql_result($res_111, 0, 'descr');
}
//End of title
include($skindir."/layout.php");
session_register("dev_cart");
$mdl=7;
dump_begin();
load_tpl();
// Start content -----------------------------------------------------------------
if (isset($_GET['oi'])) $oi=(int)$_GET['oi'];
if (isset($_GET['ai'])) $ai=(int)$_GET['ai'];
$st=(int)$_GET['st'];
list($myai,$myoi,$mytab)=explode(';',$u_profile);
techo (dump_button("myreg.php","b_editeaza.gif"),"b_editeaza");
techo (dump_button("items_add.php","b_inscriere.gif"),"b_inscriere");
// cats view
if (!isset($oi)) {
thide ('items'); thide ('item');
$data=mysql_query("SELECT * FROM $dj_items ORDER BY title");
while ($x=mysql_fetch_array($data)) {
if ($x['catpic']) secho ($x['catpic'],'catpic','r0');
techo ($x['title'],'title','r0');
techo ("items.php?oi={$x['id']}", 'link','r0');
techo ($x['total'],'total','r0');
tclose ('r0');
}
dump_header('FURNIZORI');
}
// items view
if ((isset($oi))&&(!isset($ai))) {
thide ('cats'); thide ('item');
$c=mysql_fetch_array(dbquery("SELECT * FROM $dj_items WHERE id=$oi LIMIT 0,1"));
dump_header("<a href=\"items.php\" class=\"head\">SERVICII MEDICALE</a> > {$c['title']}");
techo (dump_banner('furnizori',0),'banner');
// filter
$tmp1=explode(';',$c['field_names']);
$tmp2=explode(';',$c['field_types']);
$tmp3=explode(';',$c['field_attr']);
$tmp4=explode(';',$c['field_filter']);
$filters=0; $pagequery=''; $query='';
for ($i=0; $i<count($tmp1); $i++) {
if ($tmp4[$i]) {
techo ($tmp1[$i],'title','r3');
switch ($tmp2[$i]) {
case 'multiple select':
case 'select':
secho (tablename($tmp1[$i]),'fselect','r3');
$tmp5=explode('~',$tmp3[$i]);
for ($j=0; $j<count($tmp5); $j++) {
techo (base64_encode($tmp5[$j]),'value','r3.r4');
techo ($tmp5[$j],'label','r3.r4');
if (base64_encode($tmp5[$j])==$_GET[tablename($tmp1[$i])]) techo (' selected','selected','r3.r4');
tclose ('r3.r4');
}
if ($tmp2[$i]=='multiple select') {
if (($_GET[tablename($tmp1[$i])]!=-1)&&(isset($_GET[tablename($tmp1[$i])]))) {
$pagequery.=tablename($tmp1[$i]).'='.$_GET[tablename($tmp1[$i])].'&';
$query.=tablename($tmp1[$i]).' LIKE \'%~'.dbcleanup(base64_decode($_GET[tablename($tmp1[$i])])).'~%\' AND ';
}} else {
if (($_GET[tablename($tmp1[$i])]!=-1)&&(isset($_GET[tablename($tmp1[$i])]))) {
$pagequery.=tablename($tmp1[$i]).'='.$_GET[tablename($tmp1[$i])].'&';
$query.=tablename($tmp1[$i]).'=\''.dbcleanup(base64_decode($_GET[tablename($tmp1[$i])])).'\' AND ';
}
}
break;
case 'numeric':
for ($j=0; $j<=3; $j++) {
techo ($j,'value','r3.r5');
techo ($l_fnum[$j],'label','r3.r5');
if (($j==$_GET[tablename($tmp1[$i]).'_sign'])&&(isset($_GET[tablename($tmp1[$i]).'_sign']))) techo (' selected','selected','r3.r5');
tclose ('r3.r5');
}
techo ((int)$_GET[tablename($tmp1[$i])],'value','r3');
techo ((int)$_GET[tablename($tmp1[$i]).'_v2'],'value_v2','r3');
secho (tablename($tmp1[$i]),'fnumeric','r3');
techo ($i,'count','r3');
if ($_GET[tablename($tmp1[$i]).'_sign']==3) secho ('','display','r3');
if (($_GET[tablename($tmp1[$i]).'_sign']!=-1)&&(isset($_GET[tablename($tmp1[$i]).'_sign']))) {
$pagequery.=tablename($tmp1[$i]).'='.(int)$_GET[tablename($tmp1[$i])].'&'.tablename($tmp1[$i]).'_sign='.$_GET[tablename($tmp1[$i]).'_sign'].'&';
if ((int)$_GET[tablename($tmp1[$i]).'_v2']) $pagequery.=tablename($tmp1[$i]).'_v2='.(int)$_GET[tablename($tmp1[$i]).'_v2'];
switch ($_GET[tablename($tmp1[$i]).'_sign']) {
case 0: $semn='>'; break;
case 1: $semn='='; break;
case 2: $semn='<'; break;
case 3: $semn='>='; $query.=tablename($tmp1[$i]).'<='.(int)$_GET[tablename($tmp1[$i]).'_v2'].' AND ';
}
$query.=tablename($tmp1[$i]).$semn.(int)$_GET[tablename($tmp1[$i])].' AND ';
}
break;
case 'checkbox':
secho (tablename($tmp1[$i]),'fcheckbox','r3');
if ($_GET[tablename($tmp1[$i])]) {
techo (' checked','checked','r3');
$pagequery.=tablename($tmp1[$i]).'=1&';
$query.=tablename($tmp1[$i]).'=1 AND ';
}
break;
}
tclose ('r3');
$filters++;
}
}
if ((!$filters)) thide ('filter');
else
techo (dump_button("submit","b_ok.gif"), 'b_ok');
// end
$total=mysql_result(dbquery("SELECT COUNT(*) FROM {$dj_items}_".tablename($c['title'])." WHERE {$query}pending=0"),0,0);
if ($total) thide ('msg'); else techo ('Aceasta categorie este goala.<br><br>','msg');
$data=dbquery("SELECT * FROM {$dj_items}_".tablename($c['title'])." WHERE {$query} pending=0 ORDER BY weight,".tablename($tmp1[0])." LIMIT $st,$ipgf");
while ($x=mysql_fetch_array($data)) {
techo ($x[tablename($tmp1[0])],'title','r1');
techo ("items.php?oi=$oi&ai=${x['id']}&st=$st&open=-1",'link','r1');
techo ("items.php?oi=$oi&ai={$x['id']}&st=$st&open=-1#com","linkcom","r1");
techo ($x['comments'],"comments","r1");
if ($x['score']) secho (dump_stars($x['score'],1),'score','r1');
if ($x['x_banner']) secho ($x['banner_furnizor'],'logo','r1');
tclose ('r1');
}
$pags=ceil($total/$ipgf); if (!$pags) $pags++;
$cpag=(floor($st/$ipgf)+1);
techo ("$pags","pags");
techo ("$cpag","cpag");
dump_pages ($st, $total, "items.php?{$pagequery}oi=$oi&st=%s");
}
// item view
if ((isset($oi))&&(isset($ai))) {
$picnr=0;
if (!isset($_GET['pic'])) {
thide ('cats'); thide ('items'); thide ('thepic');
$c=mysql_fetch_array(dbquery("SELECT * FROM $dj_items WHERE id=$oi LIMIT 0,1"));
if ($dj_auth) $fav=mysql_fetch_array(dbquery("SELECT * FROM {$dj_items}_favorites WHERE itemid=$ai AND itemparentid=$oi AND ownerid=$u_id LIMIT 0,1"));
$tmp1=explode(';',$c['field_names']);
$tmp2=explode(';',$c['field_types']);
$tmp3=explode(';',$c['field_attr']);
$tmp4=explode(';',$c['field_filter']);
$tmp5=explode(';',$c['field_neplatitor']);
$ix=mysql_fetch_array(dbquery("SELECT * FROM {$dj_items}_".tablename($c['title'])." WHERE id=$ai AND (pending=0 OR ownerid=$u_id) LIMIT 0,1"));
$filters=0;
if ($u_id==$ix['ownerid']) {
$editid=-1;
$tmpx=explode('`',$u_profile);
for ($i=0; $i<count($tmpx); $i++) {
$tmpy=explode(';',$tmpx[$i]);
if ($tmpy[0]==$ai) $editid=$i;
}
if ($editid!=-1) techo (dump_button("items_edit.php?id=$editid","b_editthispage.gif"),"b_editthispage");
}
if ($ix['neplatitor']) thide ('extras');
for ($i=0; $i<count($tmp1); $i++)
if (($ix[tablename($tmp1[$i])])&& ((!$tmp5[$i])||(($tmp5[$i])&&(!$ix['neplatitor'])))) {
if (!$itemtitle) $itemtitle=$ix[tablename($tmp1[$i])];
techo ($tmp1[$i],'label','r2');
switch ($tmp2[$i]) {
case 'checkbox': secho ('','checkbox','r2'); break;
case 'picture':
secho ($ix[tablename($tmp1[$i])],'picture','r2');
$size=@getimagesize('pics/items/'.$ix[tablename($tmp1[$i])]);
techo ($size[0],'sx','r2');
techo ($size[1],'sy','r2');
techo ("items.php?oi=$oi&ai=$ai&st=$st&open=$open&pic=$i",'linkpic','r2');
if ((ereg('^Poza [0-9]+$',$tmp1[$i]))||(ereg('^Exemplu poza [0-9]+$',$tmp1[$i]))) $picnr++;
break;
case 'multiple select':
secho (str_replace('~',', ',trim($ix[tablename($tmp1[$i])],'~')),'text','r2');
break;
default: secho (nl2br($ix[tablename($tmp1[$i])]),'text','r2');
}
tclose('r2');
}
if (!$picnr) thide('pana');
$mdl=(int)('99'.$c['id']); $modules[$mdl]['Table']=$dj_items.'_'.tablename($c['title']);
dump_vote($mdl,$ai,$ix['score']);
dump_comments($mdl,$ai,$ix['comments']);
dump_header("<a href=\"items.php\" class=\"head\">FURNIZORI</a> > <a href=\"items.php?oi=$oi&st=$st\" class=\"head\">{$c['title']}</a> > ".$ix[tablename($tmp1[0])]);
if ((isset($_GET['add']))&&(!$fav)) {
$itemtable="{$dj_items}_".tablename($c['title']);
$itemparent=$c['title'];
dbquery("INSERT INTO {$dj_items}_favorites (ownerid,ownerdata,itemid,itemtitle,itemtable,itemparent,itemparentid) VALUES ($u_id,'$u_nick',$ai,'$itemtitle','$itemtable','$itemparent','$oi')");
}
} else {
thide ('cats'); thide ('items'); thide ('theitem');
$c=mysql_fetch_array(dbquery("SELECT * FROM $dj_items WHERE id=$oi LIMIT 0,1"));
$ix=mysql_fetch_array(dbquery("SELECT * FROM {$dj_items}_".tablename($c['title'])." WHERE id=$ai AND (pending=0 OR ownerid=$u_id) LIMIT 0,1"));
$pic=(int)$_GET['pic'];
$tmp=explode(';',$c['field_names']);
techo('../pics/items/'.$ix[tablename($tmp[$pic])],'thepic');
dump_header("<a href=\"items.php\" class=\"head\">FURNIZORI</a> > <a href=\"items.php?oi=$oi&st=$st\" class=\"head\">{$c['title']}</a> > <a href=\"items.php?oi=$oi&ai=$ai&st=$st\">{$ix[tablename($tmp[0])]}</a> > Poza");
}
}
// End content -----------------------------------------------------------------
tpl_dump();
dump_end();
mysql_close();
?>