(".$ar["gin"]."/".$ar["gout"].")/".$ar["moder_vote"]." [".$LANG["edit"]."]"; $admin.="[".$LANG["delete"]."] ["; for ($j=1;$j<11;$j++) { if ($j==$ar["moder_vote"]) $admin.="".$j." "; else $admin.="".$j." "; } $admin.="] [x]"; $admin.=" [D]"; } $template=($best==1)? ($ar["dlink"]==0)?$TMPL["bestlinksbititem"]:$TMPL["bestdirecbititem"] : ($ar["dlink"]==0)?$TMPL["linksbititem"]:$TMPL["directbititem"]; $template=str_replace("%ID",$ar["lid"],$template); $template=str_replace("%TITLE",$ar["title"],$template); $template=str_replace("%GIN",$ar["gin"],$template); $template=str_replace("%GOUT",$ar["gout"],$template); $template=str_replace("%MODERVOTE",$ar["moder_vote"],$template); $template=str_replace("%DESC",$ar["description"],$template); $template=str_replace("%URL",$ar["url"],$template); $template=str_replace("%BEST","",$template); $template=str_replace("%BROKENTEXT",$LANG["broken"],$template); $template=str_replace("%RESFIELD1",$ar["resfield1"],$template); $template=str_replace("%RESFIELD2",$ar["resfield2"],$template); $template=str_replace("%RESFIELD3",$ar["resfield3"],$template); $template=str_replace("%ADMINIFACE",$admin,$template); print $template; } //select cat's id and moder vote $y=mysql_query("SELECT cat1, moder_vote FROM ".$db["prefix"]."main WHERE lid='$z' and type=1;") or die(mysql_error()); if (mysql_num_rows($y)==1) { $c=mysql_result($y,0,0); $b=mysql_result($y,0,1); $b=($b==10)?1:0; } else { die(mysql_error()); } $cid=$c;$l=""; //category string selection do { $r=mysql_query("SELECT c.parent,c.name,c.cid,cl.pname FROM ".$db["prefix"]."cat as c,".$db["prefix"]."cat_linear as cl WHERE c.cid='$cid' AND cl.cid='$cid';") or die(mysql_error()); if (mysql_num_rows($r)==1) { $id=mysql_result($r,0,2); $pnm=mysql_result($r,0,3); $title=mysql_result($r,0,1); $l="".$title." » ".$l; $cid=mysql_result($r,0,0); } else $cid=0; } while ($cid!=0); //select title //$r=mysql_query("SELECT name FROM ".$db["prefix"]."cat WHERE cid='$c';") or die(mysql_error()); $r=mysql_query("SELECT title FROM ".$db["prefix"]."main WHERE lid='$z' and type=1;") or die(mysql_error()); if (mysql_num_rows($r)!=0) $title=mysql_result($r,0,0); else $title=$CATNAME; include "_top.php"; $template=$TMPL["bmenu"]; $template=str_replace("%MODERATORSTEXT",$LANG["moderators"],$template); $template=str_replace("%ADDLINKTEXT",$LANG["addlink"],$template); $template=str_replace("%MAINTEXT",$LANG["main"],$template); print $template; if ($_SESSION["cncatsid"]=="thisissomestring") { $template=$TMPL["brokenscript"]; $template=str_replace("%YESTEXT",$LANG["yes"],$template); $template=str_replace("%NOTEXT",$LANG["no"],$template); $template=str_replace("%BROKENSURETEXT",$LANG["brokensure"],$template); print $template; $template=$TMPL["directscript"]; $template=str_replace("%YESTEXT",$LANG["yes"],$template); $template=str_replace("%NOTEXT",$LANG["no"],$template); $template=str_replace("%DIRECTSURETEXT",$LANG["directsure"],$template); print $template; } $sform=$TMPL["searchform"]; $sform=str_replace("%SEARCHTEXT",$LANG["search"],$sform); $sform=str_replace("%QUERYTEXT",$q,$sform); $sform=str_replace("%ADDLINKTEXT",$LANG["addlink"],$sform); print $sform; $template=$TMPL["catname"]; $template=str_replace("%MAINTEXT",$CATNAME,$template); $template=str_replace("%OTHERTEXT",$l,$template); print $template; print $TMPL["linkstop"]; ShowItem($z, $b); print $TMPL["linksbottom"]; //$template=$TMPL["bmenu"]; //$template=str_replace("%MODERATORSTEXT",$LANG["moderators"],$template); //$template=str_replace("%ADDLINKTEXT",$LANG["addlink"],$template); //$template=str_replace("%MAINTEXT",$LANG["main"],$template); //print $template; print $COPY; include "_bottom.php"; ?>