From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- admin/survey/classes/class.SurveyMissingValues.php | 75 +++++++++------------- 1 file changed, 31 insertions(+), 44 deletions(-) (limited to 'admin/survey/classes/class.SurveyMissingValues.php') diff --git a/admin/survey/classes/class.SurveyMissingValues.php b/admin/survey/classes/class.SurveyMissingValues.php index 5ea0377..6205edc 100644 --- a/admin/survey/classes/class.SurveyMissingValues.php +++ b/admin/survey/classes/class.SurveyMissingValues.php @@ -44,14 +44,19 @@ class SurveyMissingValues * @param mixed $anketa */ function __construct ($anketa = 0) { + if (self::$anketa == null) { - if (isset ($_GET['anketa']) && (int)$_GET['anketa'] > 0) { + + if ((int)$anketa > 0) { + self::$anketa = (int)$anketa; + } + elseif (isset ($_GET['anketa']) && (int)$_GET['anketa'] > 0) { self::$anketa = $_GET['anketa']; - } elseif (isset ($_POST['anketa']) && (int)$_POST['anketa'] > 0) { + } + elseif (isset ($_POST['anketa']) && (int)$_POST['anketa'] > 0) { self::$anketa = $_POST['anketa']; - } elseif ((int)$anketa > 0) { - self::$anketa = (int)$anketa; } + # polovimo nastavitve ankete če obstaja if (self::$anketa != null && (int)self::$anketa > 0) { @@ -220,7 +225,7 @@ class SurveyMissingValues while ( $rowSystemSetting_filters = mysqli_fetch_assoc($sqlSystemSetting_filters) ) { # naredimo prevode: - $result[$rowSystemSetting_filters['filter']] = $lang['srv_mv_'.$rowSystemSetting_filters['text']] != '' ? $lang['srv_mv_'.$rowSystemSetting_filters['text']] : $rowSystemSetting_filters['text'];; + $result[$rowSystemSetting_filters['filter']] = isset($lang['srv_mv_'.$rowSystemSetting_filters['text']]) ? $lang['srv_mv_'.$rowSystemSetting_filters['text']] : $rowSystemSetting_filters['text'];; } self::$_systemFiltersByType[$type] = $result; return self::$_systemFiltersByType[$type]; @@ -467,6 +472,10 @@ class SurveyMissingValues echo '
'; echo ''.$lang['srv_survey_missing_title'].':'; + + echo '

'.$lang['srv_survey_missing_text'].':

'; + + $_survey_missing_values = self::GetSurveyMissingValues(); if (self::$mySqlErrNo == '1062') { @@ -474,26 +483,21 @@ class SurveyMissingValues } if ( count($_survey_missing_values) > 0 ) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo '
'; - echo ' '.$lang['srv_filter_vrednost'].''; - echo ''; - echo ' '.$lang['srv_label'].''; - echo ''; - echo ' '.''; - echo ' 
'; + //Table header + echo ''; + echo ''; + echo ''; + echo ''; echo ''; + foreach ( $_survey_missing_values as $type => $type_missing_values) { foreach ($type_missing_values AS $type_missing_value) { $key = $type_missing_value['value']; $text = $type_missing_value['text']; $sysValue = $type_missing_value['defSysVal']; - echo ''; + echo ''; echo ''; - echo ''; echo ''; echo ''; } } - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; echo '
'.$lang['srv_filter_vrednost'].''.$lang['srv_label'].'
'; echo ''; @@ -501,30 +505,22 @@ class SurveyMissingValues echo ''; echo ''; echo ''; - if ($sysValue != null) { - echo '['.$sysValue.']'; - } - echo ''; - echo ' '; + echo ''; echo '
  '; - echo ' '; - echo '
'; } if ($si_mv == '0') { echo ''.$lang['srv_survey_missing_default'].'
'; } else { - echo ''.$lang['srv_survey_missing_default'].'
'; + echo ''.$lang['srv_survey_missing_add'].''; + + echo '
'; + echo ''; + echo '
'; } echo ''; @@ -652,7 +648,7 @@ class SurveyMissingValues echo ''; echo ''; echo ''; echo '
'; - echo ' '.$lang['srv_filter_vrednost'].''; + echo ' '.$lang['srv_filter_vrednost'].'test'; echo ''; echo ' '.$lang['srv_filter_variabla'].''; @@ -703,21 +699,12 @@ class SurveyMissingValues if ($_REQUEST['a'] != 'missing') { if ($what == 'start') { $sa=new SurveyAdmin(self::$anketa); - echo ''; - echo '