[".$LANG["edit"]."] ["; for ($j=1;$j<11;$j++) { if ($j==$ar["moder_vote"]) $admin.="".$j." "; else $admin.="".$j." "; } $admin.="]"; } $template=($best==1)?$TMPL["bestlinksbit"]:$TMPL["linksbit"]; $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("%BOROKENTEXT",$LANG["broken"],$template); $template=str_replace("%ADMINIFACE",$admin,$template); print $template; } if ($best!=1)return(mysql_result(mysql_query("SELECT count(*) FROM main WHERE type=1 $bestsql AND (cat1=$cid OR cat2=$cid OR cat3=$cid);"),0,0)); } $c=intval($c); $start=intval($start); $pp=10; $cid=$c;$l=""; do { $r=mysql_query("SELECT parent,name,cid FROM cat WHERE cid='$cid';") or die(mysql_error()); if (mysql_num_rows($r)==1) { $id=mysql_result($r,0,2); $title=mysql_result($r,0,1); if ($cid==$c) $l=mysql_result($r,0,1).$l; else $l="".$title." » ".$l; $cid=mysql_result($r,0,0); } else $cid=0; } while ($cid!=0); $r=mysql_query("SELECT name FROM cat WHERE cid='$c';") or die(mysql_error()); if (mysql_num_rows($r)!=0) $title=mysql_result($r,0,0)." / ".$CATNAME; 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; $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; $sform=$TMPL["searchform"]; $sform=str_replace("%SEARCHTEXT",$LANG["search"],$sform); $sform=str_replace("%QUERYTEXT",$q,$sform); print $sform; print "
ADD LINK
"; $template=$TMPL["catname"]; $template=str_replace("%MAINTEXT",$CATNAME,$template); $template=str_replace("%OTHERTEXT",$l,$template); print $template; ShowParts($c); if (intval($c)==0 && $cat["shownew"]==1) { if ($o==0) $sortbypop="".$LANG["popuarity"].""; else $sortbypop="".$LANG["popuarity"].""; if ($o==1) $sortbytitle="".$LANG["title"].""; else $sortbytitle="".$LANG["title"].""; if ($o==2) $sortbymoder="".$LANG["modervote"].""; else $sortbymoder="".$LANG["modervote"].""; $template=$TMPL["sortby"]; $template=str_replace("%SORTBYPOP",$sortbypop,$template); $template=str_replace("%SORTBYTITLE",$sortbytitle,$template); $template=str_replace("%SORTBYMODER",$sortbymoder,$template); $template=str_replace("%SORTBYTEXT",$LANG["sortby"],$template); print $template; $newlinkstop=$TMPL["newlinkstop"]; $newlinkstop=str_replace("%NEWLINKSTEXT",$LANG["newlinks"],$newlinkstop); print $newlinkstop; $r=mysql_query("SELECT lid,title,description FROM main WHERE type=1 ORDER by lid DESC LIMIT ".$cat["shownewcount"].";"); while ($ar=mysql_fetch_array($r)) { if (strlen($ar["description"])>75) $ar["description75"]=substr($ar["description"],0,75)."..."; else $ar["description75"]=$ar["description"]; $template=$TMPL["newlinkstbit"]; $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("%DESC75",$ar["description75"],$template); $template=str_replace("%DESC",$ar["description"],$template); $template=str_replace("%URL",$ar["url"],$template); print $template; } print $TMPL["newlinkstbottom"]; } if ($cat["linksatmain"]==1 || $c!=0) { print $TMPL["linkstop"]; ShowCat($c,1); print str_replace("%NUM",(1+$start),$TMPL["linksmiddle"]); $total=ShowCat($c); print $TMPL["linksbottom"]; print "

".$LANG["linkcount"].": $total

"; } if ($total>$pp) { print "
"; if ($start!=0) print "<< | "; else print "<< | "; $sstart=$start-60; if ($sstart<0) $sstart=0; $send=$start+60;if ($send>$total) $send=$total; for ($i=$sstart;$i<$send;$i+=$pp) { if ($start==$i) print "".($i+1).""; else print "".($i+1).""; print " | "; } if ($start==$i-$pp) print ">>"; else print ">>"; print "
"; } $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 base64_decode($COPY); include "_bottom.php"; ?>