if ($help) { $question_model->add_help($question_id, $help, $help_status, $x); } } } } } } } } } } } } } $games['future']['games'] = $game_model->get_future_games($provider_id); $games['current']['games'] = $game_model->get_current_games($provider_id); $games['past']['games'] = $game_model->get_past_games($provider_id); // Добавляем задания, приводим даты в порядок foreach ($games as &$game_type) { foreach ($game_type['games'] as &$game) { // 1 $game['questions']['questions'] = $question_model->get_global_questions($game['game_id']); $game['questions']['print_count'] = count($game['questions']['questions']); // 2 if ($game['game_sdate']) { $game['game_sdate'] = date('d-m-Y H:i', $game['game_sdate']); } if ($game['game_edate']) { $game['game_edate'] = date('d-m-Y H:i', $game['game_edate']); }
$regions = $city_model->get_regions($area_id); foreach ($regions as $region) { echo '<option value="' . $region['region_id'] . '">' . $region['name'] . '</option>'; } die; } else { if ($action == 'get_provider') { $prefix_table = isset($_POST['prefix_table']) ? $_POST['prefix_table'] : null; $provider_id = isset($_POST['provider_id']) ? $_POST['provider_id'] : null; if ($prefix_table && $provider_id) { $provider = $provider_model->get_provider($prefix_table, $provider_id); $subcategory = $provider_model->get_subcategory_by_prefix_table($prefix_table); if ($prefix_table == 'game') { include 'include/providers/class_game.php'; $game_model = new se_game(); $offers = $game_model->get_future_games($provider_id); $offer_link = 'go'; $offer_id = 'game_id'; } else { die; } $result = "<div class='popup-close-button' onclick='javascript:close_popup(\"#" . $prefix_table . "-" . $provider_id . "\");'></div>"; $result .= "<table class='item-table' style='width: 100%;'>"; if ($provider['adress']) { $result .= "<tr>\r\n <td class='left-column'>Адрес:</td>\r\n <td class='right-column'>" . $provider['adress'] . "</td>\r\n </tr>"; } if ($provider['timetable']) { $result .= "<tr>\r\n <td class='left-column'>График работы:</td>\r\n <td class='right-column'>" . $provider['timetable'] . "</td>\r\n </tr>"; } if ($subcategory) { $result .= "<tr>\r\n <td class='left-column'>Категория:</td>\r\n <td class='right-column'><a href='#'>" . $subcategory['name'] . "</a></td>\r\n </tr>";