• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Phpfox_Pager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Phpfox_Pager的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox_Pager类的具体用法?PHP Phpfox_Pager怎么用?PHP Phpfox_Pager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Phpfox_Pager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: process

 /**
  * Controller
  */
 public function process()
 {
     if ($iId = $this->request()->getInt('view')) {
         if ($sRedirect = Phpfox::getService('report')->getRedirect($iId)) {
             $this->url()->forward($sRedirect);
         }
     }
     if ($aIds = $this->request()->getArray('id')) {
         if ($this->request()->get('ignore')) {
             foreach ($aIds as $iId) {
                 if (!is_numeric($iId)) {
                     continue;
                 }
                 Phpfox::getService('report.data.process')->ignore($iId);
             }
             $this->url()->send('admincp.report', null, Phpfox::getPhrase('report.report_s_successfully_ignored'));
         }
     }
     $iPage = $this->request()->getInt('page');
     $aPages = array(5, 10, 15, 20);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aSorts = array('added' => Phpfox::getPhrase('core.time'));
     $aFilters = array('search' => array('type' => 'input:text', 'search' => "AND c.name LIKE '%[VALUE]%'"), 'user' => array('type' => 'input:text', 'search' => "AND u.user_name LIKE '%[VALUE]%'"), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '10'), 'sort' => array('type' => 'select', 'options' => $aSorts, 'default' => 'added', 'alias' => 'rd'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox_Search::instance()->set(array('type' => 'reports', 'filters' => $aFilters, 'search' => 'search'));
     $iLimit = $oSearch->getDisplay();
     list($iCnt, $aReports) = Phpfox::getService('report')->get($oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $iLimit);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iLimit, 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('report.reports'))->setBreadcrumb(Phpfox::getPhrase('report.reports'), $this->url()->makeUrl('admincp.report'))->assign(array('aReports' => $aReports));
 }
开发者ID:lev1976g,项目名称:core,代码行数:35,代码来源:index.class.php


示例2: process

 /**
  * Controller
  */
 public function process()
 {
     Phpfox::isUser(true);
     if ($iInvite = $this->request()->getInt('del')) {
         $bDel = Phpfox::getService('invite.process')->delete($iInvite, Phpfox::getUserId());
         if ($bDel) {
             $this->url()->send('invite.invitations', null, Phpfox::getPhrase('invite.invitation_deleted'));
         }
         $this->url()->send('invite.invitations', null, Phpfox::getPhrase('invite.invitation_not_found'));
     } elseif ($aInvite = $this->request()->get('val')) {
         $bDel = true;
         foreach ($aInvite as $iInvite) {
             $bDel = $bDel && Phpfox::getService('invite.process')->delete($iInvite, Phpfox::getUserId());
         }
         if ($bDel) {
             $this->url()->send('invite.invitations', null, Phpfox::getPhrase('invite.invitation_deleted'));
         }
         $this->url()->send('invite.invitations', null, Phpfox::getPhrase('invite.invitation_not_found'));
     }
     $iPage = $this->request()->getInt('page');
     $iPageSize = (int) Phpfox::getParam('invite.pendings_to_show_per_page');
     list($iCnt, $aInvites) = Phpfox::getService('invite')->get(Phpfox::getUserId(), $iPage, $iPageSize);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt));
     $this->setParam('global_moderation', array('name' => 'invitations', 'ajax' => 'invite.moderation', 'menu' => array(array('phrase' => 'Delete', 'action' => 'delete'))));
     $this->template()->setTitle(Phpfox::getPhrase('invite.pending_invitations'))->setBreadcrumb(Phpfox::getPhrase('invite.pending_invitations'))->assign(array('aInvites' => $aInvites, 'iPage' => $iPage))->setHeader('cache', array('pager.css' => 'style_css', 'pending.js' => 'module_invite'));
 }
开发者ID:lev1976g,项目名称:core,代码行数:29,代码来源:invitations.class.php


示例3: process

 /**
  * Controller
  */
 public function process()
 {
     Phpfox::getUserParam('comment.can_moderate_comments', true);
     $iPage = $this->request()->getInt('page');
     $aPages = array(20, 30, 40, 50);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aFilters = array('search' => array('type' => 'input:text', 'search' => "AND ls.name LIKE '%[VALUE]%'"), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '20'), 'sort' => array('type' => 'select', 'options' => array('time_stamp' => Phpfox::getPhrase('comment.last_activity'), 'rating ' => Phpfox::getPhrase('comment.rating')), 'default' => 'time_stamp', 'alias' => 'cmt'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox_Search::instance()->set(array('type' => 'comments', 'filters' => $aFilters, 'search' => 'search'));
     if ($this->request()->get('view') == 'approval') {
         $oSearch->setCondition('AND cmt.view_id = 1');
     } else {
         $oSearch->setCondition('AND cmt.view_id = 9');
     }
     list($iCnt, $aComments) = Phpfox::getService('comment')->get('cmt.*', $oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $oSearch->getDisplay(), null, true);
     foreach ($aComments as $iKey => $aComment) {
         if (Phpfox::hasCallback($aComment['type_id'], 'getItemName')) {
             $aComments[$iKey]['item_name'] = Phpfox::callback($aComment['type_id'] . '.getItemName', $aComment['comment_id'], $aComment['owner_full_name']);
         }
     }
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $oSearch->getDisplay(), 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('comment.comment_title'))->setBreadcrumb(Phpfox::getPhrase('comment.comment_title'), $this->url()->makeUrl('admincp.comment'))->setHeader('cache', array('comment.css' => 'style_css', 'pager.css' => 'style_css'))->assign(array('aComments' => $aComments, 'bIsCommentAdminPanel' => true));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:28,代码来源:index.class.php


示例4: process

 /**
  * Controller
  */
 public function process()
 {
     ($sPlugin = Phpfox_Plugin::get('ad.component_controller_admincp_process__start')) ? eval($sPlugin) : false;
     $iPage = $this->request()->getInt('page');
     if ($iId = $this->request()->getInt('approve')) {
         if (Phpfox::getService('ad.process')->approve($iId)) {
             $this->url()->send('admincp.ad', null, Phpfox::getPhrase('ad.ad_successfully_approved'));
         }
     }
     if ($iId = $this->request()->getInt('deny')) {
         if (Phpfox::getService('ad.process')->deny($iId)) {
             $this->url()->send('admincp.ad', null, Phpfox::getPhrase('ad.ad_successfully_denied'));
         }
     }
     if ($iId = $this->request()->getInt('delete')) {
         if (Phpfox::getService('ad.process')->delete($iId)) {
             $this->url()->send('admincp.ad', null, Phpfox::getPhrase('ad.ad_successfully_deleted'));
         }
     }
     if ($aVals = $this->request()->getArray('val')) {
         if (Phpfox::getService('ad.process')->updateActivity($aVals)) {
             $this->url()->send('admincp.ad', null, Phpfox::getPhrase('ad.ad_s_successfully_updated'));
         }
     }
     $aPages = array(5, 10, 15, 20);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aSorts = array('ad_id' => Phpfox::getPhrase('ad.recently_added'));
     $aFilters = array('status' => array('type' => 'select', 'options' => array('1' => Phpfox::getPhrase('ad.pending_approval'), '2' => Phpfox::getPhrase('ad.pending_payment'), '4' => Phpfox::getPhrase('ad.denied')), 'add_any' => true), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '10'), 'sort' => array('type' => 'select', 'options' => $aSorts, 'default' => 'ad_id'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox_Search::instance()->set(array('type' => 'campaigns', 'filters' => $aFilters, 'search' => 'search'));
     $sStatus = $oSearch->get('status');
     $sView = $this->request()->get('view');
     $iLocation = $this->request()->getInt('location');
     if ($sStatus == '1') {
         $oSearch->setCondition('is_custom = 2');
     } elseif ($sStatus == '2') {
         $oSearch->setCondition('is_custom = 1');
     } elseif ($sStatus == '4') {
         $oSearch->setCondition('is_custom = 4');
     } else {
         switch ($sView) {
             case 'pending':
                 $oSearch->setCondition('is_custom = 2');
                 break;
             default:
                 // $oSearch->setCondition('is_custom IN(0,2,3)');
                 break;
         }
     }
     if ($iLocation > 0) {
         $oSearch->setCondition('AND location = ' . (int) $iLocation);
     }
     $iLimit = $oSearch->getDisplay();
     list($iCnt, $aAds) = Ad_Service_Ad::instance()->get($oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $iLimit);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iLimit, 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('ad.manage_ad_campaigns'))->setBreadcrumb(Phpfox::getPhrase('ad.manage_ad_campaigns'), $this->url()->makeUrl('admincp.ad'))->assign(array('aAds' => $aAds, 'iPendingCount' => (int) Ad_Service_Ad::instance()->getPendingCount(), 'sPendingLink' => Phpfox_Url::instance()->makeUrl('admincp.ad', array('view' => 'pending')), 'bIsSearch' => $this->request()->get('search-id') ? true : false, 'sView' => $sView));
     ($sPlugin = Phpfox_Plugin::get('ad.component_controller_admincp_process__end')) ? eval($sPlugin) : false;
 }
开发者ID:lev1976g,项目名称:core,代码行数:63,代码来源:index.class.php


示例5: process

 /**
  * Controller
  */
 public function process()
 {
     $aCond = array();
     $iPage = $this->request()->getInt('page');
     $iPageSize = 10;
     $bIsSentbox = $this->request()->get('req2') == 'sent' ? true : false;
     $bIsSearch = false;
     if ($bIsSentbox) {
         $aCond[] = 'm.owner_user_id = ' . Phpfox::getUserId() . ' AND m.owner_type_id = 0';
     } else {
         $aCond[] = 'm.viewer_folder_id = 0 AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 0';
     }
     if (($sSearch = $this->request()->get('search')) || $this->request()->get('search-query')) {
         if ($this->request()->get('search-query')) {
             $sSearch = Phpfox::getLib('session')->get('mfsearch');
         }
         $bIsSearch = true;
         $aCond[] = "AND (m.subject LIKE '%" . Phpfox_Database::instance()->escape($sSearch) . "%' OR m.preview LIKE '%" . Phpfox_Database::instance()->escape($sSearch) . "%')";
         $this->url()->setParam('search-query', 'true');
         Phpfox::getLib('session')->set('mfsearch', $sSearch);
     }
     if ($bIsSearch == false) {
         Phpfox::getLib('session')->remove('mfsearch');
     }
     list($iCnt, $aMessages, $aInputs) = Mail_Service_Mail::instance()->get($aCond, 'm.time_updated DESC', $iPage, $iPageSize, $bIsSentbox);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt));
     $this->template()->assign(array('bMobileInboxIsActive' => true, 'aMessages' => $aMessages, 'bIsSearch' => $bIsSearch, 'bIsSentbox' => $bIsSentbox, 'aMobileSubMenus' => array($this->url()->makeUrl('mail') => Phpfox::getPhrase('mail.mobile_messages'), $this->url()->makeUrl('mail', 'sent') => Phpfox::getPhrase('mail.sent'), $this->url()->makeUrl('mail', 'compose') => Phpfox::getPhrase('mail.compose')), 'sActiveMobileSubMenu' => $this->url()->makeUrl('mail', $this->request()->get('req2') == '' ? null : $this->request()->get('req2'))));
 }
开发者ID:lev1976g,项目名称:core,代码行数:31,代码来源:index-mobile.class.php


示例6: process

 /**
  * Controller
  */
 public function process()
 {
     $aParam = $this->getParam('rss');
     $aLogs = Phpfox::getService('rss.log')->get($aParam);
     $sNames = '';
     $sCounts = '';
     $iMaxLogDisplay = 5;
     $iCnt = 0;
     $iOtherCount = 0;
     foreach ($aLogs as $aLog) {
         $iCnt++;
         if ($iCnt <= $iMaxLogDisplay) {
             $sNames .= $aLog['user_agent_chart'] . '|';
             $sCounts .= $aLog['total_agent_count'] . ',';
         } else {
             $iOtherCount += $aLog['total_agent_count'];
         }
     }
     if ($iOtherCount > 0) {
         $sNames .= Phpfox::getPhrase('rss.other') . '|';
         $sCounts .= $iOtherCount . ',';
     }
     $aUsers = array();
     if (isset($aParam['users'])) {
         list($iCnt, $aUsers) = Phpfox::getService('rss.log')->getUsers($aParam, $this->request()->get('page'), 20);
         Phpfox_Pager::instance()->set(array('page' => $this->request()->get('page'), 'size' => 20, 'count' => $iCnt));
     }
     $this->template()->assign(array('sNames' => rtrim($sNames, '|'), 'sCounts' => rtrim($sCounts, ','), 'aLogs' => $aLogs, 'aUsers' => $aUsers));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:32,代码来源:log.class.php


示例7: process

 /**
  * Controller
  */
 public function process()
 {
     return Phpfox_Error::display('This section has been depreciated');
     Phpfox::getUserParam('comment.can_moderate_comments', true);
     if ($aIds = $this->request()->getArray('id')) {
         if ($this->request()->get('approve')) {
             foreach ($aIds as $iId) {
                 Phpfox::getService('feed.process')->approve($iId);
             }
             $this->url()->send('admincp.feed', array('view' => 'approval'), Phpfox::getPhrase('feed.profile_comment_s_successfully_approved'));
         } else {
             foreach ($aIds as $iId) {
                 Phpfox::getService('feed.process')->deleteFeed($iId);
             }
             $this->url()->send('admincp.feed', array('view' => 'approval'), Phpfox::getPhrase('feed.profile_comment_s_successfully_deleted'));
         }
     }
     $iPage = $this->request()->getInt('page');
     $aPages = array(20, 30, 40, 50);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aFilters = array('search' => array('type' => 'input:text', 'search' => "AND ls.name LIKE '%[VALUE]%'"), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '20'), 'sort' => array('type' => 'select', 'options' => array('time_stamp' => Phpfox::getPhrase('comment.last_activity'), 'rating ' => Phpfox::getPhrase('comment.rating')), 'default' => 'time_stamp', 'alias' => 'feed'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox_Search::instance()->set(array('type' => 'feeds', 'filters' => $aFilters, 'search' => 'search'));
     $oSearch->setCondition('AND feed.view_id = 1');
     list($iCnt, $aFeeds) = Feed_Service_Feed::instance()->getForBrowse($oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $oSearch->getDisplay());
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $oSearch->getDisplay(), 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('comment.comment_title'))->setBreadcrumb(Phpfox::getPhrase('comment.comment_title'), $this->url()->makeUrl('admincp.comment'))->setHeader('cache', array('comment.css' => 'style_css', 'pager.css' => 'style_css'))->assign(array('aFeeds' => $aFeeds, 'bIsCommentAdminPanel' => true));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:33,代码来源:index.class.php


示例8: process

 /**
  * Controller
  */
 public function process()
 {
     $iRsvp = $this->request()->get('rsvp', 1);
     $iPage = $this->request()->getInt('page');
     $sModule = $this->request()->get('module', false);
     $iItem = $this->request()->getInt('item', false);
     $aCallback = $this->getParam('aCallback', false);
     $iPageSize = 6;
     if (PHPFOX_IS_AJAX) {
         $aCallback = false;
         if ($sModule && $iItem && Phpfox::hasCallback($sModule, 'getEventInvites')) {
             $aCallback = Phpfox::callback($sModule . '.getEventInvites', $iItem);
         }
         $aEvent = Event_Service_Event::instance()->callback($aCallback)->getEvent($this->request()->get('id'), true);
         $this->template()->assign('aEvent', $aEvent);
     } else {
         $aEvent = $this->getParam('aEvent');
         $this->template()->assign('aEvent', $aEvent);
     }
     if ($aCallback !== false) {
         $sModule = $aCallback['module'];
         $iItem = $aCallback['item'];
     }
     list($iCnt, $aInvites) = Event_Service_Event::instance()->getInvites($aEvent['event_id'], $iRsvp, $iPage, $iPageSize);
     Phpfox_Pager::instance()->set(array('ajax' => 'event.listGuests', 'page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt, 'aParams' => array('id' => $aEvent['event_id'], 'module' => $sModule, 'item' => $iItem, 'rsvp' => $iRsvp)));
     $this->template()->assign(array('aInvites' => $aInvites, 'iRsvp' => $iRsvp));
     if (!PHPFOX_IS_AJAX) {
         $sExtra = '';
         if ($aCallback !== false) {
             $sExtra .= '&amp;module=' . $aCallback['module'] . '&amp;item=' . $aCallback['item'];
         }
         $this->template()->assign(array('sHeader' => '', 'aMenu' => array(Phpfox::getPhrase('event.attending') => '#event.listGuests?rsvp=1&amp;id=' . $aEvent['event_id'] . $sExtra, Phpfox::getPhrase('event.maybe') => '#event.listGuests?rsvp=2&amp;id=' . $aEvent['event_id'] . $sExtra, Phpfox::getPhrase('event.can_t_make_it') => '#event.listGuests?rsvp=3&amp;id=' . $aEvent['event_id'] . $sExtra, Phpfox::getPhrase('event.not_responded') => '#event.listGuests?rsvp=0&amp;id=' . $aEvent['event_id'] . $sExtra), 'sBoxJsId' => 'event_guests'));
         return 'block';
     }
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:38,代码来源:list.class.php


示例9: process

 /**
  * Controller
  */
 public function process()
 {
     $iPage = $this->getParam('sPage');
     $iPageSize = 10;
     list($iCnt, $aItems) = Phpfox::getService('attachment')->get(array("attachment.user_id = " . Phpfox::getUserId() . ""), 'attachment.time_stamp DESC', $iPage, $iPageSize);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt, 'ajax' => 'attachment.browse'));
     $aUser = Phpfox::getService('user')->get(Phpfox::getUserId(), true);
     $this->template()->assign(array('aItems' => $aItems, 'sUrlPath' => Phpfox::getParam('core.url_attachment'), 'sThumbPath' => Phpfox::getParam('core.url_thumb'), 'sUsage' => $aUser['space_total'], 'bCanUseInline' => false, 'sAttachmentInput' => $this->request()->get('input')));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:12,代码来源:archive.class.php


示例10: process

 /**
  * Controller
  */
 public function process()
 {
     $iPage = $this->request()->getInt('page');
     $iPageSize = 5;
     $aCond = array();
     $aCond[] = 'AND friend.user_id = ' . Phpfox::getUserId();
     list($iCnt, $aFriends) = Friend_Service_Friend::instance()->get($aCond, 'friend.time_stamp DESC', $iPage, $iPageSize, true, false, false, $this->request()->getInt('user_id'));
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt, 'ajax' => 'friend.getMutualFriends'));
     $this->template()->assign(array('aFriends' => $aFriends, 'iPage' => $iPage));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:13,代码来源:mutual-browse.class.php


示例11: process

 /**
  * Controller
  */
 public function process()
 {
     $iRsvp = $this->request()->get('rsvp', 1);
     $iPage = $this->request()->getInt('page');
     $iPageSize = 20;
     $aEvent = Event_Service_Event::instance()->getEvent($this->request()->get('id'), true);
     list($iCnt, $aInvites) = Event_Service_Event::instance()->getInvites($aEvent['event_id'], $iRsvp, $iPage, $iPageSize);
     Phpfox_Pager::instance()->set(array('ajax' => 'event.browseList', 'page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt, 'aParams' => array('id' => $aEvent['event_id'], 'rsvp' => $iRsvp)));
     $aLists = array(Phpfox::getPhrase('event.attending') => '1', Phpfox::getPhrase('event.maybe_attending') => '2', Phpfox::getPhrase('event.awaiting_reply') => '0', Phpfox::getPhrase('event.not_attending') => '3');
     $this->template()->assign(array('aEvent' => $aEvent, 'aInvites' => $aInvites, 'bIsInBrowse' => $iPage > 0 ? true : false, 'aLists' => $aLists));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:14,代码来源:browse.class.php


示例12: process

 /**
  * Controller
  */
 public function process()
 {
     Phpfox::isUser(true);
     $iPage = $this->request()->getInt('page');
     $iPageSize = 6;
     $aConditions = array();
     $aConditions[] = 'AND p.user_id = ' . Phpfox::getUserId();
     list($iCnt, $aPhotos) = Phpfox::getService('photo')->get($aConditions, 'p.time_stamp DESC', $iPage, $iPageSize);
     // Set the pager for the photos
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt, 'ajax' => 'photo.getForAttachment'));
     $this->template()->assign(array('aPhotos' => $aPhotos, 'iCurrentPage' => $iPage, 'sAttachmentObjId' => $this->request()->get('obj-id'), 'sAttachmentInput' => $this->request()->get('input'), 'sCategoryId' => $this->request()->get('category'), 'sIsAttachmentInline' => $this->request()->get('attachment-inline')));
 }
开发者ID:lev1976g,项目名称:core,代码行数:15,代码来源:attachment.class.php


示例13: process

 /**
  * Controller
  */
 public function process()
 {
     $iPage = $this->getParam('page', 0);
     $iPageSize = 9;
     $oDb = Phpfox_Database::instance();
     $aConditions = array();
     if ($sFind = $this->getParam('find')) {
         $aConditions[] = 'AND (u.user_name LIKE \'%' . $oDb->escape($sFind) . '%\' OR u.full_name LIKE \'%' . $oDb->escape($sFind) . '%\' OR u.email LIKE \'%' . $oDb->escape($sFind) . '%\')';
     }
     list($iCnt, $aUsers) = Phpfox::getService('user.browse')->conditions($aConditions)->page($iPage)->limit($iPageSize)->sort('u.last_login DESC')->get();
     Phpfox_Pager::instance()->set(array('ajax' => 'user.browseAjax', 'page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt));
     $this->template()->assign(array('aUsers' => $aUsers, 'sPrivacyInputName' => $this->getParam('input'), 'bIsAjaxSearch' => $this->getParam('is_search', false)));
 }
开发者ID:lev1976g,项目名称:core,代码行数:16,代码来源:browse.class.php


示例14: process

 /**
  * Controller
  */
 public function process()
 {
     // Get the current page. Zero if it's the first page
     $iPage = $this->getParam('page', 1);
     // Get the amount of pages to be shown by page
     $iPageSize = 15;
     // get the total pages, and the pages
     list($iTotal, $aPages) = Phpfox::getService('pages')->getMyLoginPages($iPage, $iPageSize);
     if ($iTotal > $iPageSize) {
         Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iTotal));
     }
     $this->template()->assign(array('aPages' => $aPages, 'sLink' => $this->url()->makeUrl('pages.add'), 'iCurrentPage' => $iPage, 'iTotalPages' => $iTotal / $iPageSize + 1, 'iTotal' => $iTotal));
 }
开发者ID:lev1976g,项目名称:core,代码行数:16,代码来源:login.class.php


示例15: process

 /**
  * Controller
  */
 public function process()
 {
     $iPage = $this->request()->getInt('page');
     $aPages = array(20, 30, 40, 50);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aFilters = array('search' => array('type' => 'input:text', 'search' => "ANDal.name LIKE '%[VALUE]%'"), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '20'), 'sort' => array('type' => 'select', 'options' => array('time_stamp' => Phpfox::getPhrase('admincp.login_time_stamp'), 'ip_address ' => Phpfox::getPhrase('admincp.ip_address')), 'default' => 'time_stamp', 'alias' => 'al'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox_Search::instance()->set(array('type' => 'onlineguests', 'filters' => $aFilters, 'search' => 'search'));
     list($iCnt, $aUsers) = Phpfox::getService('core.admincp')->getAdminLogins($oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $oSearch->getDisplay());
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $oSearch->getDisplay(), 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('admincp.admincp_logins'))->setBreadcrumb(Phpfox::getPhrase('admincp.admincp_logins'))->assign(array('aUsers' => $aUsers));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:17,代码来源:latest-admin-login.class.php


示例16: process

 /**
  * Controller
  */
 public function process()
 {
     if (defined('PHPFOX_IS_AJAX_CONTROLLER')) {
         $aUser = Phpfox::getService('user')->get($this->request()->get('profile_id'));
         $this->setParam('aUser', $aUser);
     }
     $iPageSize = 12;
     $iPage = $this->request()->getInt('page');
     $aUser = $this->getParam('aUser');
     $bMutual = $this->request()->get('req3') == 'mutual' ? true : false;
     if (!Phpfox::getService('user.privacy')->hasAccess($aUser['user_id'], 'friend.view_friend')) {
         return Phpfox_Error::display('<div class="extra_info">' . Phpfox::getService('user')->getFirstName($aUser['full_name']) . ' has closed ' . Phpfox::getService('user')->gender($aUser['gender'], true) . ' friends section.</div>');
     }
     $aFilters = array('sort' => array('type' => 'select', 'options' => array(), 'default' => 'full_name', 'alias' => 'u'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'ASC'), 'search' => array('type' => 'input:text', 'search' => '(u.full_name LIKE \'%[VALUE]%\' OR u.email LIKE \'%[VALUE]%\') AND', 'size' => '15', 'onclick' => 'Search'));
     $oFilter = Phpfox_Search::instance()->set(array('type' => 'friend', 'filters' => $aFilters, 'search' => 'search'));
     if ($bMutual === true) {
         $oFilter->setCondition('friend.is_page = 0 AND friend.user_id = ' . Phpfox::getUserId());
         $this->template()->setBreadcrumb(Phpfox::getPhrase('friend.mutual_friends'), null, true);
     } else {
         $oFilter->setCondition('friend.is_page = 0 AND friend.user_id = ' . (int) $aUser['user_id']);
         if ($this->request()->get('view')) {
             $this->template()->setBreadcrumb(Phpfox::getPhrase('friend.friends_online'), null, true);
         }
     }
     if (($iListId = $this->request()->getInt('list')) && ($aList = Phpfox::getService('friend.list')->getList($iListId, Phpfox::getUserId())) && isset($aList['list_id'])) {
         $this->search()->setCondition('AND fld.list_id = ' . (int) $aList['list_id'] . ' AND friend.user_id = ' . $aUser['user_id']);
         // $this->template()->setTitle($aList['name'])->setBreadcrumb($aList['name'], $this->url()->makeUrl('friend', array('view' => 'list', 'id' => $iListId)), true);
     }
     list($iCnt, $aFriends) = Friend_Service_Friend::instance()->get($oFilter->getConditions(), $oFilter->getSort(), $oFilter->getPage(), $iPageSize, true, true, $this->request()->get('view') ? true : false, $bMutual === true ? $aUser['user_id'] : null);
     $iCnt = $oFilter->getSearchTotal($iCnt);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt));
     $this->setParam('aTotalFriends', $iCnt);
     $this->template()->setMeta('keywords', Phpfox::getPhrase('friend.full_name_s_friends', array('full_name' => $aUser['full_name'])));
     $this->template()->setMeta('keywords', Phpfox::getParam('friend.friend_meta_keywords'));
     $this->template()->setMeta('description', Phpfox::getPhrase('friend.full_name_is_on_site_title_and_has_total_friends', array('full_name' => $aUser['full_name'], 'site_title' => Phpfox::getParam('core.site_title'), 'total' => $iCnt)));
     if ($iCnt) {
         $sCustomFriends = '';
         foreach ($aFriends as $aFriend) {
             $sCustomFriends .= $aFriend['full_name'] . ', ';
         }
         $sCustomFriends = rtrim($sCustomFriends, ', ');
         $this->template()->setMeta('description', Phpfox::getPhrase('friend.full_name_is_connected_with_friends', array('full_name' => $aUser['full_name'], 'friends' => $sCustomFriends)));
     }
     $this->template()->setMeta('description', Phpfox::getPhrase('friend.sign_up_on_site_title_and_connect_with_full_name_message_full_name_or_add_full_name_as_you', array('site_title' => Phpfox::getParam('core.site_title'), 'full_name' => $aUser['full_name'])));
     if (Phpfox::getUserId() == $aUser['user_id']) {
         // $this->template()->assign('lists', Friend_Service_List_List::instance()->get());
         $this->template()->menu('Manage Friends', $this->url()->makeUrl('friend'));
     }
     $this->template()->setTitle(Phpfox::getPhrase('friend.full_name_s_friends', array('full_name' => $aUser['full_name'])))->setBreadcrumb(Phpfox::getPhrase('friend.friends'))->setHeader('cache', array('pager.css' => 'style_css', 'friend.css' => 'style_css'))->assign(array('aFriends' => $aFriends, 'sFriendView' => $this->request()->get('view'), 'activeList' => $this->request()->get('list')));
 }
开发者ID:lev1976g,项目名称:core,代码行数:53,代码来源:profile.class.php


示例17: process

 /**
  * Controller
  */
 public function process()
 {
     Phpfox::getUserParam('photo.can_view_photos', true);
     $aCond = array();
     if (!Phpfox::getUserParam('photo.can_view_private_photos')) {
         $aCond[] = 'AND pa.view_id = 0 AND  pa.group_id = 0 AND pa.privacy = 0';
     }
     $aCond[] = 'AND pa.total_photo > 0';
     $iPage = $this->request()->getInt('page');
     $iPageSize = 8;
     list($iCnt, $aAlbums) = Phpfox::getService('photo.album')->get($aCond, 'pa.time_stamp DESC', $iPage, $iPageSize);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt));
     $this->template()->setTitle(Phpfox::getPhrase('photo.photo_albums'))->setHeader(array('pager.css' => 'style_css'))->setBreadcrumb(Phpfox::getPhrase('photo.photos'), $this->url()->makeUrl('photo'))->setBreadcrumb(Phpfox::getPhrase('photo.albums'), null, true)->assign(array('aAlbums' => $aAlbums));
 }
开发者ID:lev1976g,项目名称:core,代码行数:17,代码来源:public-album.class.php


示例18: process

 /**
  * Controller
  */
 public function process()
 {
     Phpfox::isUser(true);
     if ($iDeleteId = $this->request()->get('id')) {
         if (Phpfox::getService('friend.request.process')->delete($iDeleteId, Phpfox::getUserId())) {
             $this->url()->send('friend.pending', null, Phpfox::getPhrase('friend.friends_request_successfully_deleted'));
         }
     }
     $iPage = $this->request()->getInt('page');
     $iPageSize = 12;
     list($iCnt, $aPendingRequests) = Phpfox::getService('friend.request')->getPending($iPage, $iPageSize);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt));
     Friend_Service_Friend::instance()->buildMenu();
     $this->template()->setTitle('Friends')->setBreadcrumb(Phpfox::getPhrase('friend.my_friends'), $this->url()->makeUrl('friend'));
     $this->template()->setTitle(Phpfox::getPhrase('friend.pending_friend_requests'))->setHeader('cache', array('pager.css' => 'style_css', 'friend.css' => 'style_css'))->assign(array('aPendingRequests' => $aPendingRequests));
 }
开发者ID:lev1976g,项目名称:core,代码行数:19,代码来源:pending.class.php


示例19: process

 /**
  * Controller
  */
 public function process()
 {
     Phpfox::isUser(true);
     $aCheckParams = array('url' => $this->url()->makeUrl('friend'), 'start' => 3, 'reqs' => array('2' => array('accept', 'pending')));
     if (Phpfox::getParam('core.force_404_check') && !Phpfox::getService('core.redirect')->check404($aCheckParams)) {
         return Phpfox_Module::instance()->setController('error.404');
     }
     $iPage = $this->request()->getInt('page');
     $iLimit = Phpfox::getParam('friend.total_requests_display');
     $iRequestId = $this->request()->getInt('id');
     list($iCnt, $aFriends) = Phpfox::getService('friend.request')->get($iPage, $iLimit, $iRequestId);
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $iLimit, 'count' => $iCnt));
     Friend_Service_Friend::instance()->buildMenu();
     $this->setParam('global_moderation', array('name' => 'friend', 'ajax' => 'friend.moderation', 'menu' => array(array('phrase' => Phpfox::getPhrase('friend.accept'), 'action' => 'accept'), array('phrase' => Phpfox::getPhrase('friend.deny'), 'action' => 'deny'))));
     $this->template()->setTitle(Phpfox::getPhrase('friend.friend_requests'))->setBreadcrumb(Phpfox::getPhrase('friend.friends'), $this->url()->makeUrl('friend'))->assign(array('aFriends' => $aFriends, 'iRequestId' => $iRequestId, 'bIsFriendController' => true));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:19,代码来源:accept.class.php


示例20: process

 /**
  * Controller
  */
 public function process()
 {
     $iPage = $this->request()->getInt('page');
     $aPages = array(20, 30, 40, 50);
     $aDisplays = array();
     foreach ($aPages as $iPageCnt) {
         $aDisplays[$iPageCnt] = Phpfox::getPhrase('core.per_page', array('total' => $iPageCnt));
     }
     $aFilters = array('search' => array('type' => 'input:text', 'search' => "AND ls.name LIKE '%[VALUE]%'"), 'display' => array('type' => 'select', 'options' => $aDisplays, 'default' => '20'), 'sort' => array('type' => 'select', 'options' => array('last_activity' => Phpfox::getPhrase('admincp.last_activity'), 'ip_address ' => Phpfox::getPhrase('admincp.ip_address')), 'default' => 'last_activity', 'alias' => 'ls'), 'sort_by' => array('type' => 'select', 'options' => array('DESC' => Phpfox::getPhrase('core.descending'), 'ASC' => Phpfox::getPhrase('core.ascending')), 'default' => 'DESC'));
     $oSearch = Phpfox_Search::instance()->set(array('type' => 'onlineguests', 'filters' => $aFilters, 'search' => 'search'));
     $oSearch->setCondition('AND ls.user_id = 0');
     // The following condition was added to match the function log.session->getOnlineStats
     $oSearch->setCondition('AND ls.last_activity > ' . (PHPFOX_TIME - Phpfox::getParam('log.active_session') * 60));
     list($iCnt, $aGuests) = Phpfox::getService('log')->getOnlineGuests($oSearch->getConditions(), $oSearch->getSort(), $oSearch->getPage(), $oSearch->getDisplay());
     Phpfox_Pager::instance()->set(array('page' => $iPage, 'size' => $oSearch->getDisplay(), 'count' => $oSearch->getSearchTotal($iCnt)));
     $this->template()->setTitle(Phpfox::getPhrase('admincp.online_guests'))->setBreadcrumb(Phpfox::getPhrase('admincp.online'), $this->url()->makeUrl('admincp.core.online-guest'))->setBreadcrumb(Phpfox::getPhrase('admincp.guests_bots'), null, true)->assign(array('aGuests' => $aGuests));
 }
开发者ID:nima7r,项目名称:phpfox-dist,代码行数:20,代码来源:online-guest.class.php



注:本文中的Phpfox_Pager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Phpfox_Plugin类代码示例发布时间:2022-05-23
下一篇:
PHP Phpfox_Module类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap