cvs: php-hosts-web /msgboard index.php
| From: | jim winstead | Date: | Mon, 22 Apr 2002 01:58:37 +0000 |
| Subject: | cvs: php-hosts-web /msgboard index.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-9750@lists.php.net to get a copy of this message | ||
jimw Sun Apr 21 21:58:37 2002 EDT
Modified files:
/php-hosts-web/msgboard index.php
Log:
clean up, link host names to host info
Index: php-hosts-web/msgboard/index.php
diff -u php-hosts-web/msgboard/index.php:1.3 php-hosts-web/msgboard/index.php:1.4
--- php-hosts-web/msgboard/index.php:1.3 Sun Apr 21 21:37:37 2002
+++ php-hosts-web/msgboard/index.php Sun Apr 21 21:58:37 2002
@@ -3,16 +3,14 @@
commonHeader("Message Board");
?>
<h3>Message Board</h3>
-<P>
-This message board has been developed so that users can comment on the hosting
-companies listed on this site. Try and keep your comments on-topic, and free
-of inappropriate language.
-</P>
-<P>
-Click on <? echo $IMG_SHOW; ?> for a listing of all the comments for a particular <? echo
$SUBGROUP_TITLE; ?>.
-To add your own comments, click on <? echo $IMG_ADD; ?>.
-</P>
-<?
+
+<p>This message board has been developed so that users can comment on the
+hosting companies listed on this site. Try and keep your comments on-topic,
+and free of inappropriate language.</p>
+
+<p>Click on <b>Show</b> for a listing of all the comments for a particular
hosting company. To add your own comments, click on <b>Add</b>.</p>
+
+<?php
$begin = (int)$begin;
$query = 'SELECT SQL_CALC_FOUND_ROWS HostId,HostName,'
@@ -25,45 +23,38 @@
$total = mysql_get_one("SELECT FOUND_ROWS()");
-echo "Displaying ", $begin + 1, " to ", $end, " of ", $total;
-echo "<br /><a href=\"index.php?begin=$end\">Display next
30</a>";
-
-echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5 WIDTH=100%>\n";
-echo "<TR BGCOLOR=\"$MSG_FRAME_COLOR2\" VALIGN=bottom>\n";
-echo "<TD ALIGN=left>";
-echo $SUBGROUP_TITLE."</TD>\n";
-echo "<TD ALIGN=center>";
-echo "Number of<BR>Messages</TD>\n";
-echo "<TD ALIGN=center>";
-echo "Latest<BR>Message</TD>\n";
-echo "<TD><BR></TD>\n";
-echo "<TD><BR></TD>\n";
-echo "</TR>\n";
+?>
+<table border="0" cellspacing="0" cellpadding="5"
width="100%">
+ <tr bgcolor="#dddddd">
+ <th align="left" width="33%"><?php if ($begin) echo '<a
href="index.php?begin=',max(0,$begin-30),'">«
Previous</a>'?></th>
+ <th align="center" width="33%"><?php echo "Displaying ",
$begin + 1, " to ", $end, " of ", $total;?></th>
+ <th align="right" width="33%"><?php if ($end < $total) echo
'<a href="index.php?begin=',$end,'">Next
»</a>'?></th>
+ </tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="5"
width="100%">
+ <tr bgcolor="#eeddee" valign="bottom">
+ <th align="left">Hosting Company</th>
+ <th align="center">Number of<br />Messages</th>
+ <th align="center">Latest<br />Message</th>
+ <th> </th>
+ <th> </th>
+ </tr>
+<?php
$i = 0;
while ($host = mysql_fetch_assoc($res)) {
- $bg=$BGCOLOR[$i%2];
- echo "<TR BGCOLOR='$bg' VALIGN=middle>\n";
- echo "<td>", htmlentities($host['HostName']), "</td>\n";
+ $bg=$BGCOLOR[$i++%2];
$last=$host['count'] ? date("d-M-Y",$host['last']) : '-';
- echo "<TD ALIGN=right>";
- echo "$host[count]<BR></TD>\n";
- echo "<TD ALIGN=center>";
- echo "$last<BR></TD>\n";
-
- echo "<td>";
- if ($host['count']):
- echo "<A HREF=\"list.php?subgroup=$host[HostId]\">" . $IMG_SHOW .
"</A>";
- endif;
- echo "</td>";
-
- echo "<td>";
- echo "<A HREF=\"post.php?subgroup=$host[HostId]\">" . $IMG_ADD .
"</A>";
- echo "</TD>";
-
- echo "</TR>\n";
- $i++;
+?>
+ <tr bgcolor="<?php echo $bg?>" valign="middle">
+ <td><a href="../showinfo.php?hostid=<?php echo
$host['HostId']?>"><?php echo
htmlentities($host['HostName']);?></a></td>
+ <td align="center"><?php echo $host['count']?></td>
+ <td align="right"><?php echo $last?></td>
+ <td><?php if ($host['count']) echo '<a
href="list.php?subgroup=', $host['HostId'],
'"><b>Show</b></a>';?></td>
+ <td><?php echo '<a href="post.php?subgroup=',
$host['HostId'], '"><b>Add</b></a>';?></td>
+ </tr>
+<?php
}
-echo "</TABLE>\n";
+echo "</table>";
commonFooter();
?>