示例#1
0
    $details['keyword'] = '';
    $details['pid'] = '';
    $details['alertsearch'] = '';
    $details['pc'] = '';
}
$PAGE->page_start();
$PAGE->stripe_start();
if ($message) {
    $PAGE->informational($message);
}
$sidebar = null;
if ($details['email_verified']) {
    ob_start();
    if ($THEUSER->postcode()) {
        $current_mp = new MEMBER(array('postcode' => $THEUSER->postcode()));
        if (!$ALERT->fetch_by_mp($THEUSER->email(), $current_mp->person_id())) {
            $PAGE->block_start(array('title' => 'Your current MP'));
            ?>
<form action="/alert/" method="post">
<input type="hidden" name="t" value="<?php 
            echo _htmlspecialchars(get_http_var('t'));
            ?>
">
<input type="hidden" name="pid" value="<?php 
            echo $current_mp->person_id();
            ?>
">
You are not subscribed to an alert for your current MP,
<?php 
            echo $current_mp->full_name();
            ?>
示例#2
0
 /**
  * Test that fetching alerts for an MP which doesn't exist fails
  */
 public function testCheckFetchByMpNotExists()
 {
     $ALERT = new ALERT();
     $response = $ALERT->fetch_by_mp('*****@*****.**', 9876);
     $this->assertEquals(false, $response);
 }