Example #1
0
 function showEditSettingsLayoutRes()
 {
     $displaySysAdmin = new DisplaySysAdmin();
     $_SESSION['EDITSURVEY'] = 1;
     $survey = new Survey($_SESSION['SUID']);
     $survey->setPageHeader(loadvarAllowHTML(SETTING_PAGE_HEADER));
     $survey->setPageFooter(loadvarAllowHTML(SETTING_PAGE_FOOTER));
     $survey->setQuestionAlignment(loadvar(SETTING_QUESTION_ALIGNMENT));
     $ans = loadvar(SETTING_QUESTION_FORMATTING);
     if (!is_array($ans)) {
         $ans = array($ans);
     }
     $survey->setQuestionFormatting(implode("~", $ans));
     $survey->setAnswerAlignment(loadvar(SETTING_ANSWER_ALIGNMENT));
     $ans = loadvar(SETTING_ANSWER_FORMATTING);
     if (!is_array($ans)) {
         $ans = array($ans);
     }
     $survey->setAnswerFormatting(implode("~", $ans));
     $survey->setButtonAlignment(loadvar(SETTING_BUTTON_ALIGNMENT));
     $ans = loadvar(SETTING_BUTTON_FORMATTING);
     if (!is_array($ans)) {
         $ans = array($ans);
     }
     $survey->setButtonFormatting(implode("~", $ans));
     $survey->setShowBackButton(loadvar(SETTING_BACK_BUTTON));
     $survey->setShowNextButton(loadvar(SETTING_NEXT_BUTTON));
     $survey->setShowDKButton(loadvar(SETTING_DK_BUTTON));
     $survey->setShowRFButton(loadvar(SETTING_RF_BUTTON));
     $survey->setShowUpdateButton(loadvar(SETTING_UPDATE_BUTTON));
     $survey->setShowNAButton(loadvar(SETTING_NA_BUTTON));
     $survey->setShowRemarkButton(loadvar(SETTING_REMARK_BUTTON));
     $survey->setShowCloseButton(loadvar(SETTING_CLOSE_BUTTON));
     $survey->setShowRemarkSaveButton(loadvar(SETTING_REMARK_SAVE_BUTTON));
     $survey->setLabelBackButton(loadvarAllowHTML(SETTING_BACK_BUTTON_LABEL));
     $survey->setLabelNextButton(loadvarAllowHTML(SETTING_NEXT_BUTTON_LABEL));
     $survey->setLabelDKButton(loadvarAllowHTML(SETTING_DK_BUTTON_LABEL));
     $survey->setLabelRFButton(loadvarAllowHTML(SETTING_RF_BUTTON_LABEL));
     $survey->setLabelUpdateButton(loadvarAllowHTML(SETTING_UPDATE_BUTTON_LABEL));
     $survey->setLabelNAButton(loadvarAllowHTML(SETTING_NA_BUTTON_LABEL));
     $survey->setLabelRemarkButton(loadvarAllowHTML(SETTING_REMARK_BUTTON_LABEL));
     $survey->setLabelCloseButton(loadvarAllowHTML(SETTING_CLOSE_BUTTON_LABEL));
     $survey->setLabelRemarkSaveButton(loadvarAllowHTML(SETTING_REMARK_SAVE_BUTTON_LABEL));
     $survey->setShowProgressBar(loadvar(SETTING_PROGRESSBAR_SHOW));
     $survey->setProgressBarType(loadvar(SETTING_PROGRESSBAR_TYPE));
     $survey->setProgressBarFillColor(loadvar(SETTING_PROGRESSBAR_FILLED_COLOR));
     $survey->setProgressBarWidth(loadvar(SETTING_PROGRESSBAR_WIDTH));
     $survey->setTemplate(loadvar(SETTING_SURVEY_TEMPLATE));
     $survey->setErrorPlacement(loadvar(SETTING_ERROR_PLACEMENT));
     $survey->setHeaderAlignment(loadvar(SETTING_HEADER_ALIGNMENT));
     $ans = loadvar(SETTING_HEADER_FORMATTING);
     if (!is_array($ans)) {
         $ans = array($ans);
     }
     $survey->setTableWidth(loadvar(SETTING_TABLE_WIDTH));
     $survey->setQuestionColumnWidth(loadvar(SETTING_QUESTION_COLUMN_WIDTH));
     $survey->setHeaderFormatting(implode("~", $ans));
     $survey->setHeaderFixed(loadvar(SETTING_HEADER_FIXED));
     $survey->setHeaderScrollDisplay(loadvar(SETTING_HEADER_SCROLL_DISPLAY));
     $survey->setTableBordered(loadvar(SETTING_GROUP_TABLE_BORDERED));
     $survey->setTableCondensed(loadvar(SETTING_GROUP_TABLE_CONDENSED));
     $survey->setTableHovered(loadvar(SETTING_GROUP_TABLE_HOVERED));
     $survey->setTableStriped(loadvar(SETTING_GROUP_TABLE_STRIPED));
     $survey->setTableMobile(loadvar(SETTING_TABLE_MOBILE));
     $survey->setTableMobileLabels(loadvar(SETTING_TABLE_MOBILE_LABELS));
     $survey->setEnumeratedDisplay(loadvar(SETTING_ENUMERATED_ORIENTATION));
     $survey->setEnumeratedBordered(loadvar(SETTING_ENUMERATED_BORDERED));
     $survey->setEnumeratedSplit(loadvar(SETTING_ENUMERATED_SPLIT));
     $survey->setEnumeratedTextbox(loadvar(SETTING_ENUMERATED_TEXTBOX));
     $survey->setEnumeratedTextboxLabel(loadvar(SETTING_ENUMERATED_TEXTBOX_LABEL));
     $survey->setEnumeratedLabel(loadvar(SETTING_ENUMERATED_LABEL));
     $survey->setHeaderAlignment(loadvar(SETTING_HEADER_ALIGNMENT));
     $ans = loadvar(SETTING_HEADER_FORMATTING);
     if (!is_array($ans)) {
         $ans = array($ans);
     }
     $survey->setHeaderFormatting(implode("~", $ans));
     $survey->setEnumeratedOrder(loadvar(SETTING_ENUMERATED_ORDER));
     $survey->setSliderOrientation(loadvar(SETTING_SLIDER_ORIENTATION));
     $survey->setIncrement(loadvar(SETTING_SLIDER_INCREMENT));
     $survey->setTooltip(loadvar(SETTING_SLIDER_TOOLTIP));
     $survey->setTextbox(loadvar(SETTING_SLIDER_TEXTBOX));
     $survey->setTextboxLabel(loadvar(SETTING_SLIDER_TEXTBOX_LABEL));
     $survey->setSliderLabelPlacement(loadvar(SETTING_SLIDER_LABEL_PLACEMENT));
     $survey->setShowSectionHeader(loadvar(SETTING_SHOW_SECTION_HEADER));
     $survey->setShowSectionFooter(loadvar(SETTING_SHOW_SECTION_FOOTER));
     $survey->save();
     $compiler = new Compiler($_SESSION['SUID'], getSurveyVersion($survey));
     $mess = $compiler->generateGetFillsSurvey();
     $mess = $compiler->generateInlineFieldsSurvey();
     $content = $displaySysAdmin->displaySuccess(Language::messageDisplaySettingsChanged());
     /* update last page */
     $_SESSION['LASTPAGE'] = substr($_SESSION['LASTPAGE'], 0, strripos($_SESSION['LASTPAGE'], "res"));
     return $displaySysAdmin->showEditSettingsLayout($content);
 }
Example #2
0
 function showTranslateSettingsLayoutRes()
 {
     $displayTranslator = new DisplayTranslator();
     $_SESSION['EDITSURVEY'] = 1;
     $survey = new Survey($_SESSION['SUID']);
     $survey->setLabelBackButton(loadvarAllowHTML(SETTING_BACK_BUTTON_LABEL));
     $survey->setLabelNextButton(loadvarAllowHTML(SETTING_NEXT_BUTTON_LABEL));
     $survey->setLabelDKButton(loadvarAllowHTML(SETTING_DK_BUTTON_LABEL));
     $survey->setLabelRFButton(loadvarAllowHTML(SETTING_RF_BUTTON_LABEL));
     $survey->setLabelUpdateButton(loadvarAllowHTML(SETTING_UPDATE_BUTTON_LABEL));
     $survey->setLabelNAButton(loadvarAllowHTML(SETTING_NA_BUTTON_LABEL));
     $survey->setLabelRemarkButton(loadvarAllowHTML(SETTING_REMARK_BUTTON_LABEL));
     $survey->setLabelCloseButton(loadvarAllowHTML(SETTING_CLOSE_BUTTON_LABEL));
     $survey->setLabelRemarkSaveButton(loadvarAllowHTML(SETTING_REMARK_SAVE_BUTTON_LABEL));
     $survey->setEnumeratedTextboxLabel(loadvar(SETTING_ENUMERATED_TEXTBOX_LABEL));
     $survey->save();
     $content = $displayTranslator->displaySuccess(Language::messageDisplayTextsChanged());
     /* update last page */
     $_SESSION['LASTPAGE'] = substr($_SESSION['LASTPAGE'], 0, strripos($_SESSION['LASTPAGE'], "res"));
     return $displayTranslator->showTranslateSettingsLayout($content);
 }