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


PHP MEMBER::url方法代码示例

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


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

示例1: testGetElizabethIIURL

 /**
  * Test that edge case URL for Elizabeth II is generated correctly.
  */
 public function testGetElizabethIIURL()
 {
     $MEMBER = new MEMBER(array('person_id' => 1));
     $this->assertEquals('http://' . DOMAIN . '/royal/elizabeth_the_second', $MEMBER->url());
 }
开发者ID:udp12,项目名称:theyworkforyou,代码行数:8,代码来源:MemberTest.php

示例2: elseif

<br><label for="sendname">Your name:</label> <input type="text" id="sendname" name="sender_name" value="<?php 
    echo $sender_name;
    ?>
" size="30">
<input type="hidden" name="pid" value="<?php 
    echo $pid;
    ?>
">
<br>(<a href="/privacy/">privacy policy</a>)
<input type="submit" class="submit" value="Send"></p>
</form>
<?php 
} else {
    $rep_name = $MEMBER->full_name();
    if ($MEMBER->house_disp == 1) {
        $rep_name .= ' MP';
    } elseif ($MEMBER->house_disp == 3) {
        $rep_name .= ' MLA';
    }
    $data = array('template' => 'email_a_friend', 'to' => $recipient_email, 'subject' => 'Find out all about ' . $rep_name);
    $url = $MEMBER->url();
    $merge = array('NAME' => $sender_name, 'EMAIL' => $sender_email, 'REP_NAME' => $rep_name, 'REP_URL' => $url);
    $success = send_template_email($data, $merge);
    if ($success) {
        print "<p>Your email has been sent successfully. Thank you for using TheyWorkForYou.</p> <p><a href=\"{$url}\">Return to " . $MEMBER->full_name() . "'s page</a></p>";
    } else {
        print "<p>Sorry, something went wrong trying to send an email. Please wait a few minutes and try again.</p>";
    }
}
$PAGE->stripe_end();
$PAGE->page_end();
开发者ID:bruno,项目名称:openaustralia-app,代码行数:31,代码来源:index.php

示例3: elseif

            print "<p><img src='http://matthew.theyworkforyou.com/boundaries/maps_next/$map_url_new.png' alt='Map showing boundary of the $new constituency' width=400 height=400>";
        }
    }
?>

<p class="footer"><small>Images produced from the Ordnance Survey <a href="http://www.election-maps.co.uk/" rel="nofollow">election-maps</a> service. Images reproduced with permission of <a href="http://www.ordnancesurvey.co.uk/" rel="nofollow">Ordnance Survey</a> and <a href="http://www.lpsni.gov.uk/" rel="nofollow">Land and Property Services</a>.</small></p>

</div>

<ul class="results">

<li>You are currently in the <strong><?php 
echo $current_disp;
?>
</strong> constituency; your MP is <a href='<?php 
echo $MEMBER->url();
?>
'><?php 
echo $MEMBER->full_name();
?>
</a>.</p>
<?
    if (isset($new) && $new_info['country']=='S') {
        print '<li>Scotland does not have any boundary changes, so you will remain in this constituency.';
    } elseif (isset($new)) {
        print '<li>At the next election, you will be in the <strong>' . $new . '</strong> constituency.';
    } else {
        print '<li>We cannot look up the constituency for the next election for some reason, sorry.';
    }

    echo '</ul>';
开发者ID:henare,项目名称:theyworkforyou,代码行数:31,代码来源:index.php


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