function OnPageLoad() { echo new XhtmlElement('h1', $this->GetPageTitle()); $this->editor->SetDataObject($this->user); echo $this->editor; parent::OnPageLoad(); }
function OnPageLoad() { echo new XhtmlElement('h1', Html::Encode($this->GetPageTitle())); # display the club $o_club = is_object($this->o_club) ? $this->o_club : new Club($this->GetSettings()); $this->o_edit->SetDataObject($o_club); echo $this->o_edit; parent::OnPageLoad(); }
function OnPageLoad() { echo new XhtmlElement('h1', $this->GetPageTitle()); # display the ground $ground = is_object($this->ground) ? $this->ground : new Ground($this->GetSettings()); $this->editor->SetDataObject($ground); echo $this->editor; parent::OnPageLoad(); }
function OnPageLoad() { echo new XhtmlElement('h1', Html::Encode($this->GetPageTitle())); # display the competition $o_competition = is_object($this->o_competition) ? $this->o_competition : new Competition($this->GetSettings()); $this->o_edit->SetDataObject($o_competition); echo $this->o_edit; parent::OnPageLoad(); }
function OnPageLoad() { echo new XhtmlElement('h1', Html::Encode($this->GetPageTitle())); if (!is_object($this->role)) { $this->role = new Role(); } $this->editor->SetDataObject($this->role); echo $this->editor; parent::OnPageLoad(); }
function OnPageLoad() { if (!$this->tournament instanceof Match or !$this->b_is_tournament) { http_response_code(404); require_once $_SERVER['DOCUMENT_ROOT'] . "/wp-content/themes/stoolball/section-404.php"; return; } echo new XhtmlElement('h1', Html::Encode($this->GetPageTitle())); $this->editor->SetDataObject($this->tournament); echo $this->editor; parent::OnPageLoad(); }
function OnPageLoad() { if (!$this->tournament instanceof Match or !$this->b_is_tournament) { http_response_code(404); require_once $_SERVER['DOCUMENT_ROOT'] . "/wp-content/themes/stoolball/section-404.php"; return; } echo new XhtmlElement('h1', htmlentities($this->GetPageTitle(), ENT_QUOTES, "UTF-8", false)); # check permission if (!$this->b_user_is_match_admin and !$this->b_user_is_match_owner) { ?> <p>Sorry, you can't edit a tournament unless you added it.</p> <p><a href="<?php echo htmlentities($this->tournament->GetNavigateUrl(), ENT_QUOTES, "UTF-8", false); ?> ">Go back to tournament</a></p> <?php return; } # OK to edit the match $o_match = is_object($this->tournament) ? $this->tournament : new Match($this->GetSettings()); $this->editor->SetDataObject($o_match); echo $this->editor; echo '<p class="facebook-tournaments">You can also list your tournament on the <a href="https://www.facebook.com/groups/1451559361817258/">Sussex Stoolball tournaments Facebook group</a>.</p>'; parent::OnPageLoad(); }
function OnPageLoad() { if (!$this->tournament instanceof Match or !$this->b_is_tournament) { http_response_code(404); require_once $_SERVER['DOCUMENT_ROOT'] . "/wp-content/themes/stoolball/section-404.php"; return; } echo new XhtmlElement('h1', Html::Encode($this->GetPageTitle())); # check permission if (!$this->b_user_is_match_admin and !$this->b_user_is_match_owner) { ?> <p>Sorry, you can't edit a tournament unless you added it.</p> <p><a href="<?php echo Html::Encode($this->tournament->GetNavigateUrl()); ?> ">Go back to tournament</a></p> <?php return; } # OK to edit the match $o_match = is_object($this->tournament) ? $this->tournament : new Match($this->GetSettings()); $this->editor->SetDataObject($o_match); echo $this->editor; parent::OnPageLoad(); }
function OnPageLoad() { echo new XhtmlElement('h1', Html::Encode($this->club->GetName())); $a_teams = $this->club->GetItems(); if (count($a_teams) > 0) { echo new TeamListControl($a_teams); } if ($this->club->GetClubmarkAccredited()) { ?> <p><img src="/images/logos/clubmark.png" alt="Clubmark accredited" width="150" height="29" /></p> <p>This is a <a href="http://www.sportenglandclubmatters.com/club-mark/">Clubmark accredited</a> stoolball club.</p> <?php } $has_facebook_group_url = ($this->club->GetFacebookUrl() and strpos($this->club->GetFacebookUrl(), '/groups/') !== false); $has_facebook_page_url = ($this->club->GetFacebookUrl() and !$has_facebook_group_url); if ($has_facebook_page_url) { $this->ShowFacebookPage($this->club->GetFacebookUrl(), $this->club->GetName()); } if ($has_facebook_group_url or $this->club->GetTwitterAccount() or $this->club->GetInstagramAccount()) { ?> <div class="social screen"> <?php if ($has_facebook_group_url) { ?> <a href="<?php echo Html::Encode($this->club->GetFacebookUrl()); ?> " class="facebook-group"><img src="/images/play/find-us-on-facebook.png" alt="Find us on Facebook" width="137" height="22" /></a> <?php } if ($this->club->GetTwitterAccount()) { ?> <a href="https://twitter.com/<?php echo Html::Encode(substr($this->club->GetTwitterAccount(), 1)); ?> " class="twitter-follow-button">Follow <?php echo Html::Encode($this->club->GetTwitterAccount()); ?> </a> <script src="https://platform.twitter.com/widgets.js"></script> <?php } if ($this->club->GetInstagramAccount()) { ?> <a href="https://www.instagram.com/<?php echo Html::Encode(trim($this->club->GetInstagramAccount(), '@')); ?> /?ref=badge" class="instagram"><img src="//badges.instagram.com/static/images/ig-badge-view-24.png" alt="Instagram" /></a> <?php } ?> </div> <?php } $can_edit = AuthenticationManager::GetUser()->Permissions()->HasPermission(PermissionType::MANAGE_TEAMS); if ($can_edit or $has_facebook_page_url) { $this->AddSeparator(); } if ($can_edit) { $club_or_school = $this->club->GetTypeOfClub() == Club::SCHOOL ? "school" : "club"; require_once 'stoolball/user-edit-panel.class.php'; $panel = new UserEditPanel($this->GetSettings(), "this {$club_or_school}"); $panel->AddLink("edit this {$club_or_school}", $this->club->GetEditClubUrl()); if ($this->club->GetTypeOfClub() == Club::SCHOOL) { $panel->AddLink("edit this school as a club", $this->club->GetEditClubUrl() . "/club"); } $panel->AddLink("delete this {$club_or_school}", $this->club->GetDeleteClubUrl()); echo $panel; } parent::OnPageLoad(); }
function OnPageLoad() { /* @var $season Season */ echo new XhtmlElement('h1', htmlentities($this->GetPageTitle(), ENT_QUOTES, "UTF-8", false)); # display the season if (!is_object($this->season)) { $this->season = new Season($this->GetSettings()); if (isset($_GET['competition'])) { $comp = new Competition($this->GetSettings()); $comp->SetId($_GET['competition']); $this->season->SetCompetition($comp); } /* Create instruction panel */ $panel = new XhtmlElement('div'); $panel->SetCssClass('panel instructionPanel'); $title_inner1 = new XhtmlElement('div', 'Tips for adding seasons'); $title = new XhtmlElement('h2', $title_inner1); $panel->AddControl($title); $tab_tip = new XhtmlElement('ul'); $tab_tip->AddControl(new XhtmlElement('li', "You'll be able to edit more details after you click 'Save'")); $panel->AddControl($tab_tip); echo $panel; } $this->edit->SetDataObject($this->season); echo $this->edit; parent::OnPageLoad(); }
function OnPageLoad() { echo '<h1>' . htmlentities($this->GetPageTitle(), ENT_QUOTES, "UTF-8", false) . '</h1>'; if (is_object($this->match)) { echo "<p>Thank you. You have added the following match:</p>"; echo new MatchListControl(array($this->match)); echo "<p>Don't worry if you made a mistake, just <a href=\"" . htmlentities($this->match->GetEditNavigateUrl(), ENT_QUOTES, "UTF-8", false) . '">edit this match</a> or <a href="' . htmlentities($this->match->GetDeleteNavigateUrl(), ENT_QUOTES, "UTF-8", false) . '">delete this match</a>.</p>'; $this->edit->SetHeading('Add another {0}'); # Configure edit control $this->edit->SetCssClass('panel addAnotherPanel'); } else { /* Create instruction panel */ $o_panel = new XhtmlElement('div'); $o_panel->SetCssClass('panel instructionPanel large'); $o_title_inner1 = new XhtmlElement('div', 'Add your matches quickly:'); $o_title = new XhtmlElement('h2', $o_title_inner1); $o_panel->AddControl($o_title); $o_tab_tip = new XhtmlElement('ul'); $o_tab_tip->AddControl(new XhtmlElement('li', 'Use the <span class="tab">tab</span> key on your keyboard to move through the form')); $o_tab_tip->AddControl(new XhtmlElement('li', 'Type the first letter or number to select from a dropdown list')); if ($this->i_match_type != MatchType::TOURNAMENT_MATCH) { $o_tab_tip->AddControl(new XhtmlElement('li', 'If you\'re not sure when the match starts, leave the time blank')); } $o_panel->AddControl($o_tab_tip); echo $o_panel; # Configure edit control $this->edit->SetCssClass('panel'); } # display the match to edit echo $this->edit; parent::OnPageLoad(); }