anketa ID missing!"); } $this->sid = $anketa; SurveyInfo::getInstance()->SurveyInit($anketa); $this->reloadSettings(); } public function ajax() { if ($this->sid != null) { switch ($_GET['a']) { case 'reset_interval' : $this->ResetSlideshowInterval(); $this->ShowSlideshowSetings(); break; case 'save_settings' : $this->SaveSlideshowSettings(); break; default: print_r("
"); print_r($_POST); print_r($_GET); break; } } else { die("Class Slideshow not inited!"); } } /** prebere nastavitve iz baze * */ public function reloadSettings() { $slide_settings_qry = sisplet_query("SELECT * FROM srv_slideshow_settings WHERE ank_id='$this->sid'"); $slide_settings = mysqli_fetch_assoc($slide_settings_qry); $this->settings = $slide_settings; } /** vrne vse nastavitve ali posamezno vrednost nastavitev za slideshow * */ public function getSettings($what = null) { if (!is_countable($this->settings) || !count($this->settings) > 0) { $this->reloadSettings(); } if ($what == null) { return $this->settings; } else { return $this->settings[$what]; } } /** * posebne opcije in navodile za anketo slideshow */ public function ShowSlideshowSetings () { global $lang; $row = SurveyInfo::getInstance()->getSurveyRow(); $slide_settings_qry = sisplet_query("SELECT * FROM srv_slideshow_settings WHERE ank_id='$this->sid'"); $slide_settings = mysqli_fetch_assoc($slide_settings_qry); echo ''; #saving echo '