本文整理汇总了PHP中LimeExpressionManager::NavigateBackwards方法的典型用法代码示例。如果您正苦于以下问题:PHP LimeExpressionManager::NavigateBackwards方法的具体用法?PHP LimeExpressionManager::NavigateBackwards怎么用?PHP LimeExpressionManager::NavigateBackwards使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LimeExpressionManager
的用法示例。
在下文中一共展示了LimeExpressionManager::NavigateBackwards方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
//.........这里部分代码省略.........
// then trying to resubmit (e.g. Next, Previous, Submit) from a cached copy of the page
// Does not try to save anything from the page to the database
$moveResult = LimeExpressionManager::GetLastMoveResult(true);
if (isset($_POST['thisstep']) && isset($moveResult['seq']) && $_POST['thisstep'] == $moveResult['seq']) {
// then pressing F5 or otherwise refreshing the current page, which is OK
$LEMskipReprocessing = true;
$move = "movenext";
// so will re-display the survey
} else {
// trying to use browser back buttons, which may be disallowed if no 'previous' button is present
$LEMskipReprocessing = true;
$move = "movenext";
// so will re-display the survey
$invalidLastPage = true;
$vpopup = "<script type=\"text/javascript\">\n\n <!--\n \$(document).ready(function(){\n alert(\"" . $clang->gT("Please use the LimeSurvey navigation buttons or index. It appears you attempted to use the browser back button to re-submit a page.", "js") . "\");});\n //-->\n\n </script>\n";
}
}
if (!(isset($_POST['saveall']) || isset($_POST['saveprompt']) || isset($_POST['loadall']) || isset($_GET['sid']) || $LEMskipReprocessing || isset($move) && preg_match('/^changelang_/', $move))) {
$_SESSION[$LEMsessid]['prevstep'] = $_SESSION[$LEMsessid]['step'];
}
if (!isset($_SESSION[$LEMsessid]['prevstep'])) {
$_SESSION[$LEMsessid]['prevstep'] = -1;
// this only happens on re-load
}
if (isset($_SESSION[$LEMsessid]['LEMtokenResume'])) {
LimeExpressionManager::StartSurvey($thissurvey['sid'], $surveyMode, $surveyOptions, false, $LEMdebugLevel);
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, false);
// if late in the survey, will re-validate contents, which may be overkill
unset($_SESSION[$LEMsessid]['LEMtokenResume']);
} else {
if (!$LEMskipReprocessing) {
//Move current step ###########################################################################
if (isset($move) && $move == 'moveprev' && ($thissurvey['allowprev'] == 'Y' || $thissurvey['allowjumps'] == 'Y')) {
$moveResult = LimeExpressionManager::NavigateBackwards();
if ($moveResult['at_start']) {
$_SESSION[$LEMsessid]['step'] = 0;
unset($moveResult);
// so display welcome page again
}
}
if (isset($move) && $move == "movenext") {
$moveResult = LimeExpressionManager::NavigateForwards();
}
if (isset($move) && $move == 'movesubmit') {
if ($surveyMode == 'survey') {
$moveResult = LimeExpressionManager::NavigateForwards();
} else {
// may be submitting from the navigation bar, in which case need to process all intervening questions
// in order to update equations and ensure there are no intervening relevant mandatory or relevant invalid questions
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['totalsteps'] + 1, false);
}
}
if (isset($move) && preg_match('/^changelang_/', $move)) {
// jump to current step using new language, processing POST values
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, true, false, true);
// do process the POST data
}
if (isset($move) && isNumericInt($move) && $thissurvey['allowjumps'] == 'Y') {
$move = (int) $move;
if ($move > 0 && ($move <= $_SESSION[$LEMsessid]['step'] || isset($_SESSION[$LEMsessid]['maxstep']) && $move <= $_SESSION[$LEMsessid]['maxstep'])) {
$moveResult = LimeExpressionManager::JumpTo($move, false);
}
}
if (!isset($moveResult) && !($surveyMode != 'survey' && $_SESSION[$LEMsessid]['step'] == 0)) {
// Just in case not set via any other means, but don't do this if it is the welcome page
$moveResult = LimeExpressionManager::GetLastMoveResult(true);
示例2: run
//.........这里部分代码省略.........
$backpopup = gT("Please use the LimeSurvey navigation buttons or index. It appears you attempted to use the browser back button to re-submit a page.");
}
}
if (isset($move) && $move == "clearcancel") {
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, true, false, true);
//$backpopup=gT("Clear all need confirmation.");
}
if (isset($move)) {
if (!in_array($move, array("clearall", "changelang", "saveall", "reload"))) {
$_SESSION[$LEMsessid]['prevstep'] = $_SESSION[$LEMsessid]['step'];
} else {
// Accepted $move without error
$_SESSION[$LEMsessid]['prevstep'] = $move;
}
} else {
//$_SESSION[$LEMsessid]['prevstep'] = $_SESSION[$LEMsessid]['step']-1; // Is this needed ?
}
if (!isset($_SESSION[$LEMsessid]['prevstep'])) {
$_SESSION[$LEMsessid]['prevstep'] = $_SESSION[$LEMsessid]['step'] - 1;
// this only happens on re-load
}
if (isset($_SESSION[$LEMsessid]['LEMtokenResume'])) {
LimeExpressionManager::StartSurvey($thissurvey['sid'], $surveyMode, $surveyOptions, false, $LEMdebugLevel);
if (isset($_SESSION[$LEMsessid]['maxstep']) && $_SESSION[$LEMsessid]['maxstep'] > $_SESSION[$LEMsessid]['step']) {
LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['maxstep'], false, false);
}
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, false);
// if late in the survey, will re-validate contents, which may be overkill
unset($_SESSION[$LEMsessid]['LEMtokenResume']);
} else {
if (!$LEMskipReprocessing) {
//Move current step ###########################################################################
if (isset($move) && $move == 'moveprev' && ($thissurvey['allowprev'] == 'Y' || $thissurvey['questionindex'] > 0)) {
$moveResult = LimeExpressionManager::NavigateBackwards();
if ($moveResult['at_start']) {
$_SESSION[$LEMsessid]['step'] = 0;
unset($moveResult);
// so display welcome page again
}
}
if (isset($move) && $move == "movenext") {
$moveResult = LimeExpressionManager::NavigateForwards();
}
if (isset($move) && $move == 'movesubmit') {
if ($surveyMode == 'survey') {
$moveResult = LimeExpressionManager::NavigateForwards();
} else {
// may be submitting from the navigation bar, in which case need to process all intervening questions
// in order to update equations and ensure there are no intervening relevant mandatory or relevant invalid questions
if ($thissurvey['questionindex'] == 2) {
// Must : save actual page , review whole before set finished to true (see #09906), index==1 seems to don't need it : (don't force move)
LimeExpressionManager::StartSurvey($surveyid, $surveyMode, $surveyOptions);
}
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['totalsteps'] + 1, false);
}
}
if (isset($move) && $move == 'changelang') {
// jump to current step using new language, processing POST values
$moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, true, true, true);
// do process the POST data
}
if (isset($move) && isNumericInt($move) && $thissurvey['questionindex'] == 1) {
$move = (int) $move;
if ($move > 0 && ($move <= $_SESSION[$LEMsessid]['step'] || isset($_SESSION[$LEMsessid]['maxstep']) && $move <= $_SESSION[$LEMsessid]['maxstep'])) {
$moveResult = LimeExpressionManager::JumpTo($move, false);
}
示例3: unset
}
if (!isset($_SESSION['prevstep'])) {
$_SESSION['prevstep'] = -1;
// this only happens on re-load
}
if (isset($_SESSION['LEMtokenResume'])) {
LimeExpressionManager::StartSurvey($thissurvey['sid'], $surveyMode, $surveyOptions, false, $LEMdebugLevel);
$moveResult = LimeExpressionManager::JumpTo($_SESSION['step'] + 1, false, false);
// if late in the survey, will re-validate contents, which may be overkill
unset($_SESSION['LEMtokenResume']);
unset($_SESSION['LEMreload']);
} else {
if (!$LEMskipReprocessing) {
//Move current step ###########################################################################
if (isset($move) && $move == 'moveprev' && ($thissurvey['allowprev'] == 'Y' || $thissurvey['allowjumps'] == 'Y')) {
$moveResult = LimeExpressionManager::NavigateBackwards();
if ($moveResult['at_start']) {
$_SESSION['step'] = 0;
unset($moveResult);
// so display welcome page again
}
}
if (isset($move) && $move == "movenext") {
if (isset($_SESSION['LEMreload'])) {
LimeExpressionManager::StartSurvey($thissurvey['sid'], $surveyMode, $surveyOptions, false, $LEMdebugLevel);
$moveResult = LimeExpressionManager::JumpTo($_SESSION['step'], false, false);
// if late in the survey, will re-validate contents, which may be overkill
unset($_SESSION['LEMreload']);
} else {
$moveResult = LimeExpressionManager::NavigateForwards();
}