diff --git a/admin/survey/classes/class.Library.php b/admin/survey/classes/class.Library.php index 17db1d373..d774cd63c 100644 --- a/admin/survey/classes/class.Library.php +++ b/admin/survey/classes/class.Library.php @@ -27,41 +27,45 @@ class Library { if (isset($surveySkin)) $this->skin = $surveySkin; - //include_once('Branching.php'); - $this->SurveyAdmin = new SurveyAdmin(1, -1); $this->Branching = new Branching($this->SurveyAdmin->anketa); - if (isset($_options['tab'])) { $this->tab = $_options['tab']; if ($this->tab <= 1) $this->tip = 0; else $this->tip = 1; - } else if (isset($_POST['tab'])) { + } + else if (isset($_POST['tab'])) { $this->tab = ($_POST['tab'] == 0 || $_POST['tab'] == 'undefined') ? 0 : $_POST['tab']; if ($this->tab <= 1) $this->tip = 0; else $this->tip = 1; - } else { + } + else { $this->tab = 0; $this->tip = 0; } + if (isset($_options['prva'])) { $this->prva = $_options['prva']; - } else { + } + else { $this->prva = 0; } + if (isset($_GET['tab'])) $this->tab = (int)$_GET['tab']; // nastavimo mode v odvisnosti od survey_type ( če nismo v anketi je -1) if (isset($this->SurveyAdmin->anketa) && $this->SurveyAdmin->anketa > 0) { $_st = $this->SurveyAdmin->getSurvey_type($this->SurveyAdmin->anketa); - if ($_st > -1) + + if ($_st > -1) $this->mode = $_st; } + $this->repareTabs(); // Preverimo ce gre za search po anketah @@ -195,24 +199,28 @@ class Library { echo 'tip").'">'; echo 'prva").'">'; - //echo '
'.$lang['srv_kopiranje'].'
'; - echo ''."\n"; echo ' '."\n"; - } if ($parent == 0) { @@ -910,7 +916,6 @@ class Library { sisplet_query("DELETE FROM srv_library_anketa WHERE ank_id='$anketa' AND uid='0'"); - //$this->display(); $this->display_folders(); } @@ -921,7 +926,6 @@ class Library { sisplet_query("DELETE FROM srv_library_anketa WHERE ank_id='$anketa' AND uid='$global_user_id'"); - //$this->display(); $this->display_folders(); }