topical media & game development
basic-php-16-viewforum.php / php
<?php
require_once 'conn.php';
require_once 'functions.php';
require_once 'http.php';
if (!isset(forumid = forum = getForum(forumid, "F");
if (isset(page = page = 1;
}
admin['pageLimit']['value'];
if (limit = 25;
page - 1) * sql = "CREATE TEMPORARY TABLE tmp ( " .
"topic_id INT(11) NOT NULL DEFAULT 0, " .
"postdate datetime NOT NULL default '0000-00-00 00:00:00')";
mysql_query(sql);
sql)
or die(mysql_error() . "<br>" . sql = "INSERT INTO tmp SELECT topic_id, MAX(date_posted) " .
"FROM forum_posts " .
"WHERE forum_id = sql)
or die(mysql_error() . "<br>" . sql = "UNLOCK TABLES";
mysql_query(sql);
//die('stop');
forumid " .
"AND t.topic_id = 0 " .
"GROUP BY t.id " .
"ORDER BY re_posted DESC " .
"LIMIT limit";
sql)
or die(mysql_error() . "<br>" . numrows = mysql_num_rows(numrows == 0) {
title = "Welcome to " . dest = "compose.php?forumid=" . sev = "Info";
msg,dest,message;
} else {
if (isset(_GET['f'], "right");
}
echo "<table class=\"forumtable\" cellspacing=\"0\" ";
echo "cellpadding=\"2\"><tr>";
echo "<th class=\"thread\">Thread</th>";
echo "<th class=\"author\">Author</th>";
echo "<th class=\"replies\">Replies</th>";
echo "<th class=\"lastpost\">Last Post</th>";
echo "</tr>";
row = mysql_fetch_array(rowclass = (row['re_posted'] == "") {
row['t_posted'];
} else {
row['re_posted'];
}
if ((isset(_SESSION['last_login'] < newpost = true;
} else {
rowclass\">";
echo "<td class=\"thread\">" . (row['topic_id'] . "\">" . row['t_author'] . "</td>";
echo "<td class=\"replies\">" . lastpost . "</td>";
echo "</tr>\n";
}
echo "</table>";
echo paginate(sql = "DROP TABLE tmp";
mysql_query(sql);
require_once 'footer.php';
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.