public function showLoginDirect($primkey, $message) { global $survey, $engine; require_once "display/templates/displayquestion_" . $survey->getTemplate() . ".php"; $returnStr = $this->showHeader($survey->getTitle(), '<link href="bootstrap/css/sticky-footer-navbar.min.css" rel="stylesheet">'); if (true) { if ($primkey != '') { $returnStr .= '<form method="post" id="startform">'; $returnStr .= '<input type=hidden name="' . POST_PARAM_PRIMKEY . '" value="' . decryptC($primkey, Config::directLoginKey()) . '">'; $returnStr .= '<input type=hidden name="' . POST_PARAM_SUID . '" value="' . $survey->getSuid() . '">'; $returnStr .= '<input type=hidden name="' . POST_PARAM_LANGUAGE . '" value="' . loadvar(POST_PARAM_LANGUAGE) . '">'; $returnStr .= '<input type=hidden name="' . POST_PARAM_PRELOAD . '" value="' . loadvar(POST_PARAM_PRELOAD) . '">'; $returnStr .= '<input type=hidden name="' . POST_PARAM_MODE . '" value="' . loadvar(POST_PARAM_MODE) . '">'; $returnStr .= '<input type=hidden name="' . POST_PARAM_URID . '" value="' . loadvar(POST_PARAM_URID) . '">'; if (loadvar(POST_PARAM_URID) != '') { $_SESSION['URID'] = loadvar(POST_PARAM_URID); } $returnStr .= '<div style="display: none;"><input type=submit></div>'; $returnStr .= '</form>'; $returnStr .= '<script>'; $returnStr .= '$(document).ready(function(){ $("#startform").submit(); }); '; $returnStr .= '</script>'; } else { $returnStr .= '<div id="wrap">'; $returnStr .= '<div class="container"><p>'; $engine = loadEngine($survey->getSuid(), $primkey, '', getSurveyVersion(), getBaseSectionSeid($survey->getSuid())); $do = $engine->getDisplayObject(); $returnStr .= $do->showDirectAccessOnlySurvey(); //$returnStr .= Language::errorDirectLogin(); } } else { $returnStr .= '<div id="wrap">'; $returnStr .= '<div class="container"><p>'; //$returnStr .= Language::errorDirectLogin(); $engine = loadEngine($survey->getSuid(), $primkey, '', getSurveyVersion(), getBaseSectionSeid($survey->getSuid())); $do = $engine->getDisplayObject(); $returnStr .= $do->showDirectAccessOnlySurvey(); } /* footer */ $returnStr .= $this->showFooter(); return $returnStr; }
function getDataEncryptionKey($default = true) { $val = $this->getSettingValue(SETTING_DATA_ENCRYPTION_KEY, $default); if ($val != "") { return decryptC($val, Config::dataEncryptionKey()); } return ""; }