本文整理汇总了PHP中Cases::verifyCaseTracker方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::verifyCaseTracker方法的具体用法?PHP Cases::verifyCaseTracker怎么用?PHP Cases::verifyCaseTracker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::verifyCaseTracker方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authentication
/**
* authenticaction for case tracker
*
* @param $case numbre case
* @param $pin code pin access for case tracek
* @return array
* @throws \Exception
*/
public function authentication($case, $pin)
{
$cases = new \Cases();
$response = array();
$uid = $cases->verifyCaseTracker($case, $pin);
switch ($uid) {
//The case doesn't exist
case -1:
throw new \Exception(\G::LoadTranslation('ID_CASE_NOT_EXISTS'));
break;
//The pin is invalid
//The pin is invalid
case -2:
throw new \Exception(\G::LoadTranslation('ID_PIN_INVALID'));
break;
}
$response['process'] = $uid['PRO_UID'];
$response['app_uid'] = $uid['APP_UID'];
return $response;
}
示例2: strtolower
if (!isset($_POST['form'])) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', "error");
G::header("location: login.php");
die;
}
try {
$frm = $_POST['form'];
$case = '';
$pin = '';
if (isset($frm['CASE'])) {
$case = strtolower(trim($frm['CASE']));
$pin = trim($frm['PIN']);
}
G::LoadClass('case');
$cases = new Cases();
$uid = $cases->verifyCaseTracker($case, $pin);
switch ($uid) {
//The case doesn't exist
case -1:
G::SendTemporalMessage('ID_CASE_NOT_EXISTS', "error");
break;
//The pin is invalid
//The pin is invalid
case -2:
G::SendTemporalMessage('ID_PIN_INVALID', "error");
break;
}
if ($uid < 0) {
G::header("location: login.php");
die;
}