sql_query("SELECT sid, title, counter FROM ".$prefix."_stories $queryalang ORDER BY counter DESC LIMIT 0,$top"); if ($db->sql_numrows($result) > 0) { echo "
\n"
."$top "._READSTORIES." \n"; $lugar=1; while ($row = $db->sql_fetchrow($result)) { $sid = intval($row['sid']); $title = stripslashes(check_html($row['title'], "nohtml")); $counter = intval($row['counter']); if($counter>0) { echo "· $lugar: $title - ($counter "._READS.") \n"; $lugar++; } } echo " |
\n"
."$top "._MOSTVOTEDSTORIES." \n"; $lugar=1; while ($row2 = $db->sql_fetchrow($result2)) { $sid = intval($row2['sid']); $title = stripslashes(check_html($row2['title'], "nohtml")); $ratings = intval($row2['ratings']); if($ratings>0) { echo "· $lugar: $title - ($ratings "._LVOTES.") \n"; $lugar++; } } echo " |
\n"
."$top "._BESTRATEDSTORIES." \n"; $lugar=1; while ($row3 = $db->sql_fetchrow($result3)) { $sid = intval($row3['sid']); $title = stripslashes(check_html($row3['title'], "nohtml")); $score = intval($row3['score']); $ratings = intval($row3['ratings']); if($score>0) { $rate = substr($score / $ratings, 0, 4); echo "· $lugar: $title - ($rate "._POINTS.") \n"; $lugar++; } } echo " |
\n"
."$top "._COMMENTEDSTORIES." \n"; $lugar=1; while ($row4 = $db->sql_fetchrow($result4)) { $sid = intval($row4['sid']); $title = stripslashes(check_html($row4['title'], "nohtml")); $comments = intval($row4['comments']); if($comments>0) { echo "· $lugar: $title - ($comments "._COMMENTS.") \n"; $lugar++; } } echo " |
\n"
."$top "._ACTIVECAT." \n"; $lugar=1; while ($row5 = $db->sql_fetchrow($result5)) { $catid = intval($row5['catid']); $title = stripslashes(check_html($row5['title'], "nohtml")); $counter = intval($row5['counter']); if($counter>0) { echo "· $lugar: $title - ($counter "._HITS.") \n"; $lugar++; } } echo " |
\n"
."$top "._READSECTION." \n"; $lugar=1; while ($row6 = $db->sql_fetchrow($result6)) { $artid = intval($row6['artid']); $secid = intval($row6['secid']); $title = stripslashes(check_html($row6['title'], "nohtml")); $content = stripslashes($row6['content']); $counter = intval($row6['counter']); echo "· $lugar: $title - ($counter "._READS.") \n"; $lugar++; } echo " |
\n"
."$top "._NEWSSUBMITTERS." \n"; $lugar=1; while ($row7 = $db->sql_fetchrow($result7)) { $uname = stripslashes($row7['username']); $counter = intval($row7['counter']); if($counter>0) { echo "· $lugar: $uname - ($counter "._NEWSSENT.") \n"; $lugar++; } } echo " |
\n"
."$top "._VOTEDPOLLS." \n"; $lugar = 1; $result9 = $db->sql_query("SELECT pollID, pollTitle, timeStamp, voters FROM ".$prefix."_poll_desc $queryplang order by voters DESC limit 0,$top"); $counter = 0; while($row9 = $db->sql_fetchrow($result9)) { $resultArray[$counter] = array($row9[pollID], $row9[pollTitle], $row9[timeStamp], $row9[voters]); $counter++; } for ($count = 0; $count < count($resultArray); $count++) { $id = $resultArray[$count][0]; $pollTitle = $resultArray[$count][1]; $voters = $resultArray[$count][3]; for($i = 0; $i < 12; $i++) { $result10 = $db->sql_query("SELECT optionCount FROM ".$prefix."_poll_data WHERE (pollID='$id') AND (voteID='$i')"); $row10 = $db->sql_fetchrow($result10); $optionCount = $row10['optionCount']; $sum = (int)$sum+$optionCount; } echo "· $lugar: $pollTitle - ($sum "._LVOTES.") \n"; $lugar++; $sum = 0; } echo " |
\n"
."$top "._MOSTACTIVEAUTHORS." \n"; $lugar=1; while ($row11 = $db->sql_fetchrow($result11)) { $aid = stripslashes($row11['aid']); $counter = intval($row11['counter']); if($counter>0) { echo "· $lugar: $aid - ($counter "._NEWSPUBLISHED.") \n"; $lugar++; } } echo " |
\n"
."$top "._READREVIEWS." \n"; $lugar=1; while ($row12 = $db->sql_fetchrow($result12)) { $id = intval($row12['id']); $title = stripslashes(check_html($row12['title'], "nohtml")); $hits = intval($row12['hits']); if($hits>0) { echo "· $lugar: $title - ($hits "._READS.") \n"; $lugar++; } } echo " |
\n"
."$top "._DOWNLOADEDFILES." \n"; $lugar=1; while ($row13 = $db->sql_fetchrow($result13)) { $lid = intval($row13['lid']); $cid = intval($row13['cid']); $title = stripslashes(check_html($row13['title'], "nohtml")); $hits = intval($row13['hits']); if($hits>0) { $row_res = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_downloads_categories WHERE cid='$cid'")); $ctitle = stripslashes(check_html($row_res['title'], "nohtml")); $utitle = ereg_replace(" ", "_", $title); echo "· $lugar: $title ("._CATEGORY.": $ctitle) - ($hits "._LDOWNLOADS.") \n"; $lugar++; } } echo " |
\n"
."$top "._MOSTREADPAGES." \n"; $lugar=1; while ($row14 = $db->sql_fetchrow($result14)) { $pid = intval($row14['pid']); $title = stripslashes(check_html($row14['title'], "nohtml")); $counter = intval($row14['counter']); if($counter>0) { echo "· $lugar: $title ($counter "._READS.") \n"; $lugar++; } } echo " |