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


PHP IPSLib::fetchHighestNumber方法代码示例

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


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

示例1: _findLatestGlobalReset

 /**
  * Find latest Global reset
  *
  * @access	protected
  * @param	array 		Array of data (DB field names)
  * @param	string 		App to check
  * @return	int			Timestamp
  */
 protected function _findLatestGlobalReset($data, $app)
 {
     $_time = 0;
     $_times = array();
     $_key = $this->_makeKey($data);
     $cookie = $this->_fetchCookieData('itemMarking_' . $app);
     $cookieItems = $this->_fetchCookieData('itemMarking_' . $app . '_items');
     if (!$this->memberData['member_id'] and $this->_noGuestMarking) {
         return time();
     }
     $mainKey = $this->_findMainRowByKey($data, $app);
     /* Got all fields? */
     if (isset($this->_itemMarkers[$app][$mainKey]['item_global_reset'])) {
         $_times[] = $this->_itemMarkers[$app][$mainKey]['item_global_reset'];
     }
     if (isset($cookie['greset'][$this->_makeKey($data, TRUE)])) {
         $_times[] = intval($cookie['greset'][$this->_makeKey($data, TRUE)]);
     }
     if (isset($cookie['global'])) {
         $_times[] = intval($cookie['global']);
     }
     if (isset($this->memberData['_cache']['gb_mark__' . $app])) {
         $_times[] = $this->memberData['_cache']['gb_mark__' . $app];
     }
     /* Get most recent time */
     $_time = IPSLib::fetchHighestNumber($_times);
     return $_time;
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:36,代码来源:classItemMarking.php

示例2: _viewNewPosts_where

 /**
  * Builds a where statement for get new posts
  *
  * @access	private
  * @return	int
  */
 private function _viewNewPosts_where()
 {
     /* Loop through the forums and build a list of forums we're allowed access to */
     $where = array();
     $forumIdsOk = array();
     $forumIdsBad = array();
     $bvnp = explode(',', $this->settings['vnp_block_forums']);
     foreach ($this->registry->class_forums->forum_by_id as $id => $data) {
         /* Can we read? */
         if (!$this->registry->permissions->check('read', $data)) {
             $forumIdsBad[] = $id;
             continue;
         }
         if (!$this->registry->class_forums->forumsCheckAccess($id, 0, 'forum', array(), true)) {
             $forumIdsBad[] = $id;
             continue;
         }
         if (in_array($id, $bvnp) or !$data['sub_can_post'] or !$data['can_view_others']) {
             $forumIdsBad[] = $id;
             continue;
         }
         $forumIdsOk[] = $id;
     }
     $forumIdsOk = count($forumIdsOk) ? $forumIdsOk : array(0 => 0);
     $where[] = "t.forum_id IN (" . implode(",", $forumIdsOk) . ")";
     /* Generate last post times */
     if (!$this->memberData['bw_vnc_type']) {
         $where[] = "t.last_post > " . IPSLib::fetchHighestNumber(array(intval($this->memberData['_cache']['gb_mark__forums']), intval($this->memberData['last_visit'])));
     } else {
         $_or = array();
         foreach ($this->registry->class_forums->forum_by_id as $forumId => $forumData) {
             $lastMarked = $this->registry->getClass('classItemMarking')->fetchTimeLastMarked(array('forumID' => $forumId), 'forums');
             $readItems = $this->registry->getClass('classItemMarking')->fetchReadIds(array('forumID' => $forumId), 'forums');
             $readItems = (is_array($readItems) and count($readItems)) ? $readItems : array();
             if (count($readItems)) {
                 $_or[] = "(t.forum_id={$forumId} AND t.tid NOT IN(" . implode(",", $readItems) . ") AND t.last_post > " . intval($lastMarked) . ")";
             } else {
                 $_or[] = "(t.forum_id={$forumId} AND t.last_post > " . intval($lastMarked) . ")";
             }
         }
         if (count($_or)) {
             $where[] = '(' . implode(" OR ", $_or) . ')';
         }
     }
     /* Add in last bits */
     $where[] = "t.state != 'link'";
     $where[] = "t.approved=1";
     return implode(" AND ", $where);
 }
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:55,代码来源:searchPlugin.php


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