本文整理匯總了PHP中LogActions::getNumberOfActionsBySession方法的典型用法代碼示例。如果您正苦於以下問題:PHP LogActions::getNumberOfActionsBySession方法的具體用法?PHP LogActions::getNumberOfActionsBySession怎麽用?PHP LogActions::getNumberOfActionsBySession使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類LogActions
的用法示例。
在下文中一共展示了LogActions::getNumberOfActionsBySession方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: SMSEntry
function SMSEntry()
{
// check for return from tester, in which case we need to switch back to normal mode to look in the correct actions table
if (isset($_SESSION[SURVEY_EXECUTION_MODE]) && $_SESSION[SURVEY_EXECUTION_MODE] == SURVEY_EXECUTION_MODE_TEST) {
$_SESSION[SURVEY_EXECUTION_MODE] = SURVEY_EXECUTION_MODE_NORMAL;
}
$logactions = new LogActions();
$nosessionactions = $logactions->getNumberOfActionsBySession($this->phpid, USCIC_SMS);
//echo 'ytytytyt';
//echo ' [[[[' . $this->phpid;
if ($nosessionactions == 0) {
//no entry yet: ask for prim_key!
$logactions->addAction('', '', "loginstart", USCIC_SMS);
$login = new Login($this->phpid);
return $login->getSMSLoginScreen();
} else {
//echo ']]]]]';
$loggedin = $logactions->getLoggedInSMSSession($this->phpid);
if ($loggedin["count"] == 0) {
//no prim_key (=username in sms) assigned to this sessionid. Assign if given (and check for pwd etc??)!
$username = loadvar('username');
$_SESSION['username'] = $username;
if ($username != '' && loadvar('password') != '') {
//check username!!
$login = new Login($this->phpid);
if ($login->checkSMSAccess()) {
$urid = $_SESSION['URID'];
$logactions->addAction('', $urid, "loggedin", USCIC_SMS);
$sms = new SMS($urid, $this->phpid);
return $sms->getPage();
} else {
// incorrect login..start new session
endSession();
session_start();
session_regenerate_id(true);
$logactions->addAction('', '', "loginempty", USCIC_SMS);
$login = new Login(session_id());
return $login->getSMSLoginScreen(Language::messageCheckUsernamePassword());
}
} else {
$logactions->addAction('', '', "loginempty", USCIC_SMS);
$login = new Login($this->phpid);
return $login->getSMSLoginScreen(Language::messageEnterUsernamePassword());
}
} else {
//continue with the sms! EXTRA CHECK!!!!
$_SESSION['URID'] = $loggedin["urid"];
if (isset($_SESSION['URID'])) {
$sms = new SMS($_SESSION['URID'], $this->phpid);
return $sms->getPage();
} else {
//something went wrong.. no urid..start new session
//echo 'ohno';
endSession();
session_start();
session_regenerate_id(true);
$logactions->addAction('', '', "loginempty", USCIC_SMS);
$login = new Login(session_id());
return $login->getSMSLoginScreen(Language::messageCheckUsernamePassword());
}
}
}
}