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


PHP UserController::__getAllUsers方法代码示例

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


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

示例1: showAuditorProjects

 function showAuditorProjects($info = "")
 {
     $userId = isLoggedIn();
     if (isAdmin()) {
         $sql = "select ap.*,w.name,u.username from websites w,users u,auditorprojects ap where ap.website_id=w.id and u.id=w.user_id";
         $sql .= empty($info['userid']) ? "" : " and w.user_id=" . $info['userid'];
         $sql .= " order by ap.score DESC,ap.id";
         $this->set('isAdmin', 1);
         $userCtrler = new UserController();
         $userList = $userCtrler->__getAllUsers();
         $this->set('userList', $userList);
     } else {
         $sql = "select w.name,ap.* from websites w, auditorprojects ap where ap.website_id=w.id and user_id={$userId} order by ap.id";
     }
     $this->set('userId', empty($info['userid']) ? 0 : $info['userid']);
     # pagination setup
     $this->db->query($sql, true);
     $this->paging->setDivClass('pagingdiv');
     $this->paging->loadPaging($this->db->noRows, SP_PAGINGNO);
     $pagingDiv = $this->paging->printPages('siteauditor.php?userid=' . $info['userid']);
     $this->set('pagingDiv', $pagingDiv);
     $sql .= " limit " . $this->paging->start . "," . $this->paging->per_page;
     $projectList = $this->db->select($sql);
     foreach ($projectList as $i => $projectInfo) {
         $projectList[$i]['total_links'] = $this->getCountcrawledLinks($projectInfo['id']);
         $projectList[$i]['crawled_links'] = $this->getCountcrawledLinks($projectInfo['id'], true);
         $projectList[$i]['last_updated'] = $this->getProjectLastUpdate($projectInfo['id']);
     }
     $this->set('pageNo', $info['pageno']);
     $this->set('list', $projectList);
     $this->render('siteauditor/list');
 }
开发者ID:codegooglecom,项目名称:seopanel,代码行数:32,代码来源:siteauditor.ctrl.php

示例2: executeCron

 function executeCron($includeList = array())
 {
     $this->loadCronJobTools($includeList);
     $lastGenerated = date('Y-m-d 00:00:00');
     $userCtrler = new UserController();
     $userList = $userCtrler->__getAllUsers();
     foreach ($userList as $userInfo) {
         // create report controller
         $reportCtrler = new ReportController();
         $lastGenerated = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
         // check for user report schedule
         $repSetInfo = $reportCtrler->isGenerateReportsForUser($userInfo['id']);
         if (!empty($repSetInfo['generate_report'])) {
             $websiteCtrler = new WebsiteController();
             $websiteList = $websiteCtrler->__getAllWebsites($userInfo['id']);
             // if websites are available
             if (count($websiteList) > 0) {
                 foreach ($websiteList as $websiteInfo) {
                     $this->websiteInfo = $websiteInfo;
                     $this->routeCronJob($websiteInfo['id'], '', true);
                 }
                 // save report generated time
                 $reportCtrler->updateUserReportSetting($userInfo['id'], 'last_generated', $lastGenerated);
                 // send email notification if enabled
                 if (SP_REPORT_EMAIL_NOTIFICATION && $repSetInfo['email_notification']) {
                     $reportCtrler->sentEmailNotificationForReportGen($userInfo, $repSetInfo['last_generated'], $lastGenerated);
                 }
             }
         }
     }
 }
开发者ID:codegooglecom,项目名称:seopanel,代码行数:31,代码来源:cron.ctrl.php

示例3: editWebsite

 function editWebsite($websiteId, $listInfo = '')
 {
     $websiteId = intval($websiteId);
     if (!empty($websiteId)) {
         if (empty($listInfo)) {
             $listInfo = $this->__getWebsiteInfo($websiteId);
             $listInfo['oldName'] = $listInfo['name'];
         }
         $listInfo['title'] = stripslashes($listInfo['title']);
         $listInfo['description'] = stripslashes($listInfo['description']);
         $listInfo['keywords'] = stripslashes($listInfo['keywords']);
         $this->set('post', $listInfo);
         # get all users
         if (isAdmin()) {
             $userCtrler = new UserController();
             $userList = $userCtrler->__getAllUsers();
             $this->set('userList', $userList);
             $this->set('isAdmin', 1);
         }
         $this->render('website/edit');
         exit;
     }
     $this->listWebsites();
 }
开发者ID:codegooglecom,项目名称:seopanel,代码行数:24,代码来源:website.ctrl.php

示例4: showReportsScheduler

 function showReportsScheduler($success = false, $postInfo = '')
 {
     $userId = isLoggedIn();
     if (isAdmin()) {
         $userId = empty($postInfo['user_id']) ? $userId : $postInfo['user_id'];
     }
     $repSetInfo = $this->getUserReportSettings($userId);
     $this->set('repSetInfo', $repSetInfo);
     $reportInterval = !isset($postInfo['report_interval']) ? $repSetInfo['report_interval'] : $postInfo['report_interval'];
     $this->set('reportInterval', $reportInterval);
     if ($reportInterval == 30) {
         $nextGenTime = mktime(0, 0, 0, date('m') + 1, 1, date('Y'));
     } else {
         $nextGenTime = $repSetInfo['last_generated'] + $repSetInfo['report_interval'] * 86400;
     }
     $this->set('nextReportTime', date('d M Y', $nextGenTime));
     $scheduleList = array(1 => $_SESSION['text']['label']['Daily'], 2 => $this->spTextReport['2 Days'], 7 => $_SESSION['text']['label']['Weekly'], 30 => $_SESSION['text']['label']['Monthly']);
     $userCtrler = new UserController();
     $userList = $userCtrler->__getAllUsers();
     $this->set('userList', $userList);
     $this->set('success', $success);
     $this->set('scheduleList', $scheduleList);
     $this->render('report/reportscheduler');
 }
开发者ID:codegooglecom,项目名称:seopanel,代码行数:24,代码来源:report.ctrl.php

示例5: executeCron

 function executeCron($includeList = array())
 {
     $this->loadCronJobTools($includeList);
     $userCtrler = new UserController();
     $userList = $userCtrler->__getAllUsers();
     $websiteCtrler = new WebsiteController();
     foreach ($userList as $userInfo) {
         $websiteList = $websiteCtrler->__getAllWebsites($userInfo['id']);
         foreach ($websiteList as $websiteInfo) {
             $this->websiteInfo = $websiteInfo;
             $this->routeCronJob($websiteInfo['id'], '', true);
         }
     }
 }
开发者ID:codegooglecom,项目名称:seopanel,代码行数:14,代码来源:cron.ctrl.php


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