本文整理汇总了PHP中Cases::caseTrackerPermissions方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::caseTrackerPermissions方法的具体用法?PHP Cases::caseTrackerPermissions怎么用?PHP Cases::caseTrackerPermissions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::caseTrackerPermissions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: permissions
/**
* Access granted for administrator in case tracker
*
* @param $pro_uid
* @param $status
* @return bool
*/
public function permissions($pro_uid, $status)
{
$cases = new \Cases();
$caseTracker = $cases->caseTrackerPermissions($pro_uid);
switch ($status) {
case "map":
$return = $caseTracker['CT_MAP_TYPE'];
break;
case "messages":
$return = $caseTracker['CT_MESSAGE_HISTORY'];
break;
case "history":
$return = $caseTracker['CT_DERIVATION_HISTORY'];
break;
case "objects":
$return = $caseTracker['DYNADOC'];
break;
default:
$return = false;
break;
}
return $return;
}
示例2: Criteria
require_once "classes/model/CaseTracker.php";
require_once "classes/model/CaseTrackerObject.php";
$_SESSION['CASE'] = $case;
$_SESSION['PIN'] = $pin;
$_SESSION['PROCESS'] = $uid['PRO_UID'];
$_SESSION['APPLICATION'] = $uid['APP_UID'];
$_SESSION['TASK'] = -1;
$_SESSION['INDEX'] = -1;
$criteria = new Criteria();
$criteria->add(CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS']);
$caseTracker = new CaseTracker();
if (CaseTrackerPeer::doCount($criteria) === 0) {
$permissionsCaseTracker = array('PRO_UID' => $_SESSION['PROCESS'], 'CT_MAP_TYPE' => 'PROCESSMAP', 'CT_DERIVATION_HISTORY' => 1, 'CT_MESSAGE_HISTORY' => 1);
$caseTracker->create($permissionsCaseTracker);
}
$caseTracker = $cases->caseTrackerPermissions($_SESSION['PROCESS']);
if ($caseTracker['CT_MAP_TYPE']) {
G::header('location: tracker_ViewMap');
} else {
if ($caseTracker['DYNADOC']) {
G::header("location: tracker_DynaDocs");
} else {
if ($caseTracker['CT_DERIVATION_HISTORY']) {
G::header("location: tracker_History");
} else {
if ($caseTracker['CT_MESSAGE_HISTORY']) {
G::header("location: tracker_No");
} else {
G::header("location: login.php");
G::SendTemporalMessage('ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error");
}