_sid = $sid; # polovimo vse obstoječe ife $this->_conditions[0] = array( 'id' => '0', 'name' => $lang['srv_inv_condition_new_filter'], 'number' => '0', 'tip' => '0', 'label' => $lang['srv_inv_condition_new_filter'], 'collapsed' => '0', 'folder' => '0', 'enabled' => '1', 'tab' => '0' ); $str = "SELECT sif.*, ssc.name FROM srv_if AS sif JOIN srv_survey_conditions AS ssc ON (sif.id = ssc.if_id) WHERE ssc.ank_id = '$this->_sid'"; $qry = sisplet_query($str); while ($row = mysqli_fetch_assoc($qry)) { if (isset($row['id']) && (int)$row['id'] > 0) { $this->_conditions[$row['id']] = $row; } } if (isset($_REQUEST['surveyConditionProfileAction']) && !empty($_REQUEST['surveyConditionProfileAction'])) { $this->_chooseProfileJSAction = $_REQUEST['surveyConditionProfileAction']; } } public function ajax() { switch ($_GET['a']) { case 'showCondition' : $this->displayConditions((int)$_POST['cid']); break; case 'newCondition' : $this->newCondition(); break; case 'deleteCondition' : $this->deleteCondition((int)$_POST['cid']); break; case 'showRename' : $this->showRename(); break; case 'renameCondition' : $this->renameCondition(); break; default: echo 'ERROR! Missing function for action: '.$_GET['a'].'! (SurveyConditionProfile)'; break; } } public function displayConditions($pid) { global $lang; $popUp = new PopUp(); $popUp->setId('divConditionProfiles'); $popUp->setHeaderText($lang[''].'Filtriranje s pogoji'); #vsebino shranimo v buffer ob_start(); echo ''; echo '