"; OpenTable(); 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 " "; } else { echo " "; } echo " |
" .""._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 " |