$modeAppend .= '/(theme)/' . $theme->id; } catch (Exception $e) { } } else { $defaultTheme = erLhcoreClassModelChatConfig::fetch('default_theme_id')->current_value; if ($defaultTheme > 0) { try { $theme = erLhAbstractModelWidgetTheme::fetch($defaultTheme); $Result['theme'] = $theme; $modeAppend .= '/(theme)/' . $theme->id; } catch (Exception $e) { } } } $tpl->set('append_mode', $modeAppend); $votingRelative = erLhcoreClassQuestionary::getReletiveVoting($referer); $answer = new erLhcoreClassModelQuestionAnswer(); $votingAnswer = new erLhcoreClassModelQuestionOptionAnswer(); if ($votingRelative !== false) { if (isset($_POST['VoteAction'])) { $definition = array('Option' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 1)), 'QuestionID' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 1))); // Captcha stuff if (erLhcoreClassModelChatConfig::fetch('session_captcha')->current_value == 1) { // Start session if required only $currentUser = erLhcoreClassUser::instance(); $hashCaptcha = isset($_SESSION[$_SERVER['REMOTE_ADDR']]['form']) ? $_SESSION[$_SERVER['REMOTE_ADDR']]['form'] : null; $nameField = 'captcha_' . $hashCaptcha; } else { $nameField = 'captcha_' . sha1(erLhcoreClassIPDetect::getIP() . $_POST['tscaptcha'] . erConfigClassLhConfig::getInstance()->getSetting('site', 'secrethash')); } $definition[$nameField] = new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string');