コード例 #1
0
ファイル: MemberTest.php プロジェクト: udp12/theyworkforyou
 /**
  * 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
0
ファイル: index.php プロジェクト: bruno/openaustralia-app
<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
0
ファイル: index.php プロジェクト: henare/theyworkforyou
            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>';