get('checkbox_limit') ? $spremenljivkaParams->get('checkbox_limit') : 0); // Pri WebSM anketi nimamo userja, zato ne izvajamo ajaxa $ajax = 'true'; $usr_id = get('usr_id'); if (get('anketa') == get('webSMSurvey') && Common::checkModule('websmsurvey') == '1') { $ajax = 'false'; $usr_id = 0; } // Pri vpogledu moramo deaktivirati canvas in tipke (quick_edit & quick_view = 0) $quick_view = json_encode(get('quick_view')); //n>k // prestavljanje //if ($row['design'] == 0 && get('mobile') == 0){ $order = Model::generate_order_by_field($spremenljivka, get('usr_id')); //$sql1 = sisplet_query("SELECT * FROM srv_vrednost WHERE spr_id = '$spremenljivka' AND vrstni_red>0 ORDER BY FIELD(vrstni_red, $order)"); $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id='$spremenljivka' AND id NOT IN(SELECT vre_id FROM srv_data_rating WHERE spr_id = '$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id) ORDER BY FIELD(vrstni_red, $order)"); //izracun visine $num = mysqli_num_rows($sql1); //stevilo trenutnih kategorij odgovorov v levem bloku $size = $num * 37; $sqlc = sisplet_query("SELECT * FROM srv_data_rating WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); $count = mysqli_num_rows($sqlc); echo '
'; //echo '
'; echo ''; echo ''; //zaslon razdelimo na dva dela - izris leve strani echo ''; //srednja celica (stevilo prenesenih in spodaj puscica) if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico echo ''; //izris desne strani echo ''; echo ''; echo '
'; if (get('lang_id') != null) $_lang = '_' . get('lang_id'); else $_lang = ''; $srv_ranking_avaliable_categories = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_ranking_avaliable_categories' . $_lang); if ($srv_ranking_avaliable_categories == '') $srv_ranking_avaliable_categories = self::$lang['srv_ranking_avaliable_categories']; echo '' . $srv_ranking_avaliable_categories . ':'; //echo '
'; echo '
'; $sql1 = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$spremenljivka' AND id NOT IN(SELECT vre_id FROM srv_data_rating WHERE spr_id = '$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id) ORDER BY FIELD(vrstni_red, $order)"); echo '
    '; if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico echo '
  • '; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo '
  • '; } while ($row1 = mysqli_fetch_array($sql1)) { $naslov = Language::getInstance()->srv_language_vrednost($row1['id']); if ($naslov != '') $row1['naslov'] = $naslov; //$this->display_DropBox($row1['naslov'], $row1['id']); $value = $row1['naslov']; // Datapiping $value = Helper::dataPiping($value); $vre_id = $row1['id']; $length = strlen($value); //dolzina teksta kategorije odgovora $style = ''; if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico $class = 'ranking'; } else if (get('mobile') == 1) { $class = 'ranking_mobile'; } $c = ''; $other = $row1['other']; //drugo, po navadi missing //********* potrebno za pravilno prikazovanje predogleda if(isset($_GET['a'])){ if($_GET['a'] == 'preview_spremenljivka'){ $preview_spremenljivka = 1; echo ' '; }else{ $preview_spremenljivka = 0; echo ' '; } }else{ $preview_spremenljivka = 0; echo ' '; } //********* potrebno za pravilno prikazovanje predogleda - konec ?> '; //echo '
'; //vrednost_if_ID //div ki vsebuje vrednost //if($length > 30) // if($length > 90){ // $niz = substr($value, 0, 90); //echo '
'.$niz.'...
'."\n"; // echo '
'.$niz.'...
'."\n"; // } // else //echo '
'.$value.'
'."\n"; // echo '
'.$value.'
'."\n"; //else{ //echo '
'.$value.'
'."\n"; echo '
' . $value . '
' . "\n"; //'#spremenljivka_'+spremenljivka+'_vrednost_'+id //} } echo '' . "\n"; echo ''; echo '
'; //half_$spremenljivka echo '
'; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo ''; } echo ''; //echo 'arrow'; echo ''; echo '' . self::$lang['srv_drag_drop_answers'] . ':'; echo '
'; // ker na td ne primer position relative za nastavit position absolute na dropzone echo '
'; $sql2 = sisplet_query("SELECT vre_id FROM srv_data_rating WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id ORDER BY vrstni_red ASC"); while ($row2 = mysqli_fetch_array($sql2)) { $sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE id='$row2[vre_id]' "); $row1 = mysqli_fetch_array($sql1); $naslov = Language::getInstance()->srv_language_vrednost($row1['id']); if ($naslov != '') $row1['naslov'] = $naslov; // Datapiping $row1['naslov'] = Helper::dataPiping($row1['naslov']); $this->display_DropBox($row1['naslov'], $row1['id']); } //echo '
'; //echo '
'; //echo '
'; //vrednost_if_ID // echo '
'; //half2_$spremenljivka if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico echo '
    '; echo '
  • ' . "\n"; echo '
'; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo '
    '; echo '
  • ' . "\n"; echo '
'; } echo '
'; //half2_$spremenljivka echo '
'; //dropholder echo '
'; //Gumb za resetiranje echo '
'; //echo ''; echo ''; //srv_drag_and_drop_reset_button echo '
'; echo '
'; //} ?> get('display_drag_and_drop_new_look') ? $spremenljivkaParams->get('display_drag_and_drop_new_look') : 0); //za checkbox //***********za skatlasto obliko - konec $quick_view = json_encode(get('quick_view')); // Pri WebSM anketi nimamo userja, zato ne izvajamo ajaxa $ajax = 'true'; $usr_id = get('usr_id'); if (get('anketa') == get('webSMSurvey') && Common::checkModule('websmsurvey') == '1') { $ajax = 'false'; $usr_id = 0; } //n>k // prestavljanje //if ($row['design'] == 0 && get('mobile') == 0){ $order = Model::generate_order_by_field($spremenljivka, get('usr_id')); //$sql1 = sisplet_query("SELECT * FROM srv_vrednost WHERE spr_id = '$spremenljivka' AND vrstni_red>0 ORDER BY FIELD(vrstni_red, $order)"); $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id='$spremenljivka' AND id NOT IN(SELECT vre_id FROM srv_data_rating WHERE spr_id = '$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id) ORDER BY FIELD(vrstni_red, $order)"); //izracun visine $num = mysqli_num_rows($sql1); //stevilo trenutnih kategorij odgovorov v levem bloku $size = $num * 37; $sqlc = sisplet_query("SELECT * FROM srv_data_rating WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); $count = mysqli_num_rows($sqlc); echo '
'; //echo '
'; echo ''; echo ''; //zaslon razdelimo na dva dela - izris leve strani echo ''; //srednja celica (stevilo prenesenih in spodaj puscica) if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico echo ''; //izris desne strani*********************************************************************************** echo ''."\n"; $first_missing_value = false; } # izpišemo labelo grida //echo ' '."\n"; echo $srv_grid['naslov']; } */ //} //glede na število gridov, dodati ustrezno stevilo
  • oz. okvirjev echo '
      '; $first_missing_value = true; foreach ($srv_grids AS $i => $srv_grid) { /* if ((string)$srv_grid['other'] != '0' && $first_missing_value == true) { # dodamo spejs pred manjkajočimi vrednostmi echo '
  • '."\n"; $first_missing_value = false; } */ // Datapiping $srv_grid['naslov'] = Helper::dataPiping($srv_grid['naslov']); if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico if($display_drag_and_drop_new_look == 0){ echo '
  • ' . $srv_grid['naslov'] . '
  • ' . "\n"; //izpis "naslova" okvirja echo '
  • ' . "\n"; //izpis okvirja }else if($display_drag_and_drop_new_look == 1){ echo '
  • ' . "\n"; //izpis okvirja echo '
  • ' . $srv_grid['naslov'] . '
  • ' . "\n"; //izpis "naslova" okvirja } } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik if($display_drag_and_drop_new_look == 0){ echo '
  • ' . $srv_grid['naslov'] . '
  • ' . "\n"; //izpis "naslova" okvirja echo '
  • ' . "\n"; //izpis okvirja }else if($display_drag_and_drop_new_look == 1){ echo '
  • ' . "\n"; //izpis okvirja echo '
  • ' . $srv_grid['naslov'] . '
  • ' . "\n"; //izpis "naslova" okvirja } } ?> '; echo ''; //half2_$spremenljivka echo ''; //dropholder echo ''; //************************************************ konec izrisa desne strani echo ''; echo '
    '; if (get('lang_id') != null) $_lang = '_' . get('lang_id'); else $_lang = ''; $srv_ranking_avaliable_categories = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_ranking_avaliable_categories' . $_lang); if ($srv_ranking_avaliable_categories == '') $srv_ranking_avaliable_categories = self::$lang['srv_ranking_avaliable_categories']; echo '' . $srv_ranking_avaliable_categories . ':'; //echo '
    '; echo '
    '; $sql1 = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$spremenljivka' AND id NOT IN(SELECT vre_id FROM srv_data_rating WHERE spr_id = '$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id) ORDER BY FIELD(vrstni_red, $order)"); if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico echo '
      '; echo '
    • '; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo '
        '; echo '
      • '; } while ($row1 = mysqli_fetch_array($sql1)) { $naslov = Language::getInstance()->srv_language_vrednost($row1['id']); if ($naslov != '') $row1['naslov'] = $naslov; //$this->display_DropBox($row1['naslov'], $row1['id']); $value = $row1['naslov']; // Datapiping $value = Helper::dataPiping($value); $vre_id = $row1['id']; $length = strlen($value); //dolzina teksta kategorije odgovora $style = ''; if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico $class = 'ranking'; } else if (get('mobile') == 1) { $class = 'ranking_mobile'; } $c = ''; $other = $row1['other']; //drugo, po navadi missing //********* potrebno za pravilno prikazovanje predogleda if(isset($_GET['a'])){ if($_GET['a'] == 'preview_spremenljivka'){ $preview_spremenljivka = 1; echo ' '; }else{ $preview_spremenljivka = 0; echo ' '; } }else{ $preview_spremenljivka = 0; echo ' '; } //********* potrebno za pravilno prikazovanje predogleda - konec ?> ' . $value . '
    ' . "\n"; //'#spremenljivka_'+spremenljivka+'_vrednost_'+id } echo '' . "\n"; echo ''; echo '
    '; //half_$spremenljivka echo '
    '; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo ''; } echo ''; //echo 'arrow'; echo ''; echo '' . self::$lang['srv_drag_drop_answers'] . ':'; echo '
    '; // ker na td ne primer position relative za nastavit position absolute na dropzone echo '
    '; $sql2 = sisplet_query("SELECT vre_id FROM srv_data_rating WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id ORDER BY vrstni_red ASC"); while ($row2 = mysqli_fetch_array($sql2)) { $sql1 = sisplet_query("SELECT id, naslov FROM srv_vrednost WHERE id='$row2[vre_id]' "); $row1 = mysqli_fetch_array($sql1); $naslov = Language::getInstance()->srv_language_vrednost($row1['id']); if ($naslov != '') $row1['naslov'] = $naslov; // Datapiping $row1['naslov'] = Helper::dataPiping($row1['naslov']); $this->display_DropBox($row1['naslov'], $row1['id']); } # polovimo vrednosti gridov, prevedemo 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='$spremenljivka' ORDER BY vrstni_red"); while ($row_grid = mysqli_fetch_assoc($sql_grid)) { # priredimo naslov če prevajamo anketo $naslov = Language::srv_language_grid($spremenljivka, $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++; } } # Izpišemo TOP vrstico z labelami //if (count($srv_grids) > 0) { /* $first_missing_value = true; foreach ($srv_grids AS $i => $srv_grid) { if ((string)$srv_grid['other'] != '0' && $first_missing_value == true) { # dodamo spejs pred manjkajočimi vrednostmi echo '
    '.$srv_grid['naslov'].'
    '; //Gumb za resetiranje echo '
    '; //echo ''; echo ''; //srv_drag_and_drop_reset_button echo '
    '; echo '
    '; //} //********* urejanje prikaza ob morebitnem refresh-u strani ali prehod na naslednjo oz. prejsnjo stran //preveri, ce je ze kaj v bazi. Pomembno, za prikazovanje ze odgovorjenih zadev, ko uporabnik gre na prejsnjo stran ali kaj podobnega if ($row['tip'] == 6) { $sql2_PP = sisplet_query("SELECT spr_id, vre_id, grd_id FROM srv_data_grid" . get('db_table') . " WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); } elseif ($row['tip'] == 16) { //$sql2_PP = sisplet_query("SELECT spr_id, vre_id, grd_id FROM srv_data_checkgrid WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); $sql2_PP = sisplet_query("SELECT spr_id, vre_id, grd_id FROM srv_data_checkgrid_active WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); } ?> 30) if ($length > 90) { $niz = substr($value, 0, 90); echo '
    ' . $niz . '...
    ' . "\n"; } else echo '
    ' . $value . '
    ' . "\n"; else echo '
    ' . $value . '
    ' . "\n"; } }