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


PHP MEMBER::left_house方法代码示例

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


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

示例1: your_mp_bullet_point

function your_mp_bullet_point()
{
    global $THEUSER, $MPURL;
    print "<li>";
    $pc_form = true;
    if ($THEUSER->constituency_is_set()) {
        // (We don't allow the user to search for a postcode if they
        // already have one set in their prefs.)
        $MEMBER = new MEMBER(array('constituency' => $THEUSER->constituency()));
        if ($MEMBER->valid) {
            $pc_form = false;
            $CHANGEURL = new URL('userchangepc');
            $mpname = $MEMBER->first_name() . ' ' . $MEMBER->last_name();
            $former = "";
            $left_house = $MEMBER->left_house();
            if ($left_house[1]['date'] != '9999-12-31') {
                $former = 'former';
            }
            ?>
	<p><a href="<?php 
            echo $MPURL->generate();
            ?>
"><strong>Find out more about <?php 
            echo $mpname;
            ?>
, your <?php 
            echo $former;
            ?>
 Representative</strong></a>
	(<a href="<?php 
            echo $CHANGEURL->generate();
            ?>
">Change</a>)</p>
<?php 
        }
    }
    if ($pc_form) {
        ?>
		<form action="<?php 
        echo $MPURL->generate();
        ?>
" method="get">
		<p><strong>Find out more about your Representative</strong><br>
		<label for="pc">Enter your Australian postcode here:</label>&nbsp; <input type="text" name="pc" id="pc" size="8" maxlength="10" class="text">&nbsp;&nbsp;<input type="submit" value=" GO " class="submit"></p>
		</form>
	<?php 
    }
    print "</li>";
}
开发者ID:leowmjw,项目名称:twfy,代码行数:49,代码来源:index.php

示例2: MEMBER

$pc_form = true;
if ($THEUSER->isloggedin() && $THEUSER->postcode() != '' || $THEUSER->postcode_is_set()) {
    // User is logged in and has a postcode, or not logged in with a cookied postcode.
    // (We don't allow the user to search for a postcode if they
    // already have one set in their prefs.)
    $MEMBER = new MEMBER(array('postcode' => $THEUSER->postcode()));
    if ($MEMBER->valid) {
        $pc_form = false;
        if ($THEUSER->isloggedin()) {
            $CHANGEURL = new URL('useredit');
        } else {
            $CHANGEURL = new URL('userchangepc');
        }
        $mpname = $MEMBER->first_name() . ' ' . $MEMBER->last_name();
        $former = "";
        $left_house = $MEMBER->left_house();
        if ($left_house[1]['date'] != '9999-12-31') {
            $former = 'former';
        }
        ?>
 
        	<p><a href="<?php 
        echo $MPURL->generate();
        ?>
"><strong>Find out about <?php 
        echo $mpname;
        ?>
, your <?php 
        echo $former;
        ?>
 MP</strong></a><br>
开发者ID:palfrey,项目名称:twfy,代码行数:31,代码来源:index.php

示例3: your_mp_bullet_point

function your_mp_bullet_point()
{
    global $THEUSER, $MPURL;
    print "<li>";
    $pc_form = true;
    if ($THEUSER->isloggedin() && $THEUSER->postcode() != '' || $THEUSER->postcode_is_set()) {
        // User is logged in and has a postcode, or not logged in with a cookied postcode.
        // (We don't allow the user to search for a postcode if they
        // already have one set in their prefs.)
        $MEMBER = new MEMBER(array('postcode' => $THEUSER->postcode()));
        if ($MEMBER->valid) {
            $pc_form = false;
            if ($THEUSER->isloggedin()) {
                $CHANGEURL = new URL('useredit');
            } else {
                $CHANGEURL = new URL('userchangepc');
            }
            $mpname = $MEMBER->first_name() . ' ' . $MEMBER->last_name();
            $former = "";
            $left_house = $MEMBER->left_house();
            if ($left_house[1]['date'] != '9999-12-31') {
                $former = 'former';
            }
            ?>
	<p><a href="<?php 
            echo $MPURL->generate();
            ?>
"><strong>Find out more about <?php 
            echo $mpname;
            ?>
, your <?php 
            echo $former;
            ?>
 MP</strong></a><br>
	In <?php 
            echo strtoupper(htmlentities($THEUSER->postcode()));
            ?>
 (<a href="<?php 
            echo $CHANGEURL->generate();
            ?>
">Change your postcode</a>)</p>
<?php 
        }
    }
    if ($pc_form) {
        ?>
		<form action="<?php 
        echo $MPURL->generate();
        ?>
" method="get">
		<p><strong>Find out more about your Representative</strong><br>
		<label for="pc">Enter your Australian postcode here:</label>&nbsp; <input type="text" name="pc" id="pc" size="8" maxlength="10" value="<?php 
        echo htmlentities($THEUSER->postcode());
        ?>
" class="text">&nbsp;&nbsp;<input type="submit" value=" GO " class="submit"></p>
		</form>
	<?php 
        if (!defined("POSTCODE_SEARCH_DOMAIN") || !POSTCODE_SEARCH_DOMAIN) {
            print '<p align="right"><em>Postcodes are being mapped to a random Representative</em></p>';
        }
    }
    print "</li>";
}
开发者ID:bruno,项目名称:openaustralia-app,代码行数:63,代码来源:index.php


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