本文整理汇总了PHP中Club类的典型用法代码示例。如果您正苦于以下问题:PHP Club类的具体用法?PHP Club怎么用?PHP Club使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Club类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: BuildPostedDataObject
/**
* @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);
}
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:14,代码来源:add-school-control.class.php
示例2: checkclash
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);
}
}
开发者ID:Britgo,项目名称:Online-League,代码行数:11,代码来源:updindclub2.php
示例3: OnPostback
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");
}
}
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:12,代码来源:add-school.php
示例4: findAll
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;
}
开发者ID:gdouezangrard,项目名称:basketball-matches,代码行数:14,代码来源:club_repository.php
示例5: store
/**
* 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();
}
开发者ID:illuminate3,项目名称:league-production,代码行数:54,代码来源:AdministratorClubController.php
示例6: fetch
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;
}
开发者ID:Astaen,项目名称:fredi,代码行数:16,代码来源:Member.php
示例7: showWeek
/**
* 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'));
}
开发者ID:gitter-badger,项目名称:lara-vedst,代码行数:42,代码来源:WeekController.php
示例8: getClub
/**
* @return Club
*/
public function getClub()
{
if (!$this->club) {
$this->club = Club::getByNefubId($this->club_nefub_id);
}
return $this->club;
}
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:10,代码来源:Team.php
示例9: vaultUpdate
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');
}
开发者ID:illuminate3,项目名称:league-production,代码行数:26,代码来源:AccountController.php
示例10: add
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='{$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;
}
}
开发者ID:Jawadh-Salih,项目名称:CrickServer,代码行数:30,代码来源:User.class.php
示例11: create
/**
* 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);
}
开发者ID:illuminate3,项目名称:league-production,代码行数:14,代码来源:PlayerController.php
示例12: popular
/**
* 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();";
}
开发者ID:nProfessor,项目名称:Mytb,代码行数:15,代码来源:popular.php
示例13: set_opponent
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);
}
}
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:12,代码来源:DataFixture.php
示例14: OnPageLoad
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
}
}
}
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:40,代码来源:clubdelete.php
示例15: parseDataToObject
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";
}
}
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:51,代码来源:DataPlayer.php
示例16: parse_past_fixtures
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";
}
}
}
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:14,代码来源:parse-past-fixtures.php
示例17: create_fixtures
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";
}
开发者ID:dpalecek,项目名称:epl-scraper,代码行数:15,代码来源:bootstrap-fixtures.php
示例18: BuildPostedDataObject
/**
* @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);
}
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:40,代码来源:team-edit-control.class.php
示例19: addClub
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='{$managerName}' 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);
}
开发者ID:Jawadh-Salih,项目名称:CrickServer,代码行数:17,代码来源:Club.class.php
示例20: listClubs
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);
}
开发者ID:qnck,项目名称:qingnianchuangke,代码行数:17,代码来源:OfficeClubController.php
注:本文中的Club类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论