Beispiel #1
0
 public function edit()
 {
     view::set_col("maincol", "html/user/admin/award/edit.html");
     $cls = "model_award" . date("Y");
     app::$content['awards'] = $cls::get_all_entries();
     $cls = "model_player" . date("Y");
     app::$content['players'] = $cls::get_all_sorted();
 }
Beispiel #2
0
 public function show()
 {
     app::$content['months'] = $this->months;
     view::set_col("maincol", "html/user/all/signup/list.html");
     $cls = "model_signup" . date("Y");
     $list = $cls::get_public_valid_entries_by_month(intval(date("m")));
     // @XXX: temporary static month value
     $list = $cls::get_public_valid_entries_by_month(3);
     app::$content['subs'] = array();
     if (count($list) > 0) {
         if (count($list) >= 90) {
             // extract substitutes and splice array
             app::$content['subs'] = array_splice($list, 90);
             $list = array_splice($list, 0, 90);
         }
     }
     app::$content['signups'] = $list;
 }
Beispiel #3
0
 public function run()
 {
     // debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
     view::set_col("maincol", "html/user/admin/main/default.html");
     $this->generate_html_output();
 }
Beispiel #4
0
 public function show_settings()
 {
     view::set_col("maincol", "html/user/admin/settings/list.html");
 }
Beispiel #5
0
 private static function set_base_html_layout()
 {
     // debug::add_info("(".__FILE__.")<b>".__CLASS__."</b>::".__FUNCTION__."() betreten.");
     /**
      * @TODO: Standard-Template Elemente werden hier festgelegt
      */
     view::set_col("head", "html/core/head/head.html");
     view::set_special("logo", "html/core/head/logo.html");
     view::set_special("core", "html/core/core.html");
     view::set_special("inc", "browser/inc/inc.html");
     if (self::$session == "visitor") {
         if (self::$controller != "main_results" && self::$controller != "main_signup") {
             view::set_col("maincol", "html/login/login.html");
         }
         view::set_special("righthead", "html/core/head/navi_visitor.html");
     } else {
         view::set_special("righthead", "html/core/head/navi.html");
     }
     view::set_col("foot", "html/core/foot/foot.html");
     if (cfg::$debug) {
         view::set_special("debug", "browser/debug/debug.html");
     }
 }
Beispiel #6
0
 public function rankings()
 {
     view::set_col("maincol", "html/user/all/results/rankings.html");
     $cls = "mixed_upload" . date("Y");
     $gen = $cls::get_general_ranking();
     $gen2 = array();
     foreach ($gen as $rank) {
         $rank["months"] = array();
         for ($i = 1; $i <= intval(date("m")); $i++) {
             $m = $cls::get_points_by_player_month($rank['playername'], $i);
             $rank['months'][$i] = $m;
         }
         $gen2[] = $rank;
     }
     app::$content['general'] = $gen2;
     $monthly = array();
     for ($i = 1; $i <= intval(date("m")); $i++) {
         $month = date("F", strtotime(date("Y-{$i}-1")));
         $monthly[$month] = $cls::get_ranking_by_month($i);
     }
     app::$content['monthly'] = $monthly;
 }
Beispiel #7
0
 public function finaltable()
 {
     view::set_col("maincol", "html/user/admin/upload/final.html");
 }