本文整理汇总了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');
}
示例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);
}
}
}
}
}
示例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();
}
示例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');
}
示例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);
}
}
}