예제 #1
0
 function Save($id)
 {
     $d = $this->ContestById($id);
     $lib = WT_spawn_new_library($d['lid']);
     if ($lib == nil) {
         return true;
     }
     $res = $lib->Contest_Save($id);
     $this->FillData();
     return $res;
 }
예제 #2
0
 function Handle()
 {
     global $WT_main_menu;
     content_url_var_push_global('page');
     if (wiki_admin_page()) {
         return false;
     }
     // Local handlers
     $handler = '';
     $n = count($WT_main_menu);
     for ($i = 0; $i < $n; $i++) {
         if ($WT_main_menu[$i][2] == $this->page) {
             $handler = $WT_main_menu[$i][3];
             break;
         }
     }
     if ($handler) {
         $this->{$handler}();
         return true;
     }
     // Library handlers
     $handler = $this->LIB_Handlers[$this->current_contest['lid']][$this->page];
     if (isset($handler)) {
         $lib = WT_spawn_new_library($this->current_contest['lid']);
         $lib->{$handler}();
     }
 }