Example #1
0
 public function getAdminLogins($aConds, $sSort = '', $iPage = '', $iLimit = '')
 {
     $iCnt = $this->database()->select('COUNT(*)')->from(Phpfox::getT('admincp_login'), 'al')->where($aConds)->order($sSort)->execute('getSlaveField');
     $aItems = array();
     if ($iCnt) {
         $aItems = $this->database()->select('al.*, ' . Phpfox::getUserFIeld())->from(Phpfox::getT('admincp_login'), 'al')->join(Phpfox::getT('user'), 'u', 'u.user_id = al.user_id')->where($aConds)->order($sSort)->limit($iPage, $iLimit, $iCnt)->execute('getSlaveRows');
         foreach ($aItems as $iKey => $aItem) {
             $aItems[$iKey]['attempt'] = $this->_getAdminLoginAttempt($aItem['is_failed']);
         }
     }
     return array($iCnt, $aItems);
 }