session_start(); if (! isset($_SESSION['uid'])) { $_SESSION['uid'] = 0; $_SESSION['uname'] = 'Guest'; } include('../inc/startup.php'); ?>
Legend of the Red Dragon - Town Square | ||||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||||||
The marketplace has many outlets. Which way do you go from here? | ||||||
|
||||||
function list_cats () {
$where = "";
if (isset($_REQUEST['pid'])) {
$where = "where pid=" . intval($_REQUEST['pid']);
}
$query = "select id,name from cats $where order by name";
($res = mysql_query($query)) or die(mysql_error() . "\n\n $query"); $rows = mysql_num_rows($res); $half = intval($rows / 2) + 1; if (($rows % 2) > ($half+$half)) { $half++; } $html = array(); $idx = 0; $ab = 0; while (list($id,$name) = mysql_fetch_row($res)) { $query = "Select count(*) from files where cid=$id"; $res2 = mysql_query($query); list($count) = mysql_fetch_row($res2); mysql_free_result($res2); if (! isset($html[$idx])) { $html[$idx] = array(); } $html[$idx][$ab] = << |
$count files | STOP; $idx++; if ($idx > $half-1) { $idx = 0; $ab++; } } print "
"; } } print " |
$fn Size: $fs Downloads: $dcount |
$descr |