/** * @return void * @desc Re-build from data posted by this control the data object this control is editing */ public function BuildPostedDataObject() { $school = new Club($this->GetSettings()); if (isset($_POST['item'])) { $school->SetId($_POST['item']); } $school->SetTypeOfClub(Club::SCHOOL); $school->SetName($_POST['school-name'] . ", " . $_POST["town"]); $this->SetDataObject($school); }
function checkclash($code) { $club = new Club($code); $ret = mysql_query("select code from club where {$club->queryof()}"); if ($ret && mysql_num_rows($ret) != 0) { $column = "code"; $value = $code; include 'php/nameclash.php'; exit(0); } }
function OnPostback() { $this->school = $this->edit->GetDataObject(); # save data if valid if ($this->IsValid()) { require_once "stoolball/clubs/club-manager.class.php"; $club_manager = new ClubManager($this->GetSettings(), $this->GetDataConnection()); $id = $club_manager->Save($this->school); $this->school->SetId($id); $this->Redirect($this->school->GetNavigateUrl() . "/edit"); } }
public function findAll() { $reponse = $this->db->query(self::FIND_ALL); $clubs = array(); while ($data = $reponse->fetch()) { $club = new Club(); $club->setId($data['NUMERO_CLUB']); $club->setNom($data['NOM_CLUB']); $club->setLocalisation($data['LOCALISATION']); array_push($clubs, $club); } $reponse->closeCursor(); return $clubs; }
/** * Store a newly created resource in storage. * POST /administratorclub * * @return Response */ public function store() { $uuid = Uuid::generate(); $validator = Validator::make(Input::all(), AdministratorClub::$rules); if ($validator->passes()) { $repo = App::make('UserRepository'); $user = $repo->signup(Input::all()); $role = Role::find(2); $user->attachRole($role); if ($user->id) { $profile = new Profile(); $profile->user_id = $user->id; $profile->firstname = Input::get('firstname'); $profile->lastname = Input::get('lastname'); $profile->mobile = Input::get('mobile'); $profile->avatar = '/img/coach-avatar.jpg'; $profile->save(); $club = new Club(); $club->id = $uuid; $club->name = Input::get('name'); $club->sport = 'lacrosse'; $club->phone = Input::get('contactphone'); $club->website = Input::get('website'); $club->email = Input::get('contactemail'); $club->add1 = Input::get('add1'); $club->city = Input::get('city'); $club->state = Input::get('state'); $club->zip = Input::get('zip'); $club->logo = Input::get('logo'); $club->waiver = Input::get('waiver'); $club->processor_user = Crypt::encrypt(Input::get('processor_user')); $club->processor_pass = Crypt::encrypt(Input::get('processor_pass')); $club->save(); $clubs = Club::find($uuid); $clubs->users()->save($user); if (Config::get('confide::signup_email')) { Mail::queueOn(Config::get('confide::email_queue'), Config::get('confide::email_account_confirmation'), compact('user'), function ($message) use($user) { $message->to($user->email, $user->username)->subject(Lang::get('confide::confide.email.account_confirmation.subject')); }); } return Redirect::action('UsersController@login')->with('notice', Lang::get('confide::confide.alerts.account_created')); } else { $error = $user->errors()->all(':message'); return Redirect::back()->withInput(Input::except('password'))->withErrors($error); } } return Redirect::back()->withErrors($validator)->withInput(); }
public function fetch($id) { $query = "SELECT * FROM club_member WHERE licence_num = " . $id; // var_dump($query); $bdd = new BDD(); $bdd = $bdd->connect(); $req = $bdd->query($query); $res = $req->fetch(); foreach ($res as $key => $value) { $this->{$key} = $value; } //get member's club $club = new Club(); $this->club = $club->fetch($this->id_club); return $this; }
/** * Generate the view of the week for given month and given year * with events in this period. * * @param string $year * @param string $week * @return view weekView * * */ public function showWeek($year, $week) { // Create week start date on monday (day 1) $weekStart = date('Y-m-d', strtotime($year . "W" . $week . '1')); // Create the number of the next week $nextWeek = date("W", strtotime("next Week" . $weekStart)); $nextYear = date("Y", strtotime("next Week" . $weekStart)); // Create week end date - we go till tuesday (day 2) because café needs alternative week view (Mi-Di) $weekEnd = date('Y-m-d', strtotime($nextYear . "W" . $nextWeek . '2')); // Create the number of the previous week $previousWeek = date("W", strtotime("previous Week" . $weekStart)); $previousYear = date("Y", strtotime("previous Week" . $weekStart)); // Convert number of prev/next week to verbatim format - needed for correct << and >> button links $nextWeek = $nextYear . "/KW" . $nextWeek; $previousWeek = $previousYear . "/KW" . $previousWeek; $date = array('year' => $year, 'week' => $week, 'weekStart' => $weekStart, 'weekEnd' => $weekEnd, 'nextWeek' => $nextWeek, 'previousWeek' => $previousWeek); $events = ClubEvent::where('evnt_date_start', '>=', $weekStart)->where('evnt_date_start', '<=', $weekEnd)->with('getPlace', 'getSchedule.getEntries.getJobType', 'getSchedule.getEntries.getPerson.getClub')->orderBy('evnt_date_start')->orderBy('evnt_time_start')->get(); $tasks = Schedule::where('schdl_show_in_week_view', '=', '1')->where('schdl_due_date', '>=', $weekStart)->where('schdl_due_date', '<=', $weekEnd)->with('getEntries.getPerson.getClub', 'getEntries.getJobType')->get(); // TODO: don't use raw query, rewrite with eloquent. $persons = Cache::remember('personsForDropDown', 10, function () { $timeSpan = new DateTime("now"); $timeSpan = $timeSpan->sub(DateInterval::createFromDateString('3 months')); return Person::whereRaw("prsn_ldap_id IS NOT NULL \n\t\t\t\t\t\t\t\t\t\t AND (prsn_status IN ('aktiv', 'kandidat') \n\t\t\t\t\t\t\t\t\t\t OR updated_at>='" . $timeSpan->format('Y-m-d H:i:s') . "')")->orderBy('clb_id')->orderBy('prsn_name')->get(); }); $clubs = Club::orderBy('clb_title')->lists('clb_title', 'id'); // IDs of schedules shown, needed for bulk-update $updateIds = array(); foreach ($events as $event) { array_push($updateIds, $event->getSchedule->id); } return View::make('weekView', compact('events', 'schedules', 'date', 'tasks', 'entries', 'weekStart', 'weekEnd', 'persons', 'clubs')); }
/** * @return Club */ public function getClub() { if (!$this->club) { $this->club = Club::getByNefubId($this->club_nefub_id); } return $this->club; }
public function vaultUpdate($id) { $user = Auth::user(); $follow = Follower::where("user_id", "=", $user->id)->FirstOrFail(); $club = Club::find($follow->club_id); $validator = Validator::make(Input::all(), Payment::$rules); if ($validator->passes()) { //validation done prior ajax $param = array('customer_vault_id' => $id, 'club' => $club->id, 'ccnumber' => Input::get('card'), 'ccexp' => sprintf('%02s', Input::get('month')) . Input::get('year'), 'cvv' => Input::get('cvv'), 'address1' => Input::get('address'), 'city' => Input::get('city'), 'state' => Input::get('state'), 'zip' => Input::get('zip')); $payment = new Payment(); $transaction = $payment->update_customer($param, $user); if ($transaction->response == 3 || $transaction->response == 2) { $data = array('success' => false, 'error' => $transaction); return $data; } else { //update user customer # $user->profile->customer_vault = $transaction->customer_vault_id; $user->profile->save(); //retrived data save from API - See API documentation $data = array('success' => true, 'customer' => $transaction->customer_vault_id, 'card' => substr($param['ccnumber'], -4), 'ccexp' => $param['ccexp'], 'zip' => $param['zip']); return Redirect::action('AccountController@settings')->with('notice', 'Payment information updated successfully'); } } return Redirect::back()->withErrors($validator)->withInput(); return Redirect::action('AccountController@settings'); }
static function add($username, $passwordRaw, $type, $name, $age, $club) { // $db = new DB(); $usernameAvailable = User::usernameExists($username); $clubnameAvailable = Club::clubnameExists($club); $password = hash('md5', $passwordRaw); if ($usernameAvailable == FALSE) { $res = $db->queryIns("INSERT INTO user(username,password,type) VALUES('{$username}','{$password}','{$type}')"); $u_id = $db->query("SELECT user_id FROM user WHERE username='******'")->fetch(PDO::FETCH_ASSOC); //->fetch(PDO::FETCH_ASSOC) $c_id = $db->query("SELECT club_id FROM club WHERE name = '{$club}'")->fetch(PDO::FETCH_ASSOC); $user_id = (int) $u_id['user_id']; $club_id = (int) $c_id['club_id']; $agein = (int) $age; var_dump($clubnameAvailable); if ($type == "player" and $clubnameAvailable == TRUE) { $res = $db->queryIns("INSERT INTO player (player_id,club_id,name,age) VALUES ({$user_id},{$club_id},'{$name}',{$agein})"); // } if ($type = "manager") { $res = $db->queryIns("INSERT INTO manager (manager_id,name,age) VALUES ({$user_id},'{$name}',{$agein})"); // this is ok. $result = $db->query("INSERT INTO club (manager_id,name) VALUES ({$user_id},'{$club}')"); var_dump($name); } } else { echo 0; } }
/** * Show the form for creating a new resource. * GET /player/create * * @return Response */ public function create() { $user = Auth::user(); $follow = Follower::where("user_id", "=", $user->id)->FirstOrFail(); $club = Club::find($follow->club_id); $title = 'League Together - Player'; return View::make('app.account.player.create')->with('page_title', $title)->with('club', $club)->withUser($user); }
/** * Created by JetBrains PhpStorm. * User: professor * Date: 28.10.12 * Time: 15:45 * To change this template use File | Settings | File Templates. */ function popular() { require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; CModule::IncludeModule("iblock"); CModule::IncludeModule("mytb"); Club::UpdatePopular(); return "popular();"; }
function set_opponent($opponent, $team) { $data = explode(" (", $opponent); if (strpos($data[1], "H") !== false) { // home game $this->set_home_team($team); $this->set_away_team(Club::get_club_id($data[0])); } else { $this->set_home_team(Club::get_club_id($data[0])); $this->set_away_team($team); } }
function OnPageLoad() { echo new XhtmlElement('h1', Html::Encode('Delete club: ' . $this->data_object->GetName())); if ($this->deleted) { ?> <p>The club has been deleted.</p> <p><a href="/play/clubs/">View all clubs</a></p> <?php } else { if ($this->has_permission) { ?> <p>Deleting a club cannot be undone.</p> <p>Are you sure you want to delete this club?</p> <form action="<?php echo Html::Encode($this->data_object->GetDeleteClubUrl()); ?> " method="post" class="deleteButtons"> <div> <input type="submit" value="Delete club" name="delete" /> <input type="submit" value="Cancel" name="cancel" /> </div> </form> <?php $this->AddSeparator(); require_once 'stoolball/user-edit-panel.class.php'; $panel = new UserEditPanel($this->GetSettings(), 'this club'); $panel->AddLink('view this club', $this->data_object->GetNavigateUrl()); $panel->AddLink('edit this club', $this->data_object->GetEditClubUrl()); echo $panel; } else { ?> <p>Sorry, you're not allowed to delete this club.</p> <p><a href="<?php echo Html::Encode($this->data_object->GetNavigateUrl()); ?> ">Go back to the club</a></p> <?php } } }
public function parseDataToObject($data) { try { $this->set_transfersOut($data->transfers_out); $this->set_playerCode($data->code); $this->set_eventTotal($data->event_total); $this->set_lastSeasonPoints($data->last_season_points); $this->set_squadNumber($data->squad_number); $this->set_newsUpdated($data->news_updated); $this->set_eventCost($data->event_cost); $this->set_newsAdded($data->news_added); $this->set_webName($data->web_name); $this->set_inDreamTeam($data->in_dreamteam); $this->set_teamCode($data->team_code); $this->set_id($data->id); $this->set_shirtImageUrl($data->shirt_image_url); $this->set_firstName($data->first_name); $this->set_transfersOutEvent($data->transfers_out_event); $this->set_elementTypeId($data->element_type_id); $this->set_maxCost($data->max_cost); $this->set_eventExplain($data->event_explain); $this->set_selected($data->selected); $this->set_minCost($data->min_cost); $this->set_totalPoints($data->total_points); $this->set_typeName($data->type_name); $this->set_teamName($data->team_name); $this->set_status($data->status); $this->set_added($data->added); $this->set_form($data->form); $this->set_shirtMobileImageUrl($data->shirt_mobile_image_url); $this->set_currentFixture($data->current_fixture); $this->set_nowCost($data->now_cost); $this->set_pointsPerGame($data->points_per_game); $this->set_transfersIn($data->transfers_in); $this->set_news($data->news); $this->set_originalCost($data->original_cost); $this->set_eventPoints($data->event_points); $this->set_newsReturn($data->news_return); $this->set_nextFixture($data->next_fixture); $this->set_transfersInEvent($data->transfers_in_event); $this->set_selectedBy($data->selected_by); $this->set_teamId(Club::get_club_id($this->get_teamName())); $this->set_secondName($data->second_name); $this->set_photoMobileUrl($data->photo_mobile_url); $this->set_fixtures($data->fixtures->all, $this->get_teamId()); $this->set_seasonHistory($data->season_history); $this->set_fixtureHistory($data->id, $data->fixture_history->all); } catch (Exception $e) { echo "Exception occured"; } }
function parse_past_fixtures($allData) { foreach ($allData as $data) { $players = array(59936, 1882, 66797, 15144, 11334, 11554, 15337, 10318, 12390, 15749, 51940, 20480, 19236, 18726, 40349, 20531, 39215, 37915, 9089, 42525); if (in_array((int) $data->code, $players)) { $history = $data->fixture_history->all; foreach ($history as $game) { $fixture = new DataHistoricalFixture($game, Club::get_club_id($data->team_name)); $fixture->save(); } echo "Parsed fixtures for {$data->team_name}\n"; } } }
function create_fixtures() { echo "Bootstraping Fixtures...\n"; $clubs = Club::get_clubs(); while (sizeof($clubs) > 1) { $club = array_pop($clubs); echo "Processing " . $club["name"] . "\n"; foreach ($clubs as $c) { DB::insertUpdate('fixture', array("home_team" => $club["id"], "away_team" => $c["id"])); DB::insertUpdate('fixture', array("home_team" => $c["id"], "away_team" => $club["id"])); } } echo "Processing " . $clubs[0]["name"] . "\n"; echo "Initial fixtures created.\n"; }
/** * @return void * @desc Re-build from data posted by this control the data object this control is editing */ function BuildPostedDataObject() { $team = new Team($this->GetSettings()); if (isset($_POST['item'])) { $team->SetId($_POST['item']); } if (isset($_POST['name'])) { $team->SetName($_POST['name']); } $team->SetWebsiteUrl($_POST['websiteUrl']); $team->SetIsActive(isset($_POST['playing'])); $team->SetIntro(ucfirst(trim($_POST['intro']))); $team->SetPlayingTimes($_POST['times']); $team->SetCost($_POST['yearCost']); $team->SetContact($_POST['contact']); $team->SetPrivateContact($_POST['private']); $ground = new Ground($this->GetSettings()); $ground->SetId($_POST['ground']); $team->SetGround($ground); if (isset($_POST['team_type'])) { $team->SetTeamType($_POST['team_type']); if ($team->GetTeamType() == Team::SCHOOL_YEARS) { $team->SetSchoolYears(array(1 => isset($_POST['year1']), 2 => isset($_POST['year2']), 3 => isset($_POST['year3']), 4 => isset($_POST['year4']), 5 => isset($_POST['year5']), 6 => isset($_POST['year6']), 7 => isset($_POST['year7']), 8 => isset($_POST['year8']), 9 => isset($_POST['year9']), 10 => isset($_POST['year10']), 11 => isset($_POST['year11']), 12 => isset($_POST['year12']))); } } if ($this->is_admin) { $team->SetShortUrl($_POST[$this->GetNamingPrefix() . 'ShortUrl']); $team->SetPlayerType($_POST['playerType']); if (isset($_POST['club']) and is_numeric($_POST['club'])) { $club = new Club($this->GetSettings()); $club->SetId($_POST['club']); $team->SetClub($club); } } $this->SetDataObject($team); }
static function addClub($clubname, $managerName) { $db = new DB(); var_dump($clubname); var_dump($managerName); $clubNameAvailable = Club::clubnameExists($clubname); //var_dump($clubNameAvailable);echo "<br>"; $m_id = $db->query("SELECT user_id FROM user WHERE username='******' AND type='manager'")->fetch(PDO::FETCH_ASSOC); //var_dump($m_id);echo "<br>"; $manager_id = (int) $m_id["user_id"]; var_dump($manager_id); if ($clubNameAvailable == FALSE) { // if club name is not available then can add as the manager. $res = $db->queryIns("INSERT INTO club (manager_id,name) VALUES ({$manager_id},'{$clubname}')"); } var_dump($res); }
public function listClubs() { $per_page = Input::get('per_page', 100000); try { $list = Club::with(['user'])->paginate($per_page); $data = []; $data['rows'] = []; foreach ($list as $key => $club) { $data['rows'][] = $club->showInList(); } $data['total'] = $list->getTotal(); $re = Tools::reTrue('获取社团成功', $data); } catch (Exception $e) { $re = Tools::reFalse($e->getCode(), '获取社团失败:' . $e->getMessage()); } return Responce::json($re); }
public static function get_fixture_id($round, $date, $team) { $query = "SELECT id FROM fixture WHERE gameweek = %d AND kickoff_time = %s AND"; $team = explode(" ", $team); $team = explode("(", $team[0]); $team_id = Club::get_club_id_by_short($team[0]); if (strpos($team[1], "A") === false) { // playing at home $query = $query . " away_team = %d"; } else { // playing away $query = $query . " home_team = %d"; } $query = $query . " LIMIT 1"; $result = DB::query($query, $round, Fixture::convert_kickoff_time($date), $team_id); if (sizeof($result) == 1) { return (int) $result[0]['id']; } return false; }
public function run() { DB::table('clubs')->delete(); Club::create(array('nom' => '---', 'nomcourt' => '---', 'region_id' => 1)); Club::create(array('nom' => 'Golf club de Rigenée', 'nomcourt' => 'Rigenée', 'region_id' => 4)); Club::create(array('nom' => 'Golf Club de Pierpont', 'nomcourt' => 'Pierpont', 'region_id' => 4)); Club::create(array('nom' => 'Royal Golf Club de Waterloo', 'nomcourt' => 'Waterloo', 'region_id' => 4)); Club::create(array('nom' => 'Golf de Bondues', 'nomcourt' => 'Bondues', 'region_id' => 33)); Club::create(array('nom' => 'Golf de Lille-Métropole', 'nomcourt' => 'Lille Métropole', 'region_id' => 33)); Club::create(array('nom' => 'Golf du Grand-Ducal', 'nomcourt' => 'Grand Ducal', 'region_id' => 41)); DB::table('parcours')->delete(); Parcour::create(array('club_id' => 1, 'nom' => '---', 'nbtrous' => 18)); Parcour::create(array('club_id' => 2, 'nom' => 'Rigenée', 'nbtrous' => 18)); Parcour::create(array('club_id' => 3, 'nom' => 'Grand Pierpont', 'nbtrous' => 18)); Parcour::create(array('club_id' => 4, 'nom' => 'La Marache', 'nbtrous' => 18)); Parcour::create(array('club_id' => 4, 'nom' => 'Le Lion', 'nbtrous' => 18)); Parcour::create(array('club_id' => 4, 'nom' => 'Bois Héros', 'nbtrous' => 9)); Parcour::create(array('club_id' => 5, 'nom' => 'Hawtree', 'nbtrous' => 18)); Parcour::create(array('club_id' => 5, 'nom' => 'Trent Jones', 'nbtrous' => 18)); Parcour::create(array('club_id' => 6, 'nom' => 'Lille-Métropole', 'nbtrous' => 18)); Parcour::create(array('club_id' => 7, 'nom' => 'Grand-Ducal', 'nbtrous' => 18)); }
function set_opponent($opponent, $team) { $data = explode(" ", $opponent); $opp = explode("(", $data[0]); if (strpos($opp[1], "H") !== false) { // home game $this->set_home_team($team); $this->set_away_team(Club::get_club_id_by_short($opp[0])); } else { $this->set_home_team(Club::get_club_id_by_short($opp[0])); $this->set_away_team($team); } // f*****g retarded api have to do this shit... if (sizeof($data) == 2) { // fixture played $goals = explode("-", $data[1]); if (sizeof($goals) == 1) { // cant set goals since game hasnt been played for the round $this->set_played(0); $this->set_home_goals(NULL); $this->set_away_goals(NULL); return; } else { $this->set_played(1); } if ($this->get_home_team() == $team) { // 1-0 home win $this->set_home_goals((int) $goals[0]); $this->set_away_goals((int) $goals[1]); } else { //0-1 away loss $this->set_home_goals((int) $goals[1]); $this->set_away_goals((int) $goals[0]); } } }
<?php /** * User: Олег * Data: 11.06.12 22:56 * Site: http://sForge.ru **/ require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; CModule::IncludeModule("iblock"); CModule::IncludeModule("mytb"); die; $res = Club::getList(array(), array(), false, false, array("ID", "PROPERTY_ADDRESS", "PROPERTY_PHONE")); $i = 0; while ($row = $res->Fetch()) { foreach ($row["PROPERTY_ADDRESS_VALUE"] as $var) { $obj = json_decode(file_get_contents("http://geocode-maps.yandex.ru/1.x/?geocode=" . urlencode(trim($var)) . "&format=json")); list($LAT, $LON) = explode(" ", $obj->response->GeoObjectCollection->featureMember[0]->GeoObject->Point->pos); MyTbCore::Add(array("CLUB_ID" => $row["ID"], "SITY_ID" => 1, "LON" => $LON, "LAT" => $LAT, "ADDRESS" => $var, "PHONE" => serialize((array) $row["PROPERTY_PHONE_VALUE"])), "address"); } $i++; } echo $i;
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } CModule::IncludeModule("iblock"); global $USER; $tableID = (int) $arParams["TABLE_ID"]; $Club = Club::getOBonTheUserID($USER->GetID()); $arTable = $Club->table()->getInfo($tableID, array("arSelect" => array("NAME", "PREVIEW_PICTURE"))); $arResult['arTable'] = $arTable; $this->IncludeComponentTemplate();
<?php require_once './utilities/Club.class.php'; $club = filter_input(INPUT_POST, 'club'); $club = $_GET['club']; echo Club::clubnameExists($club);
/** * * @param int $nefubId */ public function showClub($nefubId) { $this->subdirectory = '/club'; $this->path = '/' . $nefubId; $this->template = '/club/club.tpl'; if ($this->getClearRender()) { $oClub = Club::getByNefubId($nefubId); if ($oClub) { $competitionGenders = array('Heren', 'Dames', 'Mixed'); $aCompetitions = array(); foreach ($competitionGenders as $competitionGender) { $oGender = Gender::getByNefubName($competitionGender); $aGenreCompetitions = Competition::getAll(array('gender_id' => $oGender->getId(), 'season_nefub_id' => $this->season->nefub_id), 'genre_id`,`name'); $aCompetitions = array_merge($aCompetitions, $aGenreCompetitions); } $aCompetitionTeams = array(); foreach ($aCompetitions as $oCompetition) { $aTeams = Team::getAll(array('competition_nefub_id' => $oCompetition->nefub_id, 'club_nefub_id' => $oClub->nefub_id, 'season_nefub_id' => $oCompetition->season_nefub_id), 'name'); if (count($aTeams)) { $aCompetitionTeams[] = array('competition' => $oCompetition, 'teams' => $aTeams); } } $this->assign('oClub', $oClub); $this->assign('aCompetitionTeams', $aCompetitionTeams); } else { $this->redirect(); } } $this->showOutput(); }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== TRUE) { die; } CModule::IncludeModule("iblock"); global $USER; $obUser = new User($USER::GetID()); $user_props = $obUser->getProps(array("PROPERTY_CLUB")); $clubID = intval($user_props['PROPERTY_CLUB_VALUE']); $club = new Club($clubID); if (!empty($_POST['NAME'])) { $events = new Event($clubID); $id = (int) $events->add(array("NAME" => trim(strip_tags($_POST['NAME'])), "ACTIVE" => "N")); header("Location: /personal/club/event/" . $id); die; } $resStockList = $club->getListEventManager("Y", array("nPageSize" => 33, "bShowAll" => false)); while ($ar = $resStockList->Fetch()) { $arList[] = $ar; } $arResult['arList'] = $arList; $arResult['club']['ID'] = $clubID; $arResult["NAV_STRING"] = $resStockList->GetPageNavStringEx($navComponentObject, "", "modern"); $this->IncludeComponentTemplate();
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } CModule::IncludeModule("iblock"); global $USER; $arGroupPrice = array(); $Club = Club::getOBonTheUserID($USER->GetID()); if ($_POST['CLUB']) { if (!empty($_POST['CLUB']['NAME'])) { $clubID = Club::getClubID($USER->GetID()); $el = new CIBlockElement(); $PROP = array(); $PROP["PHONE"] = trim(strip_tags($_POST['CLUB']['PHONE'])); $PROP["ADDRESS"] = trim(strip_tags($_POST['CLUB']['ADDRESS'])); $PROP["METRO"] = trim(strip_tags($_POST['CLUB']['METRO'])); $PROP["SITE"] = trim(strip_tags($_POST['CLUB']['SITE'])); $PROP["PRICE_COCKTAIL"] = trim($_POST['CLUB']['PRICE_COCKTAIL']); $PROP["TIME_WORKING"] = trim($_POST['CLUB']['TIME_WORKING']); // "PROPERTY_TYPE_FACILITY"=>trim($_POST['CLUB']['TYPE_FACILITY']), // "PROPERTY_MUSIC"=>trim($_POST['CLUB']['MUSIC']), // "PROPERTY_FACE_CONTROL"=>trim($_POST['CLUB']['FACE_CONTROL']), // "PROPERTY_DRESS_CODE"=>trim($_POST['CLUB']['DRESS_CODE']), // "PROPERTY_EMAIL_MANAGER"=>trim($_POST['CLUB']['EMAIL_MANAGER']), // "PROPERTY_AVERAGE_TICKET"=>trim($_POST['CLUB']['AVERAGE_TICKET']), $arLoadProductArray = array("MODIFIED_BY" => $USER->GetID(), "NAME" => trim(strip_tags($_POST['CLUB']['NAME'])), "DETAIL_TEXT" => trim($_POST['CLUB']['DETAIL_TEXT']), "PROPERTY_VALUES" => $PROP); $res = $el->Update($clubID, $arLoadProductArray); } } $arField = $Club->getInfo(array("arSelect" => array("ID", "PROPERTY_PLAN", "NAME", "PREVIEW_PICTURE", "DETAIL_TEXT", "PROPERTY_PHONE", "PROPERTY_ADDRESS", "PROPERTY_METRO", "PROPERTY_SITE", "PROPERTY_PRICE_COCKTAIL", "PROPERTY_TYPE_FACILITY", "PROPERTY_MUSIC", "PROPERTY_FACE_CONTROL", "PROPERTY_DRESS_CODE", "PROPERTY_TIME_WORKING", "PROPERTY_EMAIL_MANAGER", "PROPERTY_AVERAGE_TICKET"), "arFilter" => array()), true);
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== TRUE) { die; } CModule::IncludeModule("iblock"); global $USER; $NEWS_ID = $arParams["NEWS_ID"]; $club = new Club($CLUB_ID); $news = News::getInfoStatic($NEWS_ID)->GetNext(); $arResult['news'] = $news; $club = new Club($news['PROPERTY_CLUB_ID_VALUE']); $arResult['club'] = $club->getInfo(array("arSelect" => array("NAME", "ID", "PROPERTY_TYPE_FACILITY"))); $APPLICATION->SetTitle($arResult['club']['NAME'] . ": " . $news['NAME']); $this->IncludeComponentTemplate();