<?php include 'foodrun.logic.php'; $biggame = new Lan_timetable(); $biggame->type = "food"; if (isset($_GET["tid"])) { $user = new Lan_users(); $biggame->joinAdd($user, "LEFT"); if ($biggame->get($biggame->escape($_GET["tid"]))) { $biggame->fetch(); //Find sign ups $tts = new Lan_timetable_signups(); $user = new Lan_users(); $tts->joinAdd($user); $tts->timetable_id = $biggame->id; $list = array(); $tts->find(); $currentUserSignedUp = false; $signups = 0; while ($tts->fetch()) { if (streq($tts->user_id, getCurrentUID())) { $currentUserSignedUp = true; } $list[] = clone $tts; $signups++; } $biggame->signups = $signups; $game = new Lan_games(); if (1 == $game->get($biggame->game)) { $master->Smarty->assign("image", "images/games/" . $game->picture); $master->Smarty->assign("gamename", $game->name);
<?php include 'biggame.logic.php'; $biggame = new Lan_timetable(); $biggame->type = "biggame"; if (isset($_GET["tid"])) { if ($biggame->get($biggame->escape($_GET["tid"]))) { $biggame->fetch(); //Find sign ups $tts = new Lan_timetable_signups(); $user = new Lan_users(); $tts->joinAdd($user, "LEFT"); //$tgame = new Lan_games; //$tts->joinAdd($tgame, "LEFT"); $tts->timetable_id = $biggame->id; $list = array(); $tts->find(); $currentUserSignedUp = "no"; while ($tts->fetch()) { if (streq($tts->user_id, getCurrentUID())) { $currentUserSignedUp = "signup"; } $list[] = clone $tts; } $master->Smarty->assign("signups", $list); $game = new Lan_games(); if (1 == $game->get($biggame->game)) { $master->Smarty->assign("image", "images/games/" . $game->picture); $master->Smarty->assign("gamename", $game->name); if (!streq($biggame->game, "0")) { $link = "http://apps.metacritic.com/search/process?ty=3&ts=" . $game->name . "&tfs=game_title&sb=0&game_platform=PC&x=11&y=6&release_date_s=";