displayMultitext($spremenljivka) ************************************************/ public function multitext($spremenljivka) { $row = Model::select_from_srv_spremenljivka($spremenljivka); $loop_id = get('loop_id') == null ? " IS NULL" : " = '" . get('loop_id') . "'"; // izracuni za sirino celic $size = $row['grids']; $spremenljivkaParams = new enkaParameters($row['params']); $hideLabels = false; $gridWidth = $spremenljivkaParams->get('gridWidth'); switch ($gridWidth) { case -2: $hideLabels = true; $gridWidth = 30; // just in case če se kje kaj računa, itak je skrit. break; case -1: case 0: $gridWidth = 30; break; } $gridAlign = (($spremenljivkaParams->get('gridAlign') > 0) ? $spremenljivkaParams->get('gridAlign') : 0); $cssAlign = ''; if ($gridAlign == 1) $cssAlign = ' alignLeft'; elseif ($gridAlign == 2) $cssAlign = ' alignRight'; //$css = ' style = "width: '.$gridWidth.'%;" '; if ($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit']) $limit = '(' . $row['vsota_min'] . ')'; elseif ($row['num_useMin'] == 1 && $row['num_useMax'] == 1) $limit = '(min ' . $row['vsota_min'] . ', max ' . $row['vsota_limit'] . ')'; elseif ($row['num_useMin'] == 1) $limit = '(min ' . $row['vsota_min'] . ')'; elseif ($row['num_useMax'] == 1) $limit = '(max ' . $row['vsota_limit'] . ')'; else $limit = ''; //************Params za omejitev sliderjev //tvorjenje omejitve******************************************************************************** $slider_MinNumLabel = ($spremenljivkaParams->get('slider_MinNumLabel') ? $spremenljivkaParams->get('slider_MinNumLabel') : 0); $slider_MaxNumLabel = ($spremenljivkaParams->get('slider_MaxNumLabel') ? $spremenljivkaParams->get('slider_MaxNumLabel') : 100); $limit_slider_mobile = '(min ' . $slider_MinNumLabel . ', max ' . $slider_MaxNumLabel . ')'; //************ // omejitev vnosa if ($row['vsota_show'] == 1 && $row['ranking_k'] != '1' && $row['tip'] == 20) { echo ' '; } # polovimo vrednosti gridov, prevedmo naslove in hkrati preverimo ali imamo missinge $srv_grids = array(); $mv_count = 0; # koliko je stolpcev z manjkajočimi vrednostmi # če polje other != 0 je grid kot missing $sql_grid = sisplet_query("SELECT * FROM srv_grid WHERE spr_id='$row[id]' ORDER BY vrstni_red"); while ($row_grid = mysqli_fetch_assoc($sql_grid)) { # priredimo naslov če prevajamo anketo $naslov = Language::srv_language_grid($row['id'], $row_grid['id']); if ($naslov != '') { $row_grid['naslov'] = $naslov; } $srv_grids[$row_grid['id']] = $row_grid; # če je označena kot manjkajoča jo prištejemo k manjkajočim if ($row_grid['other'] != 0) { $mv_count++; } } echo ' ' . "\n"; if ($hideLabels == false) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } echo ''; for ($i = 1; $i <= $row['grids']; $i++) echo ''; echo ''; if ($mv_count > 0) { echo ''; echo ''; echo ''; echo ''; for ($i = 1; $i <= $mv_count; $i++) echo ''; echo ''; } echo ''; echo ' ' . "\n"; if ($hideLabels == false) { echo ' ' . "\n"; echo ' ' . "\n"; } # če imamo mankajoče potem dodamo še en prazen stolpec za razmak if ($mv_count > 0) { $size += 1 + $mv_count; } # če imamo enoto povečamo št. stoplcev if ($row['enota'] == 1) { $size += 2; } //ce imamo nastavljno sirino prvega grida ostalih ne nastavljamo if ($gridWidth == 30) $cellsize = round(80 / $size); else $cellsize = 'auto'; $spacesize = round(80 / $size / 4); $taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1); $taHeight = ($spremenljivkaParams->get('taHeight') ? $spremenljivkaParams->get('taHeight') : 1); //default sirina if ($taWidth == -1) { $taWidth = 80; } else { //$taWidth = $taWidth * 10 * 2; // da dobimo % (opcije se od 1 - 5) $taWidth = $taWidth * 10; // da dobimo % (opcije se od 1 - 9) } $bg = 1; # Izpišemo TOP vrstico z labelami if (count($srv_grids) > 0) { $first_missing_value = true; foreach ($srv_grids AS $g_id => $srv_grid) { if ((string)$srv_grid['other'] != '0' && $first_missing_value == true) { # dodamo spejs pred manjkajočimi vrednostmi echo ''; $first_missing_value = false; } // Datapiping $srv_grid['naslov'] = Helper::dataPiping($srv_grid['naslov']); # izpišemo labelo grida echo '' . "\n"; } } echo ' ' . "\n"; echo ''; echo ''; $bg++; $orderby = Model::generate_order_by_field($spremenljivka, get('usr_id')); // Cache textovnih odgovorov $srv_data_cache = array(); $sql2 = sisplet_query("SELECT * FROM srv_data_textgrid" . get('db_table') . " WHERE spr_id='$row[id]' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id ORDER BY grd_id"); while ($row2 = mysqli_fetch_assoc($sql2)) { $srv_data_cache[$row2['vre_id']][$row2['grd_id']] = $row2; } // Cache missingov $srv_data_grid = array(); $sql_grid = sisplet_query("SELECT * FROM srv_data_grid" . get('db_table') . " WHERE spr_id='$row[id]' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); while ($row_grid = mysqli_fetch_array($sql_grid)) { $srv_data_grid[$row_grid['vre_id']] = $row_grid; } $sql1 = sisplet_query("SELECT * FROM srv_vrednost WHERE spr_id='$row[id]' ORDER BY FIELD(vrstni_red, $orderby)"); while ($row1 = mysqli_fetch_array($sql1)) { $naslov = Language::getInstance()->srv_language_vrednost($row1['id']); if ($naslov != '') $row1['naslov'] = $naslov; # preverimo izbrano vrednost $grid_id = $srv_data_grid[$row1['id']]['grd_id']; # ugotovimo ali je na katerem gridu predhodno izbran missing $is_missing = false; if (count($srv_grids) > 0) { foreach ($srv_grids AS $i => $srv_grid) { if ($srv_grid['other'] != 0) { $grid_id = $srv_data_grid[$row1['id']]['grd_id']; if ($srv_grids[$i]['id'] == $grid_id) { $is_missing = true; } } } } // Datapiping $row1['naslov'] = Helper::dataPiping($row1['naslov']); echo ' 0?' style="display:none"':'')*/ . '' . (($row1['hidden'] == 1) ? 'style="display:none"' : '') . (($row1['hidden'] == 2) ? 'class="answer-disabled"' : '') . '>' . "\n"; if ($hideLabels == false) { echo ' ' . "\n"; echo ' ' . "\n"; } if (count($srv_grids) > 0) { $first_missing_value = true; foreach ($srv_grids AS $i => $srv_grid) { if ($srv_grid['other'] != 0) $grid_id = $srv_data_grid[$row1['id']]['grd_id']; else $grid_id = $srv_data_cache[$row1['id']][$i]['grd_id']; $value = $srv_grid['id']; $vsebina = ''; if ($grid_id == $value) { $vsebina = $srv_data_cache[$row1['id']][$i]['text']; //$row2 = mysqli_fetch_array($sql2); } if ((string)$srv_grid['other'] != '0' && $first_missing_value == true) { # dodamo spejs pred manjkajočimi vrednostmi echo ''; $first_missing_value = false; } # izpišemo labelo grida //multitext if ($row['tip'] == 19) { if ($srv_grid['other'] != 0) { # imamo missing nardimo radio echo '' . "\n"; } else { echo '' . "\n"; } //multinumber - rabimo JS checkNumber } else { if ($srv_grid['other'] != 0) { # imamo missing nardimo radio echo '' . "\n"; } else { echo '' . "\n"; $bg++; } echo ''; echo '
' . $srv_grid['naslov'] . '
' . $row1['naslov']; if ($row1['other'] == 1) { $sql3 = sisplet_query("SELECT text FROM srv_data_text" . get('db_table') . " WHERE spr_id='$spremenljivka' AND vre_id='$row1[id]' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); $row3 = mysqli_fetch_array($sql3); $otherWidth = ($spremenljivkaParams->get('otherWidth') ? $spremenljivkaParams->get('otherWidth') : -1); $otherHeight = ($spremenljivkaParams->get('otherHeight') ? $spremenljivkaParams->get('otherHeight') : 1); if ($otherHeight > 1) echo ' '; else echo ' '; //echo ' '; } echo ' '; echo ''; echo ''; //echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; //multislider //if ($row['ranking_k'] == 1 && get('mobile') == 0) { if ($row['ranking_k'] == 1) { //slider na PC, tablici in mobilniku $spremenljivkaParams = new enkaParameters($row['params']); $slider_handle = ($spremenljivkaParams->get('slider_handle') ? $spremenljivkaParams->get('slider_handle') : 0); $slider_window_number = ($spremenljivkaParams->get('slider_window_number') ? $spremenljivkaParams->get('slider_window_number') : 0); $slider_nakazi_odgovore = ($spremenljivkaParams->get('slider_nakazi_odgovore') ? $spremenljivkaParams->get('slider_nakazi_odgovore') : 0); //za checkbox $slider_MinMaxNumLabelNew = ($spremenljivkaParams->get('slider_MinMaxNumLabelNew') ? $spremenljivkaParams->get('slider_MinMaxNumLabelNew') : 0); $slider_MinMaxLabel = ($spremenljivkaParams->get('slider_MinMaxLabel') ? $spremenljivkaParams->get('slider_MinMaxLabel') : 0); $slider_VmesneNumLabel = ($spremenljivkaParams->get('slider_VmesneNumLabel') ? $spremenljivkaParams->get('slider_VmesneNumLabel') : 0); $slider_VmesneDescrLabel = ($spremenljivkaParams->get('slider_VmesneDescrLabel') ? $spremenljivkaParams->get('slider_VmesneDescrLabel') : 0); $slider_VmesneCrtice = ($spremenljivkaParams->get('slider_VmesneCrtice') ? $spremenljivkaParams->get('slider_VmesneCrtice') : 0); $slider_handle_step = ($spremenljivkaParams->get('slider_handle_step') ? $spremenljivkaParams->get('slider_handle_step') : 1); $slider_MinLabel = ($spremenljivkaParams->get('slider_MinLabel') ? $spremenljivkaParams->get('slider_MinLabel') : "Minimum"); $slider_MaxLabel = ($spremenljivkaParams->get('slider_MaxLabel') ? $spremenljivkaParams->get('slider_MaxLabel') : "Maximum"); //$slider_MinNumLabel = ($spremenljivkaParams->get('slider_MinNumLabel') ? $spremenljivkaParams->get('slider_MinNumLabel') : 0); //$slider_MaxNumLabel = ($spremenljivkaParams->get('slider_MaxNumLabel') ? $spremenljivkaParams->get('slider_MaxNumLabel') : 100); $slider_NumofDescrLabels = ($spremenljivkaParams->get('slider_NumofDescrLabels') ? $spremenljivkaParams->get('slider_NumofDescrLabels') : 5); $slider_DescriptiveLabel_defaults = ($spremenljivkaParams->get('slider_DescriptiveLabel_defaults') ? $spremenljivkaParams->get('slider_DescriptiveLabel_defaults') : 0); $slider_DescriptiveLabel_defaults_naslov1 = ($spremenljivkaParams->get('slider_DescriptiveLabel_defaults_naslov1') ? $spremenljivkaParams->get('slider_DescriptiveLabel_defaults_naslov1') : 0); $displayMinMaxLabel = ($slider_MinMaxLabel == 0) ? ' style="display:none;"' : ''; if(get('lang_id') != null){ $lang_id = get('lang_id'); $ank_id = get('anketa'); $sqlString = "SELECT label, label_id FROM srv_language_slider WHERE ank_id='$ank_id' AND spr_id='$spremenljivka' AND lang_id='$lang_id' ORDER BY label_id"; $sqlSlider = sisplet_query($sqlString); while ($rowsqlSlider = mysqli_fetch_array($sqlSlider)) { if($rowsqlSlider['label_id'] == 1){ $MinLabel = $rowsqlSlider['label']; } elseif($rowsqlSlider['label_id'] == 2){ $MaxLabel = $rowsqlSlider['label']; }elseif($row['label_id'] == 0){ $custom = $rowsqlSlider['label']; } } if($slider_DescriptiveLabel_defaults && $custom==''){ //ce so prednalozene opisne labele drsnika in nimamo se prevoda $custom_ar = explode(';', $slider_DescriptiveLabel_defaults_naslov1); }else{ //ce so custom opisne labele drsnika $custom_ar = explode('; ', $custom); } // Ce slucajno nimamo prevedeno uporabimo original $MinLabel = ($MinLabel == '') ? ($spremenljivkaParams->get('MinLabel') ? $spremenljivkaParams->get('MinLabel') : self::$lang['srv_new_text']) : $MinLabel; $MaxLabel = ($MaxLabel == '') ? ($spremenljivkaParams->get('MaxLabel') ? $spremenljivkaParams->get('MaxLabel') : self::$lang['srv_new_text']) : $MaxLabel; } else{ $MinLabel = ($spremenljivkaParams->get('MinLabel') ? $spremenljivkaParams->get('MinLabel') : self::$lang['srv_new_text']); $MaxLabel = ($spremenljivkaParams->get('MaxLabel') ? $spremenljivkaParams->get('MaxLabel') : self::$lang['srv_new_text']); } //echo '
'; echo '
'; //$default_value = round(($row['vsota_limit']-$row['vsota_min']) / 2) + $row['vsota_min']; $default_value = round(($slider_MaxNumLabel - $slider_MinNumLabel) / 2) + $slider_MinNumLabel; $vrednost = ($vsebina == '') ? $default_value : $vsebina; //labeli nad min in max drsnikov ############################################################ if (get('mobile') == 0 || get('mobile') == 2) {//ce PC ali tablica echo ''; } else if (get('mobile') == 1) { //ce mobilnik echo '
'; } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
' . $MinLabel . '' . $MaxLabel . '
'; //labeli nad min in max drsnikov - konec #################################################### echo '
' . $vrednost . '
'; //echo '
'.$row['vsota_min'].'
'; //echo '
'; //echo '
'.$row['vsota_limit'].'
'; if (get('mobile') == 0 || get('mobile') == 2) {//ce PC ali tablica echo '
'; } else if (get('mobile') == 1) { //ce mobilnik echo '
'; } echo '
'; //za custom opisne labele //moznosti urejanja opisnih label drsnika if($slider_VmesneDescrLabel){ for($i=1; $i<=$slider_NumofDescrLabels; $i++){ if($custom == ''){ //ce nimamo prevoda opisnih label za drsnika $slider_CustomDescriptiveLabelsTmp = ($spremenljivkaParams->get('slider_Labela_opisna_'.$i) ? $spremenljivkaParams->get('slider_Labela_opisna_'.$i) : ''); }else{ //ce mamo prevod opisnih label za drsnika $slider_CustomDescriptiveLabelsTmp = $custom_ar[$i-1]; } $slider_CustomDescriptiveLabelsTmp = preg_replace("/\s| /",' ',$slider_CustomDescriptiveLabelsTmp); //za odstranitev morebitnih presledkov, ki lahko delajo tezave pri polju za drsnik if($i == 1){ $slider_CustomDescriptiveLabels = $slider_CustomDescriptiveLabelsTmp; }else{ $slider_CustomDescriptiveLabels .= "; ".$slider_CustomDescriptiveLabelsTmp; } } } //za custom opisne labele - konec ?> ' . "\n"; } } } } echo '
' . "\n"; // Izpis prejsnjih odgovorov (ce imamo vklopljeno nastavitev) $prevAnswers = ($spremenljivkaParams->get('prevAnswers') ? $spremenljivkaParams->get('prevAnswers') : 0); if($prevAnswers == 1) self::display_prevAnswers($spremenljivka); } /************************************************ * Stara funkcija $this->displayTextbox($spremenljivka) ************************************************/ public function textbox($spremenljivka, $oblika) { global $recaptcha_sitekey; global $lang; $row = Model::select_from_srv_spremenljivka($spremenljivka); $loop_id = get('loop_id') == null ? " IS NULL" : " = '" . get('loop_id') . "'"; $spremenljivkaParams = new enkaParameters($row['params']); if($row['num_useMin'] == 1 && $row['num_useMax'] == 1 && $row['vsota_min'] == $row['vsota_limit']) $limit = '('.$lang['srv_text_length_char_num'].$row['vsota_min'].')'; elseif($row['num_useMin'] == 1 && $row['num_useMax'] == 1) $limit = '('.$lang['srv_text_length_char_num'].'min '.$row['vsota_min'].', max '.$row['vsota_limit'].')'; elseif($row['num_useMin'] == 1) $limit = '('.$lang['srv_text_length_char_num'].'min '.$row['vsota_min'].')'; elseif($row['num_useMax'] == 1) $limit = '('.$lang['srv_text_length_char_num'].'max '.$row['vsota_limit'].')'; else $limit = ''; $taSize = ($spremenljivkaParams->get('taSize') ? $spremenljivkaParams->get('taSize') : 1); $taWidth = ($spremenljivkaParams->get('taWidth') ? $spremenljivkaParams->get('taWidth') : -1); $max_text_length = ($row['vsota_limit'] > 0 ? ' maxlength="'.$row['vsota_limit'].'"' : ''); $email_verify = ($spremenljivkaParams->get('emailVerify') ? $spremenljivkaParams->get('emailVerify') : 0); //default sirina if ($taWidth == -1) $taWidth = 30; # preverimo ali je vrednost v bazi missing $missing = Check::getInstance()->checkMissingForSpremenljivka($spremenljivka, $loop_id); if ((int)$missing > 0) { $srv_data_vrednost[$missing] = true; } // Ce imamo slucajno vklopljeno nastavitev da so odgovori disabled $disabled_vprasanje = ($spremenljivkaParams->get('disabled_vprasanje') == '1') ? true : false; if ($row['upload'] == 1 || $row['upload'] == 2 ) // max size echo ''; echo '' . "\n"; if ($row['orientation'] != 3) echo ''; # za polja drugo $array_others = array(); $sql1 = sisplet_query("SELECT id, naslov, vrstni_red, other, size, naslov2 FROM srv_vrednost WHERE spr_id='$row[id]' AND vrstni_red > 0 ORDER BY vrstni_red"); $i = 1; while ($row1 = mysqli_fetch_array($sql1)) { # če ni polje drugo if ((int)$row1['other'] == 0) { $naslov = Language::getInstance()->srv_language_vrednost($row1['id']); if ($naslov != '') $row1['naslov'] = $naslov; $sql2 = sisplet_query("SELECT text FROM srv_data_text" . get('db_table') . " WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND vre_id='$row1[id]' AND loop_id $loop_id"); $row2 = mysqli_fetch_array($sql2); // sirina celice td $cell = $row['text_kosov'] == 1 ? 100 : $row1['size']; $width = round(100 / $row['text_kosov'], 0); // sirina vnosnega polja $input = $taWidth; if ($row['orientation'] == 3) echo ''; echo '' . "\n"; if ($row['orientation'] == 3) echo ''; } else { # imamo polje drugo - ne vem, zavrnil... $array_others[$row1['id']] = array( 'naslov' => $row1['naslov'], 'vrstni_red' => $row1['vrstni_red'] ); } $i++; } if ($row['orientation'] != 3) echo ''; echo '
' . "\n"; // Datapiping $row1['naslov'] = Helper::dataPiping($row1['naslov']); //izpisi if ($row['text_orientation'] == 1 || $row['text_orientation'] == 3) { echo '' . "\n"; if ($row['text_orientation'] == 3) echo '
'; } // Ni signature ali upload if ($row['upload'] == 0 && $row['signature'] == 0) { // if captcha == 1 $spremenljivkaParams = new enkaParameters($row['params']); $captcha = ($spremenljivkaParams->get('captcha') ? $spremenljivkaParams->get('captcha') : 0); if ($captcha == 1) { echo '
'; } else { $char_counter_events = $limit ? 'charCounter(this);' : ''; // Ce gre za email preverjamo pravilnost na blur in ne na keyup $js_trigger = ($email_verify == 1) ? 'onBlur' : 'onKeyUp'; echo ''; } } // Signature elseif ($row['signature'] != 0 && $row['upload'] == 0) { //***novo echo ' ' . "\n"; echo ' ' . "\n"; //za ureditev vpogleda v posamezno enoto $quick_view = json_encode(get('quick_view')); // options za risanje signature in ostale spremenljivke echo ' '; //***novo //$sqlSignature = sisplet_query("SELECT filename FROM srv_data_upload WHERE usr_id = '" . get('usr_id') . "'"); $sqlSignature = sisplet_query("SELECT filename FROM srv_data_upload WHERE usr_id = '" . get('usr_id') . "' AND code='" . $spremenljivka . "' "); if (mysqli_num_rows($sqlSignature) > 0) { $rowSignature = mysqli_fetch_array($sqlSignature); $signaturefile = $rowSignature[0]; echo ' '; //echo $rowSignature[0]; } else { //predelano - začetek urejanja javascript kode za delovanje podpisa echo ' '; //predelano - konec } // Dobimo sirino polja - ce je mobile ga pomanjsamo if(get('mobile') == 1){ $width = 300; $height = 150; } else{ $width = 600; $height = 200; } echo '

'; echo ' ' . self::$lang['srv_signature_name'] . ' ' . '
'; } // Smo v admin podatkih in uplodamo datoteko ali fotografijo elseif( ($row['upload'] == 1 || $row['upload'] == 2) && ($_GET['t'] == 'postprocess' || $_GET['m'] == 'quick_edit') ){ $sqlUpload = sisplet_query("SELECT filename FROM srv_data_upload WHERE usr_id='".get('usr_id')."' AND code='".$row2['text']."'"); // Ze imamo datoteko - moznost brisanja v adminu if(mysqli_num_rows($sqlUpload) > 0){ $rowUpload = mysqli_fetch_array($sqlUpload); $file = $rowUpload[0]; global $site_url; echo '
'.$file.'
'; // Remove file button if($_GET['quick_view'] != '1'){ echo ''; } } // Uploadamo datoteko preko admina - TODO else{ echo ''; } } // Upload elseif ($row['upload'] == 1) { echo ''; // Remove file button echo ''; } // Fotografiranje elseif ($row['upload'] == 2) { $inpname = 'vrednost_' . $spremenljivka . '_kos_' . $row1['id']; $inpid = 'spremenljivka_' . $spremenljivka . '_vrednost_' . $i; echo ''; echo ''; echo '
'.$lang['srv_alert_foto_remove'].'
'; echo '
'; echo ''; ?> ' . "\n"; } // omejitev vnosa if ($row['vsota_show'] == 1) { echo ''; } echo '
' . "\n"; if (count($array_others) > 0) { $missing = 1; foreach ($array_others AS $oKey => $other) { # missing vrednost $_id = 'missing_value_spremenljivka_' . $spremenljivka . '_vrednost_' . $oKey; if ($srv_data_vrednost[$oKey]) { $sel = true; } else { $sel = false; } # če nimamo missingov in je trenutni enak izbranemu, ali če imamo misinge inje trenutni enak izbranemu misingu $_checked = ($sel ? ' checked' : ''); // Tole ni definirano in ne more delat?? zakaj bi sploh kadarkoli bil missing disabled?? //$_disabled = ($is_missing && ($row1['other'] == 0 || $row1['other'] == 1) ? true : false); $_disabled = false; $naslov = Language::getInstance()->srv_language_vrednost($oKey); if ($naslov != '') $other['naslov'] = $naslov; // Ali skrivamo missing ne vem in ga prikazemo sele ob opozorilu $hide_missing = false; $already_set_mv = array(); $sql_grid_mv = sisplet_query("SELECT naslov, other FROM srv_vrednost WHERE spr_id='" . $spremenljivka . "' AND other != 0"); while ($row_grid_mv = mysqli_fetch_array($sql_grid_mv)) { $already_set_mv[$row_grid_mv['other']] = $row_grid_mv['naslov']; } if ((($row['alert_show_99'] > 0 && isset($already_set_mv['-99']) && $already_set_mv['-99'] == $other['naslov']) || ($row['alert_show_98'] > 0 && isset($already_set_mv['-98']) && $already_set_mv['-98'] == $other['naslov']) || ($row['alert_show_97'] > 0 && isset($already_set_mv['-97']) && $already_set_mv['-97'] == $other['naslov'])) && $_checked == '' ) $hide_missing = true; $checkbox_limit = ($spremenljivkaParams->get('checkbox_limit') ? $spremenljivkaParams->get('checkbox_limit') : 0); echo ''; } } SystemVariable::display($spremenljivka, $oblika); // Izpis prejsnjih odgovorov (ce imamo vklopljeno nastavitev) $prevAnswers = ($spremenljivkaParams->get('prevAnswers') ? $spremenljivkaParams->get('prevAnswers') : 0); if($prevAnswers == 1) self::display_prevAnswers($spremenljivka); } // Prikazemo stare odgovore pod vprasanjem (nastavitev prevAnswers) private function display_prevAnswers($spremenljivka){ echo '
'; echo self::$lang['srv_prevAnswers'].':'; echo '
'; //$sql = sisplet_query("SELECT text FROM srv_data_text" . get('db_table') . " WHERE spr_id='$spremenljivka' AND usr_id!='" . get('usr_id') . "' AND vre_id='$row1[id]' AND loop_id $loop_id"); $sql = sisplet_query("SELECT text FROM srv_data_text" . get('db_table') . " WHERE spr_id='".$spremenljivka."' AND usr_id!='".get('usr_id')."' ORDER BY id DESC limit 30"); while($row = mysqli_fetch_array($sql)){ echo '

'; echo $row['text']; echo '

'; } $sqlC = sisplet_query("SELECT count(*) FROM srv_data_text" . get('db_table') . " WHERE spr_id='".$spremenljivka."' AND usr_id!='".get('usr_id')."'"); $rowC = mysqli_fetch_array($sqlC); if($rowC['count(*)'] > 30){ // gumb "vec" da prikazemo vse echo '('.self::$lang['srv_more'].'...)'; // div za izris vseh echo '
'; } echo '
'; echo '
'; } }