<?php define('SE_PAGE_AJAX', TRUE); $page = "adm/adm_game_seasons_ajax"; include "adm_header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; // Get info (post only) $action = isset($_POST['action']) ? $_POST['action'] : null; // Must be logged in to use tasks below this section if (!$provider->provider_exists) { $result = array('success' => false, 'error' => 'access denied'); echo json_encode($result); die; } $provider_id = $provider->provider_info['provider_id']; $game_model = new se_game(); if ($action == 'get_season') { header("Content-Type: application/json"); $season_id = isset($_POST['season_id']) ? (int) $_POST['season_id'] : null; if ($season_id && $game_model->is_provider_season($provider_id, $season_id)) { $season = $game_model->get_season($season_id); $result = array('success' => true, 'season' => $season); } else { $result = array('success' => false, 'error' => 'season_id is null'); } echo json_encode($result); die; }
<?php /* $Id: cities.php 8 2011-01-11 Alex $ */ $page = "providers/gameprovider"; include "header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; include 'include/providers/class_gamecommand.php'; include 'include/class_city.php'; $provider_id = (int) $_GET['provider_id']; $user_id = $user->user_info['user_id']; // Модель поставщика $gameprovider = new se_gameprovider(); $game_model = new se_game(); $city_model = new se_city(); $command_model = new se_gamecommand(); $provider_info = $gameprovider->get_gameprovider($provider_id); $games = $game_model->get_current_games($provider_id); $city = $city_model->get_city($provider_info['city_id']); $commands = $command_model->get_available_commands($user_id); foreach ($games as &$game) { $game['game_sdate'] = date('d-m-Y, h:m', $game['game_sdate']); } $smarty->assign_by_ref('provider_info', $provider_info); $smarty->assign_by_ref('games', $games); $smarty->assign('city', $city['name']); $smarty->assign('user_id', $user_id); include "footer.php";
<?php $page = "adm/adm_games"; include "adm_header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; include 'include/providers/class_gamequestion.php'; $provider_id = $provider->provider_info['provider_id']; $game_model = new se_game(); $question_model = new se_gamequestion(); if (isset($_POST['action'])) { $action = $_POST['action']; if ($action == 'add_game') { /*echo '<pre>'; print_r($_POST); echo '</pre>'; die(); */ $season_id = isset($_POST['season_id']) ? (int) $_POST['season_id'] : null; $title = isset($_POST['title']) && trim($_POST['title']) ? trim($_POST['title']) : null; $intro = isset($_POST['intro']) && trim($_POST['intro']) ? trim($_POST['intro']) : null; $place = isset($_POST['place']) && trim($_POST['place']) ? trim($_POST['place']) : null; $legend = isset($_POST['legend']) && trim($_POST['legend']) ? trim($_POST['legend']) : null; $preqiel = isset($_POST['preqiel']) && trim($_POST['preqiel']) ? trim($_POST['preqiel']) : null; $price = isset($_POST['price']) ? (int) $_POST['price'] : null; $game_estatus = isset($_POST['game_estatus']) ? (int) $_POST['game_estatus'] : null; $game_sdate = isset($_POST['game_sdate']) ? (int) $_POST['game_sdate'] : null; $x = isset($_POST['x']) ? (int) $_POST['x'] : null; $y = isset($_POST['y']) ? (int) $_POST['y'] : null; if ($season_id && $title && $intro && $place && $price && $game_estatus && $game_sdate) { // Обработать лого $file_path = $GAME_IMAGES_PATH . $_FILES['logo']['name'];
<?php $page = "adm/adm_game_system"; include "adm_header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; include 'include/providers/class_gamequestion.php'; include 'include/providers/class_gamecommand.php'; $provider_id = $provider->provider_info['provider_id']; $game_model = new se_game(); $question_model = new se_gamequestion(); $command_model = new se_gamecommand(); // Управление ли одной конкретной игрой либо всеми текущими $games_id = array(); if (isset($_GET['game_id'])) { $games['games'][] = $game_model->get_game($_GET['game_id']); $games['print_count'] = count($games['games']); } else { $games['games'] = $game_model->get_current_games($provider_id); $games['print_count'] = count($games['games']); } if (isset($_POST['action'])) { $action = $_POST['action']; if ($action == 'add_question') { $question = isset($_POST['question']) && trim($_POST['question']) ? trim($_POST['question']) : null; $question_status = isset($_POST['question_status']) ? (int) $_POST['question_status'] : null; $question_is_necessary = $_POST['question_is_necessary'] ? 1 : 0; $command_id = isset($_POST['command_id']) ? (int) $_POST['command_id'] : null; $game_id = isset($_POST['game_id']) ? (int) $_POST['game_id'] : null; if ($question && $question_status && $game_id && $game_model->is_provider_game($provider_id, $game_id)) { $question_model->add_question($question, $question_status, $question_is_necessary, $game_id, $command_id);
<?php $page = "adm/adm_game_seasons"; include "adm_header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; $provider_id = $provider->provider_info['provider_id']; $game_model = new se_game(); if (isset($_POST['action'])) { $action = $_POST['action']; if ($action == 'add_season') { $number = isset($_POST['number']) ? (int) $_POST['number'] : null; $name = isset($_POST['name']) && trim($_POST['name']) ? trim($_POST['name']) : null; $description = isset($_POST['description']) && trim($_POST['description']) ? trim($_POST['description']) : null; if ($number && $name && $description) { $game_model->add_season($provider_id, $number, $name, $description); } } else { if ($action == 'update_season') { $season_id = isset($_POST['season_id']) ? (int) $_POST['season_id'] : null; $number = isset($_POST['number']) ? (int) $_POST['number'] : null; $name = isset($_POST['name']) && trim($_POST['name']) ? trim($_POST['name']) : null; $description = isset($_POST['description']) && trim($_POST['description']) ? trim($_POST['description']) : null; if ($season_id && $number && $name && $description && $game_model->is_provider_season($provider_id, $season_id)) { $game_model->update_season(null, $number, $name, $description, null, null, $season_id); } } else { if ($action == 'delete_season') { $season_id = isset($_POST['season_id']) ? (int) $_POST['season_id'] : null; // Необходимо сделать проверку, нашего ли поставщика этот сезон if ($season_id && $game_model->is_provider_season($provider_id, $season_id)) {
//$topics = $group->group_topic_list($page_vars_topics[0], $topics_per_page, "grouptopic_sticky DESC, grouptopic_date DESC"); // GET CUSTOM GROUP STYLE IF ALLOWED if ($group->groupowner_level_info['level_group_style'] && !$is_group_private) { $groupstyle_info = $database->database_fetch_assoc($database->database_query("SELECT groupstyle_css FROM se_groupstyles WHERE groupstyle_group_id='{$group->group_info['group_id']}' LIMIT 1")); $global_css = $groupstyle_info['groupstyle_css']; } // SET GLOBAL PAGE TITLE $global_page_title[0] = 2000312; $global_page_title[1] = $group->group_info['group_title']; $global_page_description[0] = 2000313; $global_page_description[1] = $group->group_info['group_desc']; // GET ACTIONS $actions_array = $actions->actions_display(0, $setting['setting_actions_actionsonprofile'], "se_actions.action_object_owner='group' AND se_actions.action_object_owner_id='{$group->group_info['group_id']}'"); $smarty->assign_by_ref('actions', $actions_array); // Игры команды $games = new se_game(); $gamescommand['past'] = $games->get_past_command_games($group->group_info['group_id']); $gamescommand['current'] = $games->get_current_command_games($group->group_info['group_id']); $gamescommand['future'] = $games->get_future_command_games($group->group_info['group_id']); // ASSIGN VARIABLES AND DISPLAY GROUP PAGE $smarty->assign_by_ref('group_groupcat_id', $group->group_info['group_groupcat_id']); $smarty->assign_by_ref('group', $group); $smarty->assign_by_ref('cats', $field->cats); $smarty->assign_by_ref('members', $members); $smarty->assign_by_ref('officers', $officers); $smarty->assign_by_ref('topics', $topics); $smarty->assign('gamescommand', $gamescommand); $smarty->assign('groupcat_info', $groupcat_info); $smarty->assign('total_comments', $total_comments); $smarty->assign('total_files', $total_files); $smarty->assign('is_group_private', $is_group_private);
$page = "adm/adm_game_system_ajax"; include "adm_header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; include 'include/providers/class_gamequestion.php'; include 'include/providers/class_gamecommand.php'; // Get info (post only) $action = isset($_POST['action']) ? $_POST['action'] : null; // Must be logged in to use tasks below this section if (!$provider->provider_exists) { $result = array('success' => false, 'error' => 'access denied'); echo json_encode($result); die; } $provider_id = $provider->provider_info['provider_id']; $game_model = new se_game(); $question_model = new se_gamequestion(); $command_model = new se_gamecommand(); if ($action == 'update_game_sstatus') { header("Content-Type: application/json"); $command_id = isset($_POST['command_id']) ? (int) $_POST['command_id'] : null; $game_id = isset($_POST['game_id']) ? (int) $_POST['game_id'] : null; $game_sstatus = isset($_POST['game_sstatus']) ? (int) $_POST['game_sstatus'] : null; $X = isset($_POST['x']) ? (int) $_POST['x'] : 0; if ($command_id && $game_id && $game_sstatus && $game_model->is_provider_game($provider_id, $game_id)) { $game_model->update_command_game_sstatus($game_sstatus, $command_id, $game_id, $X); $result = array('success' => true); } else { $result = array('success' => false, 'error' => 'game_id and command_id is null'); } echo json_encode($result);
<?php /* $Id: cities.php 8 2011-01-11 Alex $ */ $page = "providers/game"; include "header.php"; include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; include 'include/providers/class_gamequestion.php'; include 'include/providers/class_gamecommand.php'; include 'include/providers/class_gamepin.php'; include 'include/providers/class_gamechat.php'; $provider_id = (int) $_GET['provider_id']; // Модели $gameprovider_model = new se_gameprovider(); $game_model = new se_game(); $question_model = new se_gamequestion(); $command_model = new se_gamecommand(); $gamechat_model = new se_gamechat(); // Проверяем, мобильное ли уустройство /*$url = 'http://phd.yandex.net/detect'; $query = http_build_query( array( 'user-agent' => $_SERVER['HTTP_USER_AGENT'] //'wap-profile' => "http://www-ccpp-mpd.alcatel.com/files/ALCATEL-CTH3_MMS10_1.0.rdf", ) ); $mobile = file_get_contents($url . '?' . $query); if(strcmp($mobile, "<yandex-mobile-info-error>Unknown user agent and wap profile</yandex-mobile-info-error>") != 0)
include 'include/providers/class_gameprovider.php'; include 'include/providers/class_game.php'; include 'include/providers/class_gamequestion.php'; include 'include/providers/class_gamepin.php'; // Get info (post only) $action = isset($_POST['action']) ? $_POST['action'] : null; // Init param $messPin = -1; // Must be logged in to use tasks below this section if (!$provider->provider_exists) { $result = array('success' => false, 'error' => 'access denied'); echo json_encode($result); die; } $provider_id = $provider->provider_info['provider_id']; $game_model = new se_game(); $question_model = new se_gamequestion(); if ($action == 'get_game') { header("Content-Type: application/json"); $game_id = isset($_POST['game_id']) ? (int) $_POST['game_id'] : null; if ($game_id && $game_model->is_provider_game($provider_id, $game_id)) { $game = $game_model->get_game($game_id); $result = array('success' => true, 'game' => $game); } else { $result = array('success' => false, 'error' => 'game_id is null'); } echo json_encode($result); die; } else { if ($action == 'get_question') { header("Content-Type: application/json");
$area_id = isset($_POST['area_id']) ? $_POST['area_id'] : null; $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) {