當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Stats::getUser方法代碼示例

本文整理匯總了PHP中Stats::getUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Stats::getUser方法的具體用法?PHP Stats::getUser怎麽用?PHP Stats::getUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Stats的用法示例。


在下文中一共展示了Stats::getUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

if ($role_id == User::getRoleID('customer')) {
    $crm = CRM::getInstance($prj_id);
    // need the activity dashboard here
    $contact_id = User::getCustomerContactID($usr_id);
    $customer_id = Auth::getCurrentCustomerID();
    $tpl->assign(array('contact' => $crm->getContact($contact_id), 'customer' => $crm->getCustomer($customer_id)));
} else {
    if (Auth::getCurrentRole() <= User::getRoleID('Reporter') && Project::getSegregateReporters($prj_id)) {
        $tpl->assign('hide_stats', true);
    } else {
        $tpl->assign('hide_stats', false);
        $tpl->assign('status', Stats::getStatus());
        $tpl->assign('releases', Stats::getRelease($hide_closed));
        $tpl->assign('categories', Stats::getCategory($hide_closed));
        $tpl->assign('priorities', Stats::getPriority($hide_closed));
        $tpl->assign('users', Stats::getUser($hide_closed));
        $tpl->assign('emails', Stats::getEmailStatus($hide_closed));
        $tpl->assign('pie_chart', Stats::getPieChart($hide_closed));
    }
}
if (@$_REQUEST['hide_closed'] == '') {
    $Stats_Search_Profile = Search_Profile::getProfile($usr_id, $prj_id, 'stats');
    if (!empty($Stats_Search_Profile)) {
        $tpl->assign('hide_closed', $Stats_Search_Profile['hide_closed']);
    }
} else {
    $tpl->assign('hide_closed', @$_REQUEST['hide_closed']);
    Search_Profile::save($usr_id, $prj_id, 'stats', array('hide_closed' => @$_REQUEST['hide_closed']));
}
$tpl->assign('news', News::getListByProject($prj_id));
$tpl->displayTemplate();
開發者ID:korusdipl,項目名稱:eventum,代碼行數:31,代碼來源:main.php

示例2: Template_API

include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.stats.php";
include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "class.news.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("main.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$prj_id = Auth::getCurrentProject();
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('customer')) {
    // need the activity dashboard here
    $usr_id = Auth::getUserID();
    $customer_id = User::getCustomerID($usr_id);
    $tpl->assign("customer_stats", Customer::getOverallStats($prj_id, $customer_id));
    $tpl->assign("profile", Customer::getProfile($prj_id, $usr_id));
} else {
    $tpl->assign("status", Stats::getStatus());
    $tpl->assign("releases", Stats::getRelease());
    $tpl->assign("categories", Stats::getCategory());
    $tpl->assign("priorities", Stats::getPriority());
    $tpl->assign("users", Stats::getUser());
    $tpl->assign("emails", Stats::getEmailStatus());
    $tpl->assign("pie_chart", Stats::getPieChart());
    if ($_GET['tips']) {
        $tpl->assign("random_tip", Misc::getRandomTip($tpl));
    }
}
$tpl->assign("news", News::getListByProject($prj_id));
$tpl->displayTemplate();
開發者ID:juliogallardo1326,項目名稱:proc,代碼行數:31,代碼來源:main.php


注:本文中的Stats::getUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。