本文整理汇总了PHP中SJB_UserManager::getUsersInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP SJB_UserManager::getUsersInfo方法的具体用法?PHP SJB_UserManager::getUsersInfo怎么用?PHP SJB_UserManager::getUsersInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SJB_UserManager
的用法示例。
在下文中一共展示了SJB_UserManager::getUsersInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
$ou = SJB_UserManager::getOnlineUsers();
$onlineUsers = array();
$totalOnlineUsers = 0;
$userGroups = SJB_UserGroupManager::createTemplateStructureForUserGroups();
foreach ($userGroups as $userGroup) {
$onlineUsers[$userGroup["id"]]["count"] = 0;
$onlineUsers[$userGroup["id"]]["caption"] = $userGroup["caption"];
}
foreach ($ou as $value) {
$onlineUsers[$value["type"]]["count"]++;
$totalOnlineUsers++;
}
$theme = SJB_Settings::getValue('TEMPLATE_USER_THEME', 'default');
$themePath = SJB_TemplatePathManager::getAbsoluteThemePath($theme);
// FLAGGED LISTINGS
$allListingTypes = SJB_ListingTypeManager::getAllListingTypesInfo();
$totalFlagsNum = array();
foreach ($allListingTypes as $type) {
$totalFlagsNum[$type['id']] = SJB_ListingManager::getFlagsNumberByListingTypeSID($type['sid'], $filter = null, $groupByListingSID = true);
}
$files = $this->getCssFiles($themePath);
$tp = SJB_System::getTemplateProcessor();
$tp->assign('totalFlagsNum', $totalFlagsNum);
$tp->assign('usersInfo', SJB_UserManager::getUsersInfo());
$tp->assign('groupsInfo', SJB_UserManager::getGroupsInfo());
$tp->assign('listingsInfo', SJB_ListingManager::getListingsInfo());
$tp->assign('listingTypesInfo', SJB_ListingTypeManager::getAllListingTypesInfo());
$tp->assign('invoicesInfo', SJB_InvoiceManager::getInvoicesInfo());
$tp->assign('unpaidInvoices', SJB_InvoiceManager::getTotalUnpaidInvoices());
$tp->assign('totalInvoices', SJB_InvoiceManager::getTotalInvoices());
$i18n = SJB_I18N::getInstance();
$lang = $i18n->getLanguageData($i18n->getCurrentLanguage());
$tp->assign("today", strftime($lang['date_format'], time()));
// ранее были данные за период: месяц (последние 30 дней), неделя (последние 7 дней)
// теперь - текущий месяц и текущая неделя
$currMonth = strftime($lang['date_format'], mktime(0, 0, 0, date("m"), 1, date("Y")));
$currWeek = strftime($lang['date_format'], mktime(0, 0, 0, date("m"), date("d") - date("N") + 1, date("Y")));
$tp->assign("weekAgo", $currWeek);
$tp->assign("monthAgo", $currMonth);
$tp->assign('onlineUsers', $onlineUsers);
$tp->assign('totalOnlineUsers', $totalOnlineUsers);
if (count($files) > 0) {
$tp->assign("file", $files[0]);
}
$tp->display("index.tpl");
}