0){ $this->anketa = $anketa; } } // Nastavitve chat-a (na kateri strani se prikaze...) public function displaySettings(){ global $lang; global $site_url; $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/"); $preklici_url = "'". $site_url . $preklici_url . "'"; $row = SurveyInfo::getInstance()->getSurveyRow(); echo '
'; // Gumb shrani echo ' '; echo ''; } public function ajax() { if(isset($_GET['a']) && $_GET['a'] == 'save_settings'){ $code = isset($_POST['code']) ? $_POST['code'] : ''; $chat_type = isset($_POST['chat_type']) ? $_POST['chat_type'] : '0'; $sql = sisplet_query("INSERT INTO srv_chat_settings (ank_id, code, chat_type) VALUES ('".$this->anketa."', '".$code."', '".$chat_type."') ON DUPLICATE KEY UPDATE code='".$code."', chat_type='".$chat_type."'"); if (!$sql) echo mysqli_error($GLOBALS['connect_db']); } } }