Revision 105 | Revision 115 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?require ("include/common.php");// $smarty->caching = true;$smarty->cache_lifetime = 86400;$start = intval(isset($_POST["start"]) ? $_POST["start"] : 0);define("CACHE_ID", $u_loc . "|" . $start);if (!$smarty->is_cached("index.tpl", CACHE_ID)){$game_l = Spiele::listSpiele(0, 0);if ($error){$smarty->assign("error", $error);$smarty->assign("meld", $meld);$smarty->assign("db_meld", $db_meld);$smarty->display("meld.tpl");}else{$anz = $game_l->numRows($game_l);$i = 0;$nav = generate_pagination2('"' . basename(__file__) . '"', $anz, $max_anz, $start);$smarty->assign("nav", $nav);$game_l = Spiele::listSpiele($max_anz, $start);while ($row = $game_l->fetchRow()){$spiele[$i]["s_name"] = $row["g_name"];$m1 = new Team($row["g_m1"]);$m2 = new Team($row["g_m2"]);$g1 = new Gruppe($m1->t_group);$g2 = new Gruppe($m2->t_group);$ort = new Ort($row["g_location"]);if ($row["g_type"] == 1){$spiele[$i]["s_teams"] = "$m1->t_name (" . $common["group"] . " $g1->g_name) - $m2->t_name (" .$common["group"] . " $g2->g_name)";}else{$spiele[$i]["s_teams"] = "$m1->t_name - $m2->t_name";}$spiele[$i]["s_location"] = $ort->o_name;$spiele[$i]["s_stadium"] = $ort->o_name2;$g_date = $row["g_date"];$spiele[$i]["s_date"] = $loc->formatDate($g_date) . " " . $common["at"] . " ";$spiele[$i]["s_time"] = $loc->formatTime($g_date) . " " . $common["o_clock"];if ($g_date > time()){$spiele[$i]["s_erg"] = "<B>Noch nicht ausgetragen!</B>";}else{$spiele[$i]["s_erg"] = "${row["g_g1"]} : ${row["g_g2"]}";}$spiele[$i]["link_id"] = $row["g_id"];$i++;}$smarty->assign("spiele", $spiele);}}$smarty->assign("title", $common["list_of_games"]);$smarty->display("index.tpl", CACHE_ID);?>