Esempio n. 1
0
 function UpdateTasksCache($contest_id, $problem_id)
 {
     if ($contest_id < 0) {
         $contest_id = $_SESSION['WT_contest_id'];
     }
     if (isset($this->cache['tasks'][$contest_id])) {
         return;
     }
     $t = arr_from_query("SELECT * FROM `tester_tasks` " . "WHERE `contest_id`={$contest_id}");
     $this->cache['tasks'][$contest_id] = $t;
 }
Esempio n. 2
0
 function GetProblemsAtContest($contest_id = -1)
 {
     if ($contest_id < 0) {
         $contest_id = $_SESSION['WT_contest_id'];
     }
     return arr_from_query('SELECT * FROM `tester_tasks` ' . 'WHERE `contest_id`=' . $contest_id . ' ORDER BY `letter`');
 }
Esempio n. 3
0
 function Categories_Get($contest_id = -1)
 {
     if ($contest_id < 0) {
         $contest_id = $_SESSION['WT_contest_id'];
     }
     return arr_from_query('SELECT * FROM `tester_categories` ' . 'WHERE `contest_id`=' . $contest_id . ' ORDER BY `order`');
 }
Esempio n. 4
0
 function user_get_groups($id)
 {
     return arr_from_query('SELECT `group_id` FROM `usergroup` ' . 'WHERE `user_id`=' . $id . '  GROUP BY `group_id`', 'group_id');
 }
Esempio n. 5
0
 function manage_dataset_get_fields($id)
 {
     return arr_from_query('SELECT * FROM `dataset_assoc` WHERE `dataset`=' . $id . ' ORDER BY `order`');
 }
Esempio n. 6
0
 function group_default_list()
 {
     return arr_from_query('SELECT * FROM `group` ' . 'WHERE `default`=1 ORDER BY `name`');
 }
Esempio n. 7
0
 function manage_service_get_list()
 {
     return arr_from_query('SELECT * FROM `service` ORDER BY `name`');
 }
Esempio n. 8
0
 function Editor_GetHistory()
 {
     $arr = array();
     if ($this->settings['content'] != '') {
         $arr = arr_from_query('SELECT `id`, `timestamp`, `user_id`, ' . '`ip` FROM ' . $this->settings['content'] . ' ORDER BY `id`');
     }
     return $arr;
 }
Esempio n. 9
0
 function manage_settings_get_section_elements($section)
 {
     return arr_from_query('SELECT * FROM `settings` WHERE `section`="' . $section . '" ORDER BY `name`');
 }