"; OpenTable(); echo "" .""; $result=$db->sql_query("select lid, cid, sid, title, description, date, hits, linkratingsummary, totalvotes, totalcomments from ".$prefix."_links_links where linkratingsummary != 0 and totalvotes >= $linkvotemin order by linkratingsummary DESC limit 0,$toplinks"); echo "
"; if ($ratenum != "" && $ratetype != "") { $toplinks = $ratenum; if ($ratetype == "percent") { $toplinkspercentrigger = 1; } } if ($toplinkspercentrigger == 1) { $toplinkspercent = $toplinks; $result=$db->sql_query("select * from ".$prefix."_links_links where linkratingsummary != 0"); $totalratedlinks = $db->sql_numrows($result); $toplinks = $toplinks / 100; $toplinks = $totalratedlinks * $toplinks; $toplinks = round($toplinks); } if ($toplinkspercentrigger == 1) { echo "
"._BESTRATED." $toplinkspercent% ("._OF." $totalratedlinks "._TRATEDLINKS.")

"; } else { echo "
"._BESTRATED." $toplinks

"; } echo "
"._NOTE." $linkvotemin "._TVOTESREQ."
" .""._SHOWTOP.": [ 10 - " ."25 - " ."50 | " ."1% - " ."5% - " ."10% ]


"; while(list($lid, $cid, $sid, $title, $description, $time, $hits, $linkratingsummary, $totalvotes, $totalcomments)=$db->sql_fetchrow($result)) { $linkratingsummary = number_format($linkratingsummary, $mainvotedecimal); $title = stripslashes($title); $description = stripslashes($description); echo "$title"; newlinkgraphic($datetime, $time); popgraphic($hits); echo "
"; echo ""._DESCRIPTION.": $description
"; setlocale (LC_TIME, $locale); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); $datetime = ucfirst($datetime); echo ""._ADDEDON.": $datetime "._HITS.": $hits"; $transfertitle = str_replace (" ", "_", $title); /* voting & comments stats */ if ($totalvotes == 1) { $votestring = _VOTE; } else { $votestring = _VOTES; } if ($linkratingsummary!="0" || $linkratingsummary!="0.0") { echo " "._RATING.": $linkratingsummary ($totalvotes $votestring)"; } echo "
"; $result2=$db->sql_query("select title from ".$prefix."_links_categories where cid=$cid"); list($ctitle) = $db->sql_fetchrow($result2); $ctitle=getparent($cid,$ctitle); echo ""._CATEGORY.": $ctitle"; echo "
"._RATESITE.""; if (is_user($user)) { echo " | "._REPORTBROKEN.""; } if ($totalvotes != 0) { echo " | "._DETAILS.""; } if ($totalcomments != 0) { echo " | "._SCOMMENTS." ($totalcomments)"; } detecteditorial($lid, $transfertitle); echo "

"; } echo "
"; CloseTable(); @include("footer.php"); } ?>