当前位置: 首页>>代码示例>>PHP>>正文


PHP Club::GetEditClubUrl方法代码示例

本文整理汇总了PHP中Club::GetEditClubUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::GetEditClubUrl方法的具体用法?PHP Club::GetEditClubUrl怎么用?PHP Club::GetEditClubUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Club的用法示例。


在下文中一共展示了Club::GetEditClubUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: 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();
    }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:71,代码来源:club.php


注:本文中的Club::GetEditClubUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。