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 '
';
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 ' '; //half_$spremenljivka
echo '
| ';
//srednja celica (stevilo prenesenih in spodaj puscica)
if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico
echo ''; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo ' | '; } echo ''; //echo ''; echo ' | '; //izris desne strani echo '';
echo '' . self::$lang['srv_drag_drop_answers'] . ':';
echo ' '; // ker na td ne primer position relative za nastavit position absolute na dropzone
echo ' '; //dropholder
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 ' '; //half2_$spremenljivka
echo '';
//echo ' '; //half2_$spremenljivka
if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico
echo '';
//echo ' '; //vrednost_if_ID
// 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 ' '; //half_$spremenljivka
echo '
| ';
//srednja celica (stevilo prenesenih in spodaj puscica)
if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico
echo ''; } else if (get('mobile') == 1) {// ce respondent uporablja mobilnik echo ' | '; } echo ''; //echo ''; echo ' | '; //izris desne strani*********************************************************************************** echo '';
echo '' . self::$lang['srv_drag_drop_answers'] . ':';
echo ' '; // ker na td ne primer position relative za nastavit position absolute na dropzone
echo ' '; //dropholder
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 ' '; //half2_$spremenljivka
echo ''."\n";
$first_missing_value = false;
}
# izpišemo labelo grida
//echo ' | '.$srv_grid['naslov'].' | '."\n";
echo $srv_grid['naslov'];
} */
//}
//glede na število gridov, dodati ustrezno stevilo
'."\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 ' | | ';
//************************************************ konec izrisa desne strani
echo '