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 --- main/survey/app/Controllers/HeaderController.php | 126 +++++++++++++++++------ 1 file changed, 93 insertions(+), 33 deletions(-) (limited to 'main/survey/app/Controllers/HeaderController.php') diff --git a/main/survey/app/Controllers/HeaderController.php b/main/survey/app/Controllers/HeaderController.php index 1a7df13..ad77435 100644 --- a/main/survey/app/Controllers/HeaderController.php +++ b/main/survey/app/Controllers/HeaderController.php @@ -15,6 +15,7 @@ use SurveyAdvancedParadataLog; use SurveyInfo; use SurveyThemeEditor; use SurveyPanel; +use AppSettings; class HeaderController extends Controller { @@ -55,7 +56,6 @@ class HeaderController extends Controller 'urejanje', 'quick_view', 'disableif', - 'disablealert', 'disablecode', 'displayifs', 'displayvariables', @@ -116,9 +116,11 @@ class HeaderController extends Controller return header('Location: ' . self::$site_url); die("Missing anketa id!"); } - $anketa = (($get->anketa) ? $get->anketa : $_POST['anketa']); + $anketa_hash = (($get->anketa) ? $get->anketa : $_POST['anketa']); + $anketa = getSurveyIdFromHash($anketa_hash); // Shranimo vse spremenljivke iz get parametrov v classu VariableClass + save('anketa_hash', $anketa_hash); save('anketa', $anketa); save('get', $get); @@ -149,8 +151,6 @@ class HeaderController extends Controller * @desc zgenereira header */ public function header(){ - global $app_settings; - // preprecimo caching - tudi s klikom na gumb nazaj! header("Last-Modified: " . gmdate("D, j M Y H:i:s") . " GMT"); @@ -168,8 +168,8 @@ class HeaderController extends Controller $rowv = mysqli_fetch_array($sqlv); // Custom header title - if(isset($app_settings['head_title_custom']) && $app_settings['head_title_custom'] == 1){ - echo ''.strip_tags(Helper::getInstance()->displayAkronim(0)).' - '.$app_settings['head_title_text'].'' . "\n"; + if(AppSettings::getInstance()->getSetting('app_settings-head_title_custom')){ + echo ''.strip_tags(Helper::getInstance()->displayAkronim(0)).' - '.AppSettings::getInstance()->getSetting('app_settings-head_title_text').'' . "\n"; } // Default header title else{ @@ -181,6 +181,9 @@ class HeaderController extends Controller // Preprecimo vklop compatibility moda v IE echo ' ' . "\n"; + // Preprecimo indexiranje botov (google...) + echo ' ' . "\n"; + // nova verzija UI 1.8.10 - includamo minificirano skupaj z script.js (uporabimo iste jQuery fajle kot v adminu) echo ' ' . "\n"; echo '' . "\n"; @@ -188,13 +191,14 @@ class HeaderController extends Controller // tukaj nalozimo CSS za jquery in template temo echo ' ' . "\n"; - //nalozimo stringe iz langa za JS + // nalozimo stringe iz langa za JS echo '' . "\n"; - // nalozimo open sans fonte za nov design - echo ''; - /*echo '';*/ - echo ''; + // nalozimo source sans pro fonte za nov design + echo ''; + // Zaenkrat se obdrzimo montserratt zaradi kompatibilnosti za nazaj + echo ''; + // CSS mobile skin za telefone in tablice @@ -205,7 +209,15 @@ class HeaderController extends Controller // za MJU anketo nalozimo posebej custom skin if(SurveyInfo::getInstance()->checkSurveyModule('mju_theme') == '1'){ $this->loadCustomMadeSkin($custom_skin='MJU'); - } + } + // Custom skin za IAS (Spanci) + elseif($row['skin'] == 'IAS'){ + $this->loadCustomMadeSkin($custom_skin='IAS'); + } + // Custom skin za IAS (Spanci) + elseif($row['skin'] == 'Automaticservis'){ + $this->loadCustomMadeSkin($custom_skin='Automaticservis'); + } // CSS samo za mobilne telefone else{ $this->themeEditorMobileCustom(); @@ -220,6 +232,14 @@ class HeaderController extends Controller if(SurveyInfo::getInstance()->checkSurveyModule('mju_theme') == '1'){ $this->loadCustomMadeSkin($custom_skin='MJU'); } + // Custom skin za IAS (Spanci) + elseif($row['skin'] == 'IAS'){ + $this->loadCustomMadeSkin($custom_skin='IAS'); + } + // Custom skin za IAS (Spanci) + elseif($row['skin'] == 'Automaticservis'){ + $this->loadCustomMadeSkin($custom_skin='Automaticservis'); + } // profili tem - skinov else{ $this->themeEditor(); @@ -236,6 +256,14 @@ class HeaderController extends Controller elseif(SurveyInfo::getInstance()->checkSurveyModule('mju_theme') == '1'){ $this->loadCustomMadeSkin($custom_skin='MJU'); } + // Custom skin za IAS (Spanci) + elseif($row['skin'] == 'IAS'){ + $this->loadCustomMadeSkin($custom_skin='IAS'); + } + // Custom skin za Automaticservis + elseif($row['skin'] == 'Automaticservis'){ + $this->loadCustomMadeSkin($custom_skin='Automaticservis'); + } // profili tem - skinov else{ $this->themeEditor(); @@ -293,7 +321,7 @@ class HeaderController extends Controller $preview = ' class="preview"'; echo '' . "\n"; - // Zamenjamo class no_js z js -> test javacsripta za userje (javascript_warning) + echo "