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 to display all available topics to your visitors |
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 |
|
|
|
19 |
|
|
include("header.php"); |
20 |
|
|
dbconnect(); |
21 |
|
|
$result = mysql_query("select topicid, topicname, topicimage, topictext from topics order by topicid"); |
22 |
|
|
if (mysql_num_rows($result)==0) { |
23 |
|
|
echo "<table border=0 bgcolor=000000 cellpadding=2 cellspacing=0 width=95%> |
24 |
|
|
<tr><td> |
25 |
|
|
<table border=0 bgcolor=FFFFFF cellpadding=1 cellspacing=0 width=100%>"; |
26 |
|
|
} |
27 |
|
|
if (mysql_num_rows($result) > 0) { |
28 |
|
|
|
29 |
|
|
echo "<table border=0 bgcolor=000000 cellpadding=2 cellspacing=0 width=100%> |
30 |
|
|
<tr><td> |
31 |
|
|
<table border=0 bgcolor=FFFFFF cellpadding=1 cellspacing=0 width=100%> |
32 |
|
|
<tr><td>$font3<b><center>".translate("Current Active Topics")."</b><br>".translate("Click to list all articles in this topic")."</center><br> |
33 |
|
|
<center><table border=0 width=100% align=center cellpadding=2><tr>"; |
34 |
|
|
|
35 |
|
|
|
36 |
|
|
while(list($topicid, $topicname, $topicimage, $topictext) = mysql_fetch_array($result)) { |
37 |
|
|
?> |
38 |
|
|
|
39 |
|
|
<td align=center> |
40 |
|
|
<?php echo "<a href=search.php?query=&topic=$topicid>"; ?><img src=<?php echo "$tipath$topicimage"; ?> border=0></a><br> |
41 |
|
|
<font face=Arial,Helvetica size=2><b><?php echo "$topictext"; ?> |
42 |
|
|
</td> |
43 |
|
|
<?php |
44 |
|
|
|
45 |
|
|
// Thanks to John Hoffmann from softlinux.org for the next 5 lines ;) |
46 |
|
|
|
47 |
|
|
$count++; |
48 |
|
|
if ($count == 5) { |
49 |
|
|
echo "</tr></tr>"; |
50 |
|
|
$count = 0; |
51 |
|
|
} |
52 |
|
|
?> |
53 |
|
|
<?php |
54 |
|
|
} |
55 |
|
|
echo "</tr></table>"; |
56 |
|
|
} |
57 |
|
|
?> |
58 |
|
|
</td></tr></table></td></tr></table> |
59 |
|
|
<?php |
60 |
|
|
mysql_free_result($result); |
61 |
|
|
include("footer.php"); |
62 |
|
|
|
63 |
|
|
?> |