本文整理汇总了PHP中MEMBER::current_member_anywhere方法的典型用法代码示例。如果您正苦于以下问题:PHP MEMBER::current_member_anywhere方法的具体用法?PHP MEMBER::current_member_anywhere怎么用?PHP MEMBER::current_member_anywhere使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MEMBER
的用法示例。
在下文中一共展示了MEMBER::current_member_anywhere方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: manage
public static function manage($email)
{
$db = new \ParlDB();
$q = $db->query('SELECT * FROM alerts WHERE email = :email
AND deleted != 1 ORDER BY created', array(':email' => $email));
$out = '';
for ($i = 0; $i < $q->rows(); ++$i) {
$row = $q->row($i);
$criteria = explode(' ', $row['criteria']);
$ccc = array();
$current = true;
foreach ($criteria as $c) {
if (preg_match('#^speaker:(\\d+)#', $c, $m)) {
$MEMBER = new \MEMBER(array('person_id' => $m[1]));
$ccc[] = 'spoken by ' . $MEMBER->full_name();
if (!$MEMBER->current_member_anywhere()) {
$current = false;
}
} else {
$ccc[] = $c;
}
}
$criteria = join(' ', $ccc);
$token = $row['alert_id'] . '-' . $row['registrationtoken'];
$action = '<form action="/alert/" method="post"><input type="hidden" name="t" value="' . $token . '">';
if (!$row['confirmed']) {
$action .= '<input type="submit" name="action" value="Confirm">';
} elseif ($row['deleted'] == 2) {
$action .= '<input type="submit" name="action" value="Resume">';
} else {
$action .= '<input type="submit" name="action" value="Suspend"> <input type="submit" name="action" value="Delete">';
}
$action .= '</form>';
$out .= '<tr><td>' . $criteria . '</td><td align="center">' . $action . '</td></tr>';
if (!$current) {
$out .= '<tr><td colspan="2"><small> — <em>not a current member of any body covered by TheyWorkForYou</em></small></td></tr>';
}
}
if ($out) {
print '<table cellpadding="3" cellspacing="0"><tr><th>Criteria</th><th>Action</th></tr>' . $out . '</table>';
} else {
print '<p>You currently have no email alerts set up.</p>';
}
}