/[nuke]/html/top.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /html/top.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Fri Sep 22 07:22:13 2000 UTC (23 years, 7 months ago) by dpavlin
Branch: dbp, MAIN
CVS Tags: r3_6, HEAD
Changes since 1.1: +0 -0 lines
import of version 3.6

1 dpavlin 1.1 <?php
2    
3     ######################################################################
4     # PHP-NUKE: Web Portal System
5     # ===========================
6     #
7     # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
8     # http://www.ncc.org.ve/php-nuke.php
9     #
10     # This modules is for the top10 page generated in real time
11     #
12     # This program is free software. You can redistribute it and/or modify
13     # it under the terms of the GNU General Public License as published by
14     # the Free Software Foundation; either version 2 of the License.
15     ######################################################################
16    
17     if(!isset($mainfile)) { include("mainfile.php"); }
18     include("header.php");
19     include("config.php");
20     dbconnect();
21    
22     echo "<font face=Arial,Helvetica size=3>
23     <center>
24     <table cellpadding=2 cellspacing=0 bgcolor=000000 width=100% border=0><tr><td>
25     <table cellpadding=2 cellspacing=0 bgcolor=FFFFFF width=100% border=0><tr><td>
26     <font face=Lucida,Verdana,Arial,Helvetica size=4>
27     <br><center><b>".translate("Welcome to the TOP page for")." $sitename!</b><br><br>";
28    
29     // Top 10 read stories
30    
31     $result = mysql_query("select sid, title, time, counter from stories order by counter DESC limit 0,$top");
32    
33     echo "<table border=0 cellpadding=10 width=100%><tr><td align=left><font face=Arial,Helvetica size=4>
34     <b>$top ".translate("most readed stories")."</b><br><br><font size=3>";
35     $lugar=1;
36     while(list($sid, $title, $time, $counter) = mysql_fetch_row($result)) {
37     if($counter>0) {
38     echo "<li>$lugar: <a href=article.php?sid=$sid>$title</a> - (".translate("readed:")." $counter ".translate("times").")<br>";
39     $lugar++;
40     }
41     }
42     mysql_free_result($result);
43     echo "</td></tr></table><br>";
44    
45     // Top 10 commented stories
46    
47     $result = mysql_query("select sid, title, comments from stories order by comments DESC limit 0,$top");
48    
49     echo "<table border=0 cellpadding=10 width=100%><tr><td align=left><font face=Arial,Helvetica size=4>
50     <b>$top ".translate("most commented stories")."</b><br><br><font size=3>";
51     $lugar=1;
52     while(list($sid, $title, $comments) = mysql_fetch_row($result)) {
53     if($comments>0) {
54     echo "<li>$lugar: <a href=article.php?sid=$sid>$title</a> - (".translate("comments:")." $comments)<br>";
55     $lugar++;
56     }
57     }
58     mysql_free_result($result);
59     echo "</td></tr></table><br>";
60    
61     // Top 10 articles in special sections
62    
63     $result = mysql_query("select artid, secid, title, content, counter from seccont order by counter DESC limit 0,$top");
64    
65     echo "<table border=0 cellpadding=10 width=100%><tr><td align=left><font face=Arial,Helvetica size=4>
66     <b>$top ".translate("most readed articles in special sections")."</b><br><br><font size=3>";
67     $lugar=1;
68     while(list($artid, $secid, $title, $content, $counter) = mysql_fetch_row($result)) {
69     echo "<li>$lugar: <a href=sections.php?op=viewarticle&artid=$artid>$title</a> - (".translate("readed:")." $counter ".translate("times").")<br>";
70     $lugar++;
71     }
72     mysql_free_result($result);
73     echo "</td></tr></table><br>";
74    
75     // Top 10 users submitters
76    
77     $result = mysql_query("select uname, counter from users order by counter DESC limit 0,$top");
78    
79     echo "<table border=0 cellpadding=10 width=100%><tr><td align=left><font face=Arial,Helvetica size=4>
80     <b>$top ".translate("most active news submitters")."</b><br><br><font size=3>";
81     $lugar=1;
82     while(list($uname, $counter) = mysql_fetch_row($result)) {
83     if($counter>0) {
84     echo "<li>$lugar: <a href=user.php?op=userinfo&uname=$uname>$uname</a> - (".translate("sent news:")." $counter)<br>";
85     $lugar++;
86     }
87     }
88     mysql_free_result($result);
89     echo "</td></tr></table><br>";
90    
91    
92     // Top 10 Polls
93    
94     $result = mysql_query("select pollID, pollTitle, voters from poll_desc order by voters DESC limit 0,$top");
95    
96     echo "<table border=0 cellpadding=10 width=100%><tr><td align=left><font face=Arial,Helvetica size=4>
97     <b>$top ".translate("most voted polls")."</b><br><br><font size=3>";
98     $lugar=1;
99     while(list($pollID, $pollTitle, $voters) = mysql_fetch_row($result)) {
100     if($voters>0) {
101     echo "<li>$lugar: <a href=pollBooth.php?op=results&pollID=$pollID>$pollTitle</a> - (".translate("votes:")." $voters)<br>";
102     $lugar++;
103     }
104     }
105     mysql_free_result($result);
106     echo "</td></tr></table><br>";
107    
108     // Top 10 authors
109    
110     $result = mysql_query("select aid, counter from authors order by counter DESC limit 0,$top");
111    
112     echo "<table border=0 cellpadding=10 width=100%><tr><td align=left><font face=Arial,Helvetica size=4>
113     <b>$top ".translate("most active authors")."</b><br><br><font size=3>";
114     $lugar=1;
115     while(list($aid, $counter) = mysql_fetch_row($result)) {
116     if($counter>0) {
117     echo "<li>$lugar: <a href=search.php?query=&author=$aid>$aid</a> - (".translate("news published:")." $counter)<br>";
118     $lugar++;
119     }
120     }
121     mysql_free_result($result);
122     echo "</td></tr></table><br>
123     <br><br></center>
124     </td></tr></table></td></tr></table>";
125    
126     include("footer.php");
127     ?>

  ViewVC Help
Powered by ViewVC 1.1.26