本文整理汇总了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());
}
}
}
}