本文整理汇总了PHP中Survey::setErrorMessagePattern方法的典型用法代码示例。如果您正苦于以下问题:PHP Survey::setErrorMessagePattern方法的具体用法?PHP Survey::setErrorMessagePattern怎么用?PHP Survey::setErrorMessagePattern使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Survey
的用法示例。
在下文中一共展示了Survey::setErrorMessagePattern方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showEditSettingsAssistanceRes
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: showTranslateSettingsAssistanceRes
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);
}