PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- public function confirm () {
- $this->load->helper('date');
- $this->load->helper('user_date');
- // Создаем необходимые переменные
- // Делаем запрос турниров, пока что без всяких проверок
- $tournaments = $this->dyn_tournaments->tournaments_to_change_or_grid_generation($now)->result_array();
- //$this->generate_grid (1);
- // Делаем цикл для разборки турниров
- foreach ($tournaments as $key=>$value) {
- if($tournaments[$key]['status'] == 2 OR $tournaments[$key]['status'] == 3){
- $matches = $this->dyn_tournaments->get_all_matchs_in_tour_user($tournaments[$key]['id']);
- if($matches->num_rows() > 0) {
- continue;
- //$this->generate_grid($tournaments[$key]['id']);
- } else {
- // Генерируем таблицу
- $this->generate_grid($tournaments[$key]['id']);
- //$status = 0;
- //echo $tournaments[$key]['status']."<br />";
- }
- }
- }
- 'now' => $now,
- 'tournaments' => $tournaments
- );
- $this->template->load_view('confirm', $data);
- }