本文整理汇总了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());
}
示例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();
示例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>';