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


PHP Subscriber::getSubscribers方法代码示例

本文整理汇总了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')]);
 }
开发者ID:shinichi81,项目名称:Nifty-Newsletter,代码行数:41,代码来源:SubscriberController.php

示例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 
}
?>
开发者ID:popovdenis,项目名称:lessons-1,代码行数:31,代码来源:index.php


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