get_logic(); //ajutine //for($w = 22; $w <73; $w++) // $game->exec_sql("INSERT INTO dsg_calendar (week, week_offset) VALUES ($w, $w+3)"); $this->def_tplfile('maingame.tpl.php'); $this->add_comp('choices', 'choices', $game); //MainGame peaks nüüd siin otsustama mis ta igal konkreetsel juhul paneb topicali: $show = @$_GET['show']; //if (isset($show)) { if (isset($show) and is_object($this->add_comp($show, 'topical', $game))) { if (in_array($show, array('personal','relations'))) $_SESSION['game']['topical'] = $show; elseif (isset($_SESSION['game']['topical'])) unset($_SESSION['game']['topical']); } else { //ei öeldud show-d või mingi olematu nimi: if (isset($_SESSION['game']['topical'])) $this->add_comp($_SESSION['game']['topical'], 'topical', $game); else $this->set('topical', "[topical]"); //see mis vaikimisi } $this->add_comp('chronology', 'right', $game, 'chron'); $this->add_comp('pointstable', 'right', $game); $this->set('label', $game->label); $diary =& $game->get_diary(); $this->set('week', $diary->get_week()); $this->set('date', date("d.m.Y H:i:s", $diary->get_date() ) ); $this->set('weeks_left', $diary->get_weeks_left()); } } ?>