本文整理汇总了PHP中Subscriber::getSubscribers方法的典型用法代码示例。如果您正苦于以下问题:PHP Subscriber::getSubscribers方法的具体用法?PHP Subscriber::getSubscribers怎么用?PHP Subscriber::getSubscribers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subscriber
的用法示例。
在下文中一共展示了Subscriber::getSubscribers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$querystring = $_SERVER['REQUEST_URI'];
$uppercasestring = strtoupper($querystring);
if (strpos($querystring, '&LIST=') > 1) {
$listId = substr($querystring, strpos($uppercasestring, '&LIST=') + 6, strlen($uppercasestring));
} else {
$listId = substr($querystring, strpos($uppercasestring, '?LIST=') + 6, strlen($uppercasestring));
}
if ((int) $listId > 0) {
$subscribers = Subscriber::getSubscribersInList($this->paginate, $this->orderBy, $listId);
} else {
$subscribers = Subscriber::getSubscribers($this->paginate, $this->orderBy);
}
$subscribersHtml = Jamesy\Subscribers::getSubscribersHtml($subscribers);
$orderBy = 1;
switch ($this->orderBy) {
case ['id', 'desc']:
$orderBy = 2;
break;
case ['first_name', 'asc']:
$orderBy = 3;
break;
case ['first_name', 'desc']:
$orderBy = 4;
break;
case ['last_name', 'asc']:
$orderBy = 5;
break;
case ['last_name', 'desc']:
$orderBy = 6;
break;
case ['email', 'asc']:
$orderBy = 7;
break;
case ['email', 'desc']:
$orderBy = 8;
break;
}
return View::make('backend.subscribers.index', ['user' => $this->user, 'isAdmin' => $this->isAdmin, 'configs' => $this->configs, 'subscribersHtml' => $subscribersHtml, 'logged_in_for' => $this->logged_in_for, 'activeParent' => $this->activeParent, 'active' => 'allsubscribers', 'records' => $this->paginate, 'orderBy' => $orderBy, 'links' => $subscribers->links('backend.pagination.nifty')]);
}
示例2: Subscriber
</label>
</form>
<div id="message"></div>
<table id="subscribers_list" border="1" width="100%">
<thead>
<tr>
<th width="10%">ID</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php
$subscriber = new Subscriber();
$list = $subscriber->getSubscribers();
foreach ($list as $value) {
?>
<tr>
<td><?php
echo $value[0];
?>
</td>
<td><?php
echo $value[1];
?>
</td>
</tr>
<?php
}
?>