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; }
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`'); }
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`'); }
function user_get_groups($id) { return arr_from_query('SELECT `group_id` FROM `usergroup` ' . 'WHERE `user_id`=' . $id . ' GROUP BY `group_id`', 'group_id'); }
function manage_dataset_get_fields($id) { return arr_from_query('SELECT * FROM `dataset_assoc` WHERE `dataset`=' . $id . ' ORDER BY `order`'); }
function group_default_list() { return arr_from_query('SELECT * FROM `group` ' . 'WHERE `default`=1 ORDER BY `name`'); }
function manage_service_get_list() { return arr_from_query('SELECT * FROM `service` ORDER BY `name`'); }
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; }
function manage_settings_get_section_elements($section) { return arr_from_query('SELECT * FROM `settings` WHERE `section`="' . $section . '" ORDER BY `name`'); }