Пример #1
0
 function showEditSettingsAssistanceRes()
 {
     $displaySysAdmin = new DisplaySysAdmin();
     $survey = new Survey($_SESSION['SUID']);
     $_SESSION['EDITSURVEY'] = 1;
     $survey->setLoginError(loadvarAllowHTML(SETTING_LOGIN_ERROR));
     $survey->setEmptyMessage(loadvarAllowHTML(SETTING_EMPTY_MESSAGE));
     $survey->setErrorMessageMinimumLength(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_LENGTH));
     $survey->setErrorMessageMaximumLength(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_LENGTH));
     $survey->setErrorMessageMinimumWords(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_WORDS));
     $survey->setErrorMessageMaximumWords(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_WORDS));
     $survey->setErrorMessagePattern(loadvarAllowHTML(SETTING_ERROR_MESSAGE_PATTERN));
     $survey->setErrorMessageDouble(loadvarAllowHTML(SETTING_ERROR_MESSAGE_DOUBLE));
     $survey->setErrorMessageInteger(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INTEGER));
     $survey->setErrorMessageSelectMinimum(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_SELECT));
     $survey->setErrorMessageSelectMaximum(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_SELECT));
     $survey->setErrorMessageSelectExact(loadvarAllowHTML(SETTING_ERROR_MESSAGE_EXACT_SELECT));
     $survey->setErrorMessageSelectInvalidSubset(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INVALID_SUB_SELECT));
     $survey->setErrorMessageSelectInvalidSet(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INVALID_SELECT));
     $survey->setErrorMessageRange(loadvarAllowHTML(SETTING_ERROR_MESSAGE_RANGE));
     $survey->setErrorMessageMaximumCalendar(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_CALENDAR));
     $survey->setErrorMessageInlineAnswered(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_ANSWERED));
     $survey->setErrorMessageInlineExactRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_EXACT_REQUIRED));
     $survey->setErrorMessageInlineExclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_EXCLUSIVE));
     $survey->setErrorMessageInlineInclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_INCLUSIVE));
     $survey->setErrorMessageInlineMinimumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_MINIMUM_REQUIRED));
     $survey->setErrorMessageInlineMaximumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_MAXIMUM_REQUIRED));
     $survey->setErrorMessageExactRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_EXACT_REQUIRED));
     $survey->setErrorMessageMinimumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_REQUIRED));
     $survey->setErrorMessageMaximumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_REQUIRED));
     $survey->setErrorMessageExclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_EXCLUSIVE));
     $survey->setErrorMessageInclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INCLUSIVE));
     $survey->setErrorMessageUniqueRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_UNIQUE_REQUIRED));
     $survey->setErrorMessageSameRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_SAME_REQUIRED));
     $survey->setErrorMessageEnumeratedEntered(loadvarAllowHTML(SETTING_ERROR_MESSAGE_ENUMERATED_ENTERED));
     $survey->setErrorMessageSetOfEnumeratedEntered(loadvarAllowHTML(SETTING_ERROR_MESSAGE_SETOFENUMERATED_ENTERED));
     $survey->setErrorMessageComparisonEqualTo(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_EQUAL_TO));
     $survey->setErrorMessageComparisonNotEqualTo(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_NOT_EQUAL_TO));
     $survey->setErrorMessageComparisonGreaterEqualTo(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_GREATER_EQUAL_TO));
     $survey->setErrorMessageComparisonGreater(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_GREATER));
     $survey->setErrorMessageComparisonSmallerEqualTo(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_SMALLER_EQUAL_TO));
     $survey->setErrorMessageComparisonSmaller(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_SMALLER));
     $survey->setErrorMessageComparisonEqualToIgnoreCase(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_EQUAL_TO_IGNORE_CASE));
     $survey->setErrorMessageComparisonNotEqualToIgnoreCase(loadvarAllowHTML(SETTING_ERROR_MESSAGE_COMPARISON_NOT_EQUAL_TO_IGNORE_CASE));
     $survey->save();
     $compiler = new Compiler($_SESSION['SUID'], getSurveyVersion($survey));
     $mess = $compiler->generateGetFillsSurvey();
     $mess = $compiler->generateInlineFieldsSurvey();
     $content = $displaySysAdmin->displaySuccess(Language::messageAssistanceSettingsChanged());
     /* update last page */
     $_SESSION['LASTPAGE'] = substr($_SESSION['LASTPAGE'], 0, strripos($_SESSION['LASTPAGE'], "res"));
     return $displaySysAdmin->showEditSettingsAssistance($content);
 }
Пример #2
0
 function showTranslateSettingsAssistanceRes()
 {
     $displayTranslator = new DisplayTranslator();
     $survey = new Survey($_SESSION['SUID']);
     $_SESSION['EDITSURVEY'] = 1;
     $survey->setEmptyMessage(loadvarAllowHTML(SETTING_EMPTY_MESSAGE));
     $survey->setErrorMessageMinimumLength(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_LENGTH));
     $survey->setErrorMessageMaximumLength(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_LENGTH));
     $survey->setErrorMessageMinimumWords(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_WORDS));
     $survey->setErrorMessageMaximumWords(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_WORDS));
     $survey->setErrorMessagePattern(loadvarAllowHTML(SETTING_ERROR_MESSAGE_PATTERN));
     $survey->setErrorMessageDouble(loadvarAllowHTML(SETTING_ERROR_MESSAGE_DOUBLE));
     $survey->setErrorMessageInteger(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INTEGER));
     $survey->setErrorMessageSelectMinimum(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_SELECT));
     $survey->setErrorMessageSelectMaximum(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_SELECT));
     $survey->setErrorMessageSelectExact(loadvarAllowHTML(SETTING_ERROR_MESSAGE_EXACT_SELECT));
     $survey->setErrorMessageSelectInvalidSubset(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INVALID_SUB_SELECT));
     $survey->setErrorMessageSelectInvalidSet(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INVALID_SELECT));
     $survey->setErrorMessageRange(loadvarAllowHTML(SETTING_ERROR_MESSAGE_RANGE));
     $survey->setErrorMessageMaximumCalendar(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_CALENDAR));
     $survey->setErrorMessageInlineAnswered(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_ANSWERED));
     $survey->setErrorMessageInlineExactRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_EXACT_REQUIRED));
     $survey->setErrorMessageInlineExclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_EXCLUSIVE));
     $survey->setErrorMessageInlineInclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_INCLUSIVE));
     $survey->setErrorMessageInlineMinimumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_MINIMUM_REQUIRED));
     $survey->setErrorMessageInlineMaximumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INLINE_MAXIMUM_REQUIRED));
     $survey->setErrorMessageExactRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_EXACT_REQUIRED));
     $survey->setErrorMessageMinimumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MINIMUM_REQUIRED));
     $survey->setErrorMessageMaximumRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_MAXIMUM_REQUIRED));
     $survey->setErrorMessageExclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_EXCLUSIVE));
     $survey->setErrorMessageInclusive(loadvarAllowHTML(SETTING_ERROR_MESSAGE_INCLUSIVE));
     $survey->setErrorMessageUniqueRequired(loadvarAllowHTML(SETTING_ERROR_MESSAGE_UNIQUE_REQUIRED));
     $survey->save();
     $content = $displayTranslator->displaySuccess(Language::messageAssistanceTextsChanged());
     /* update last page */
     $_SESSION['LASTPAGE'] = substr($_SESSION['LASTPAGE'], 0, strripos($_SESSION['LASTPAGE'], "res"));
     return $displayTranslator->showTranslateSettingsAssistance($content);
 }