require("$_SERVER[DOCUMENT_ROOT]/lib/header.inc.php");
$currHeader->setPageTitle("Riptide Gaming - Threadlist (the whole shebang)");
$currBanner->addContent("Threadlist");
?>
// try to pull this content from the page cache (try to cache for four weeks) 604800 * 4
$currCache = new HG_PageCache("riptideThreadList",2419200);
if (!$currCache->haveCached)
{
$query = "SELECT postindex, threadid, threadorder, replylevel, anonymousid, date, subject, posttype, username FROM riptide_posts, riptide_users WHERE riptide_users.userindex = riptide_posts.posterid ORDER BY threadid ASC, threadorder ASC";
$result = mysql_query($query);
$content = "";
while ($row = mysql_fetch_array($result))
{
/* print("
");
for ($i = 0; $i < $row["replylevel"]; $i++) print("-");
print("$row[subject] - $row[username] - $row[date]\n"); */
$content .= "
";
for ($i = 0; $i < $row["replylevel"]; $i++) $content .= "-";
$content .= "$row[subject] - $row[username] - $row[date]\n";
}
// update the cache
$currCache->updateCache($content);
}
// if we have a cached entry, lets say so
else print("Note: This list is cached from " . number_format($currCache->age / 1440,0) . " hours ago. Be thankful, it takes forever to build normally.");
print($currCache->contents);
?>
require("$_SERVER[DOCUMENT_ROOT]/lib/footer.inc.php");
?>