本文整理汇总了PHP中ApplicationLogs::getOverallLogs方法的典型用法代码示例。如果您正苦于以下问题:PHP ApplicationLogs::getOverallLogs方法的具体用法?PHP ApplicationLogs::getOverallLogs怎么用?PHP ApplicationLogs::getOverallLogs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationLogs
的用法示例。
在下文中一共展示了ApplicationLogs::getOverallLogs方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Show dashboard index page
*
* @param void
* @return null
*/
function index()
{
$logged_user = logged_user();
$active_projects = $logged_user->getActiveProjects();
$activity_log = null;
if (is_array($active_projects) && count($active_projects)) {
$include_private = $logged_user->isMemberOfOwnerCompany();
$include_silent = $logged_user->isAdministrator();
$project_ids = array();
foreach ($active_projects as $active_project) {
$project_ids[] = $active_project->getId();
}
// if
$activity_log = ApplicationLogs::getOverallLogs($include_private, $include_silent, $project_ids, config_option('dashboard_logs_count', 15));
}
// if
tpl_assign('today_milestones', $logged_user->getTodayMilestones());
tpl_assign('late_milestones', $logged_user->getLateMilestones());
tpl_assign('active_projects', $active_projects);
tpl_assign('activity_log', $activity_log);
// Sidebar
tpl_assign('online_users', Users::getWhoIsOnline());
tpl_assign('my_projects', $active_projects);
$this->setSidebar(get_template_path('index_sidebar', 'dashboard'));
}
示例2: index
/**
* Show dashboard index page
*
* @param void
* @return null
*/
function index()
{
trace(__FILE__, 'index() - begin');
$logged_user = logged_user();
$active_projects = $logged_user->getActiveProjects();
$activity_log = null;
$projects_activity_log = array();
if (is_array($active_projects) && count($active_projects)) {
$include_private = $logged_user->isMemberOfOwnerCompany();
$include_silent = $logged_user->isAdministrator();
$project_ids = array();
foreach ($active_projects as $active_project) {
$project_ids[] = $active_project->getId();
$temp_project_logs = ApplicationLogs::getProjectLogs($active_project, $include_private, $include_silent, config_option('dashboard_project_logs_count', 7));
if (isset($temp_project_logs) && is_array($temp_project_logs) && count($temp_project_logs)) {
$projects_activity_log[$temp_project_logs[0]->getCreatedOn()->getTimestamp()] = $temp_project_logs;
}
krsort($projects_activity_log);
}
// if
$activity_log = ApplicationLogs::getOverallLogs($include_private, $include_silent, $project_ids, config_option('dashboard_logs_count', 15));
}
// if
trace(__FILE__, 'index() - tpl_assign...');
tpl_assign('today_milestones', $logged_user->getTodayMilestones());
tpl_assign('late_milestones', $logged_user->getLateMilestones());
tpl_assign('active_projects', $active_projects);
tpl_assign('activity_log', $activity_log);
tpl_assign('projects_activity_log', $projects_activity_log);
// Sidebar
tpl_assign('online_users', Users::getWhoIsOnline());
tpl_assign('my_projects', $active_projects);
$this->setSidebar(get_template_path('index_sidebar', 'dashboard'));
trace(__FILE__, 'index() - end');
}
示例3: index
/**
* Show account index page
*
* @access public
* @param void
* @return null
*/
function index()
{
$this->setHelp("account");
$this->setTemplate("card");
$this->setControllerName("user");
tpl_assign('user', logged_user());
ajx_set_no_toolbar(true);
$pids = null;
if (active_project() instanceof Project) {
$pids = active_project()->getAllSubWorkspacesQuery();
}
$logs = ApplicationLogs::getOverallLogs(false, false, $pids, 15, 0, get_id());
tpl_assign('logs', $logs);
}
示例4: project_activities
/**
* List project activities as a RSS feed
*
* @param void
* @return null
*/
function project_activities()
{
$this->setLayout('xml');
$logged_user = $this->loginUserByToken();
if (!$logged_user instanceof User) {
header("HTTP/1.0 404 Not Found");
die;
}
// if
$project = Projects::findById(array_var($_GET, 'project'));
if (!$project instanceof Project) {
header("HTTP/1.0 404 Not Found");
die;
}
// if
if (!$logged_user->isProjectUser($project)) {
header("HTTP/1.0 404 Not Found");
die;
}
// if
$include_private = $logged_user->isMemberOfOwnerCompany();
$include_silent = $logged_user->isAdministrator();
$activity_log = ApplicationLogs::getOverallLogs($include_private, $include_silent, array($project->getId()), config_option('feed_logs_count', 50));
$feed = new Angie_Feed(lang('recent project activities feed', $project->getName()), undo_htmlspecialchars($project->getOverviewUrl()));
$feed = $this->populateFeedFromLog($feed, $activity_log);
$this->renderText($feed->renderRSS2(), true);
}
示例5: index
/**
* Show dashboard index page
*
* @param void
* @return null
*/
function index()
{
$this->setHelp('dashboard');
$tag = array_var($_GET, 'active_tag');
$logged_user = logged_user();
if (active_project() instanceof Project) {
$wscsv = active_project()->getAllSubWorkspacesQuery(true);
} else {
$wscsv = null;
}
$activity_log = null;
$include_private = $logged_user->isMemberOfOwnerCompany();
$include_silent = $logged_user->isAdministrator();
$activity_log = ApplicationLogs::getOverallLogs($include_private, $include_silent, $wscsv, config_option('dashboard_logs_count', 15));
if (user_config_option('show charts widget') && module_enabled('reporting')) {
$charts = ProjectCharts::getChartsAtProject(active_project(), active_tag());
tpl_assign('charts', $charts);
if (BillingCategories::count() > 0 && active_project() instanceof Project) {
tpl_assign('billing_chart_data', active_project()->getBillingTotalByUsers(logged_user()));
}
}
if (user_config_option('show messages widget') && module_enabled('notes')) {
list($messages, $pagination) = ProjectMessages::getMessages(active_tag(), active_project(), 0, 10, '`updated_on`', 'DESC', false);
tpl_assign('messages', $messages);
}
if (user_config_option('show comments widget')) {
$comments = Comments::getSubscriberComments(active_project(), $tag);
tpl_assign('comments', $comments);
}
if (user_config_option('show documents widget') && module_enabled('documents')) {
list($documents, $pagination) = ProjectFiles::getProjectFiles(active_project(), null, false, ProjectFiles::ORDER_BY_MODIFYTIME, 'DESC', 1, 10, false, active_tag(), null);
tpl_assign('documents', $documents);
}
if (user_config_option('show emails widget') && module_enabled('email')) {
$activeWs = active_project();
list($unread_emails, $pagination) = MailContents::getEmails($tag, null, 'received', 'unread', '', $activeWs, 0, 10);
if ($activeWs && user_config_option('always show unread mail in dashboard')) {
// add unread unclassified emails
list($all_unread, $pagination) = MailContents::getEmails($tag, null, 'received', 'unread', 'unclassified', null, 0, 10);
$unread_emails = array_merge($unread_emails, $all_unread);
}
tpl_assign('unread_emails', $unread_emails);
}
//Tasks widgets
$show_pending = user_config_option('show pending tasks widget') && module_enabled('tasks');
$show_in_progress = user_config_option('show tasks in progress widget') && module_enabled('tasks');
$show_late = user_config_option('show late tasks and milestones widget') && module_enabled('tasks');
if ($show_pending || $show_in_progress || $show_late) {
$assigned_to = explode(':', user_config_option('pending tasks widget assigned to filter'));
$to_company = array_var($assigned_to, 0, 0);
$to_user = array_var($assigned_to, 1, 0);
tpl_assign('assigned_to_user_filter', $to_user);
tpl_assign('assigned_to_company_filter', $to_company);
}
if ($show_pending) {
$tasks = ProjectTasks::getProjectTasks(active_project(), ProjectTasks::ORDER_BY_DUEDATE, 'ASC', null, null, $tag, $to_company, $to_user, null, true, 'all', false, false, false, 10);
tpl_assign('dashtasks', $tasks);
}
if ($show_in_progress) {
$tasks_in_progress = ProjectTasks::getOpenTimeslotTasks(logged_user(), logged_user(), active_project(), $tag, $to_company, $to_user);
tpl_assign('tasks_in_progress', $tasks_in_progress);
}
if ($show_late) {
tpl_assign('today_milestones', $logged_user->getTodayMilestones(active_project(), $tag, 10));
tpl_assign('late_milestones', $logged_user->getLateMilestones(active_project(), $tag, 10));
tpl_assign('today_tasks', ProjectTasks::getDayTasksByUser(DateTimeValueLib::now(), $logged_user, active_project(), $tag, $to_company, $to_user, 10));
tpl_assign('late_tasks', ProjectTasks::getLateTasksByUser($logged_user, active_project(), $tag, $to_company, $to_user, 10));
}
tpl_assign('activity_log', $activity_log);
$usu = logged_user();
$conditions = array("conditions" => array("`state` >= 200 AND (`state`%2 = 0) AND `trashed_by_id`=0 AND `created_by_id` =" . $usu->getId()));
$outbox_mails = MailContents::findAll($conditions);
if ($outbox_mails != null) {
if (count($outbox_mails) == 1) {
flash_error(lang('outbox mail not sent', 1));
} else {
if (count($outbox_mails) > 1) {
flash_error(lang('outbox mails not sent', count($outbox_mails)));
}
}
}
ajx_set_no_toolbar(true);
}
示例6: card
/**
* Show user card
*
* @access public
* @param void
* @return null
*/
function card()
{
$user = Users::findById(get_id());
if (!$user instanceof User) {
flash_error(lang('user dnx'));
ajx_current("empty");
return;
}
// if
if (!logged_user()->canSeeUser($user)) {
flash_error(lang('no access permissions'));
ajx_current("empty");
return;
}
// if
$pids = null;
if (active_project() instanceof Project) {
$pids = active_project()->getAllSubWorkspacesQuery();
}
if (logged_user()->isAdministrator() || logged_user()->getId() == get_id()) {
$logs = ApplicationLogs::getOverallLogs(false, false, $pids, 15, 0, get_id());
tpl_assign('logs', $logs);
tpl_assign('user_id', get_id());
}
tpl_assign('user', $user);
ajx_set_no_toolbar(true);
ajx_extra_data(array("title" => $user->getDisplayName(), 'icon' => 'ico-user'));
}