From 19985dbb8c0aa66dc4bf7905abc1148de909097d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 11 Jan 2022 12:35:47 +0100 Subject: prvi-commit --- .../app/Controllers/Vprasanja/DatumController.php | 187 +++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 main/survey/app/Controllers/Vprasanja/DatumController.php (limited to 'main/survey/app/Controllers/Vprasanja/DatumController.php') diff --git a/main/survey/app/Controllers/Vprasanja/DatumController.php b/main/survey/app/Controllers/Vprasanja/DatumController.php new file mode 100644 index 0000000..21552b5 --- /dev/null +++ b/main/survey/app/Controllers/Vprasanja/DatumController.php @@ -0,0 +1,187 @@ +' . "\n"; + $sql1 = sisplet_query("SELECT text FROM srv_data_text" . get('db_table') . " WHERE spr_id='$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id"); + $row1 = mysqli_fetch_array($sql1); + + echo ' '; + + echo '' . "\n"; + + $array_others = array(); + $sql_other = sisplet_query("SELECT id,naslov FROM srv_vrednost WHERE spr_id='$spremenljivka' AND vrstni_red > 0 AND other != '0' ORDER BY vrstni_red"); + while ($other = mysqli_fetch_array($sql_other)) { + # imamo polje drugo - ne vem, zavrnil... + $_id = 'missing_value_spremenljivka_' . $spremenljivka . '_vrednost_' . $other['id']; + + if ($srv_data_vrednost[$other['id']]) { + $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' : ''); + + + // 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; + + $naslov = Language::getInstance()->srv_language_vrednost($other['id']); + if ($naslov != '') $other['naslov'] = $naslov; + + echo ''; + } + + + # če smo v quick_view mode ne omogočamo + if (get('quick_view') == false) { + $date_element = "#vrednost_" . $spremenljivka; + + // Ce izbiramo tudi cas - V DELU + $timepicker = ($spremenljivkaParams->get('date_withTime') > 0) ? 'true' : 'false'; + + ?> + +