$maintitle = " - Games";$nav="home";
require_once($_SERVER['DOCUMENT_ROOT'].'/includes/header.php');
$ludate_result = mysql_query("SHOW TABLE STATUS FROM db162598_gumain WHERE Name = 'games';");
while ($array = mysql_fetch_array($ludate_result)) {
$posted = date("F jS, Y - g:ia",strtotime($array['Update_time']));
}
?>
The Big Black Cabinet ( Last Updated: echo $posted; ?> )

$result = mysql_query("SELECT game_id,name,edition,edition_name,expansion,expansion_name,primary_type,type,ages,players,times,year,publisher,imgsrc,source,notes FROM games ORDER BY primary_type,name,edition,expansion,expansion_name");
$cnt = 1;
$gameprev = "";
$typeprev = "";
while($row = mysql_fetch_assoc($result)){
$gameedition = $row['name'].$row['edition'];
$gamename = $row['name'].' '.$row['edition_name'];
if ($row['primary_type'] == "b") { $showtype = "Board Games"; }
elseif ($row['primary_type'] == "c") { $showtype = "Card Games"; }
elseif ($row['primary_type'] == "d") { $showtype = "Dice Games"; }
elseif ($row['primary_type'] == "l") { $showtype = "Logic Games"; }
elseif ($row['primary_type'] == "m") { $showtype = "Miniature Games"; }
elseif ($row['primary_type'] == "p") { $showtype = "Party Games"; }
elseif ($row['primary_type'] == "t") { $showtype = "Tile Games"; }
elseif ($row['primary_type'] == "x") { $showtype = "Dexterity Games"; }
elseif ($row['primary_type'] == "y") { $showtype = "Classics"; }
if ($gameedition != $gameprev) {
if ($cnt != 1) { echo '
'; }
if ($cnt >= 11) { echo ''; }
if ($typeprev != $row['primary_type']) {
if ($cnt != 1) { echo ''; }
echo ''.$showtype.'
';
}
if (is_null($row['expansion'])) { $dashed = 'border-top:1px dashed #CCC;'; }
echo '';
}
if (!is_null($row['source'])) {
if ($row['source'] == "tt") { $source = ' | Source:
TableTop'; }
elseif ($row['source'] == "ks") { $source = ' | Source:
KickStarter'; }
elseif ($row['source'] == "dt") { $source = ' | Source:
Dice Tower'; }
elseif ($row['source'] == "to") { $source = ' | Source:
Tomoson'; }
elseif ($row['source'] == "lc") { $source = ' | Source:
Lootcrate'; }
}
if (is_null($row['expansion'])) {
if (!is_null($row['imgsrc']) && $cnt >= 11) {
echo '

';
}
echo '
'.$row['name'].' '.$row['edition_name'].'
('.$row['year'].') - '.$row['publisher'].'
'.$row['type'].'
Players: '.$row['players'].' | Time: '.$row['times'].' | Ages: '.$row['ages'].$source.'
';
if (!is_null($row['notes'])) {
echo '
Notes: '.$row['notes'].'
';
}
$cnt++;
} else {
echo '
';
if (intval($row['expansion']) == 1) { echo 'Expansions:
'; }
echo ''.$row['expansion_name'].' ('.$row['year'].')
';
}
unset($source);
$gameprev = $gameedition;
$typeprev = $row['primary_type'];
}
?>
require_once($_SERVER['DOCUMENT_ROOT'].'/includes/footer.php'); ?>