本文整理汇总了PHP中erLhcoreClassChat::setTimeZoneByChat方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassChat::setTimeZoneByChat方法的具体用法?PHP erLhcoreClassChat::setTimeZoneByChat怎么用?PHP erLhcoreClassChat::setTimeZoneByChat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类erLhcoreClassChat
的用法示例。
在下文中一共展示了erLhcoreClassChat::setTimeZoneByChat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list
}
try {
if (is_numeric((string) $Params['user_parameters_unordered']['chatid']) && $Params['user_parameters_unordered']['chatid'] > 0) {
if ((string) $Params['user_parameters_unordered']['hash'] != '') {
$hash = $Params['user_parameters_unordered']['hash'];
}
if (is_numeric($Params['user_parameters_unordered']['chatid'])) {
$chat = erLhcoreClassModelChat::fetch($Params['user_parameters_unordered']['chatid']);
}
} else {
if ((string) $Params['user_parameters_unordered']['hash'] != '') {
list($chatID, $hash) = explode('_', $Params['user_parameters_unordered']['hash']);
$chat = erLhcoreClassModelChat::fetch($chatID);
}
}
erLhcoreClassChat::setTimeZoneByChat($chat);
if ($chat->hash == $hash) {
$survey = erLhAbstractModelSurvey::fetch($Params['user_parameters_unordered']['survey']);
if ($survey instanceof erLhAbstractModelSurvey) {
$surveyItem = erLhAbstractModelSurveyItem::getInstance($chat, $survey);
if (isset($_POST['Vote'])) {
$errors = erLhcoreClassSurveyValidator::validateSurvey($surveyItem, $survey);
if (empty($errors)) {
$surveyItem->saveOrUpdate();
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('survey.filled', array('chat' => &$chat, 'survey' => $survey, 'survey_item' => &$surveyItem));
$tpl->set('just_stored', true);
} else {
$tpl->set('errors', $errors);
}
}
$tpl->set('chat', $chat);