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 --- frontend/simple/ajax.php | 9 +- frontend/simple/classes/DisplayController.php | 514 +- frontend/simple/css/aai.css | 932 + frontend/simple/css/aai.css.map | 1 + frontend/simple/css/style.css | 1073 +- frontend/simple/css/style.css.map | 2 +- frontend/simple/index.php | 22 +- frontend/simple/script/enka-21.js | 38883 ++++++++++++++++++++++++ frontend/simple/script/nav-mobile.js | 10 + frontend/simple/script/script.js | 41 +- 10 files changed, 41138 insertions(+), 349 deletions(-) create mode 100644 frontend/simple/css/aai.css create mode 100644 frontend/simple/css/aai.css.map create mode 100644 frontend/simple/script/enka-21.js create mode 100644 frontend/simple/script/nav-mobile.js (limited to 'frontend/simple') diff --git a/frontend/simple/ajax.php b/frontend/simple/ajax.php index 7873b3a..374e89e 100644 --- a/frontend/simple/ajax.php +++ b/frontend/simple/ajax.php @@ -1,8 +1,9 @@ cookieConfirm(); + } ?> \ No newline at end of file diff --git a/frontend/simple/classes/DisplayController.php b/frontend/simple/classes/DisplayController.php index 6b4d1bc..4296659 100644 --- a/frontend/simple/classes/DisplayController.php +++ b/frontend/simple/classes/DisplayController.php @@ -2,7 +2,7 @@ include_once '../../function.php'; include_once '../../vendor/autoload.php'; -include_once '../../sql/class.ImportDB.php'; +include_once '../install/classes/class.ImportDB.php'; class DisplayController{ @@ -50,16 +50,30 @@ class DisplayController{ public function displayHead(){ global $site_url; - global $app_settings; global $lang; + + // Google analytics za AAI + if(isAAI()){ + echo ' + + '; + } + + echo ' '; echo ' '; echo ' '; echo ' '; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; @@ -70,8 +84,8 @@ class DisplayController{ echo ' '; // Custom header title - if(isset($app_settings['head_title_custom']) && $app_settings['head_title_custom'] == 1){ - echo ''.$app_settings['head_title_text'].'' . "\n"; + if(AppSettings::getInstance()->getSetting('app_settings-head_title_custom')){ + echo ''.AppSettings::getInstance()->getSetting('app_settings-head_title_text').'' . "\n"; } // Default header title else{ @@ -80,6 +94,9 @@ class DisplayController{ echo ' '; echo ' '; + if(isAAI()){ + echo ' '; + } echo ' '; echo ' '; @@ -99,25 +116,75 @@ class DisplayController{ public function displayHeader(){ global $site_url; global $lang; - global $google_login_client_id; - global $aai_instalacija; - + // Logo v glavi echo ''; + + // moblie nav ---------------------- + echo '
'; + echo ' '; + + echo ''; + echo '
'; + + echo ' '; + //--------------------------------------------------- + // Navigacija - echo ''; + } } // Izris vsebine public function displayMain(){ - global $virtual_domain; switch($this->stran){ @@ -164,35 +239,35 @@ class DisplayController{ break; /*case 'register': - if(!$virtual_domain) + if(!isVirtual()) $this->displayRegisterPage(); else $this->displayFrontPage(); break;*/ case 'register_confirm': - if(!$virtual_domain) + if(!isVirtual()) $this->displayRegisterPageConfirm(); else $this->displayFrontPage(); break; case 'register_email': - if(!$virtual_domain) + if(!isVirtual()) $this->displayRegisterPageEmail(); else $this->displayFrontPage(); break; case 'unregister': - if(!$virtual_domain) + if(!isVirtual()) $this->displayUnregisterPage(); else $this->displayFrontPage(); break; case 'unregister_confirm': - if(!$virtual_domain) + if(!isVirtual()) $this->displayUnregisterPageConfirm(); else $this->displayFrontPage(); @@ -220,59 +295,105 @@ class DisplayController{ // Izris footerja public function displayFooter(){ - global $virtual_domain; global $lang; - global $app_settings; - global $aai_instalacija; - + global $site_url; // Stolpec 1 - echo '
'; + echo '
'; + echo '

'.$lang['simple_footer_about'].'

'; + echo '
'; echo ' '.$lang['simple_footer_about_1ka'].''; - if($aai_instalacija) + if(isAAI()) echo ' '.$lang['simple_footer_about_faq'].''; echo ' '.$lang['simple_footer_about_general'].''; echo ' '.$lang['simple_footer_about_privacy'].''; echo ' '.$lang['simple_footer_about_cookies'].''; echo ' '.$lang['simple_footer_about_antispam'].''; - echo ' '; - echo '
'; - - - // Stolpec 2 - echo '
'; - echo '

'.$lang['simple_footer_company'].'

'; - echo ' '.$app_settings['owner'].''; - echo ' '.$app_settings['admin_email'].''; - echo ' '.$app_settings['owner_website'].''; + echo '
'; - // Stolpec 3 - logotipi - echo '
'; + // samo za AAI + if(isAAI()){ + + // Stolpec 2 + echo '
'; + + echo '

'.$lang['simple_footer_company'].'

'; + echo ' Arnes'; + + echo '
'; + + + // stolpec 3 - spremljajte nas + echo '
'; + + echo '

'.$lang['simple_footer_about_follow'].'

'; + echo ' '; + + echo '
'; + + + // Stolpec 4 - logotipi + echo '
'; + + echo '

'.$lang['simple_footer_namestitev'].'

'; + + // Logotipa FDV in CDI - samo pri virtualkah + if(isVirtual() || isAAI()){ + echo '
'; + + echo ' ministrstvo za izobraževanje znanost in šport'; + echo ' '; + echo ' '; + + echo '
'; + } - // Logotipa FDV in CDI - samo pri virtualkah - if($virtual_domain || $aai_instalacija){ - echo '
'; - echo ' '; - echo ' '; echo '
'; } + else{ - echo '
'; + // Stolpec 2 + echo '
'; + + echo '

'.$lang['simple_footer_company'].'

'; + //echo ' '.$lang['simple_footer_company_1ka'].' '; + echo ' '.AppSettings::getInstance()->getSetting('app_settings-owner').''; + echo ' '.AppSettings::getInstance()->getSetting('app_settings-admin_email').''; + echo ' '.AppSettings::getInstance()->getSetting('app_settings-owner_website').''; + + echo '
'; + + + // stolpec 3 - spremljajte nas + echo '
'; + + echo '

'.$lang['simple_footer_about_follow'].'

'; + echo ' '; + + echo '
'; + } } // Izris prve strani private function displayFrontPage(){ - global $aai_instalacija; // AAI - if($aai_instalacija) + if(isAAI()) $this->displayFrontPageFormAAI(); else $this->displayFrontPageForm(); @@ -282,18 +403,24 @@ class DisplayController{ private function displayFrontPageForm(){ global $lang; global $site_url; - global $app_settings; - global $virtual_domain; - - - echo '
'.$app_settings['app_name'].'
'; - + echo '
'; + echo '
'.AppSettings::getInstance()->getSetting('app_settings-app_name').'
'; + + // APP SUBTITLE + echo '
'; + if(isVirtual()) + echo $lang['app_virtual_domain']; + else + echo $lang['app_installation']; + echo '
'; // WHITE BOX FOR LOGIN / REGISTRATION - echo '
'; + + echo '
'; + // Tabs - samo pri lastni instalaciji, pri virtualkah nimamo registracije - if($virtual_domain){ + if(isVirtual()){ echo '
'; echo '
'.$lang['login_short'].'
'; echo '
'; @@ -307,10 +434,10 @@ class DisplayController{ // SKB ima blokirano prijavo za vse ipje razen svojega $ip = $_SERVER['REMOTE_ADDR']; - if(isset($app_settings['admin_allow_only_ip']) - && $app_settings['admin_allow_only_ip'] != '' - && !empty($app_settings['admin_allow_only_ip']) - && !in_array($ip, $app_settings['admin_allow_only_ip']) + $admin_allow_only_ip = AppSettings::getInstance()->getSetting('app_limits-admin_allow_only_ip'); + if($admin_allow_only_ip !== false + && !empty($admin_allow_only_ip) + && !in_array($ip, $admin_allow_only_ip) ){ echo '
Prijava v aplikacijo iz obstoječega IP naslova ('.$ip.') ni mogoča!
'; } @@ -325,50 +452,114 @@ class DisplayController{ $this->displayFrontPageRegistration(); echo '
'; } - - echo '
'; - - // APP SUBTITLE - echo '
'; - if($virtual_domain) - echo $lang['app_virtual_domain']; - else - echo $lang['app_installation']; + echo '
'; echo '
'; } // Izris okna na prvi strani - AAI private function displayFrontPageFormAAI(){ global $lang; - global $site_url; - global $app_settings; + global $site_url; + + // HERO - stara verzija ----------------------- + + + echo '
'; - // WHITE BOX FOR LOGIN / REGISTRATION - echo '
'; + echo '
'; + echo '

'.$lang["hero_heading"].'

'; + echo '

'.$lang["hero_text"].'

'; + + echo ' '.$lang["AAI_prijava"].' '; + + + echo '
'; - // APP TITLE - aai - echo '
'.$app_settings['app_name'].'
'; + // STARA SLIKA + // echo 'hero image'; - // AAI logo - //echo ''; + // NOVA SLIKA - TEST - // AAI text - echo '
'; - echo '
'.$lang['app_aai_installation_text'].'
'; - echo '
'; - - // AAI login/register - echo ' '; - + echo '
'; + echo''; + echo''; + echo '
'; + + + echo '
'; - // APP SUBTITLE - /*echo '
'; - echo $lang['app_aai_installation']; - echo '
';*/ + // HERO - animiran ------------------------------------------ + + + // echo '
'; + // echo '
'; + // echo '
'; + // echo''; + // echo''; + // echo'
'; + // echo '
'; + // echo '
'; + + echo ''; + echo ''; + + + // --------------------------------------------------------- + + // POMEMBNE POVEZAVE + echo '
'; + echo '
'; + echo '

'.$lang["povezave_pomembne_povezave"].'

'; + + echo '
'; + + echo '
'; + echo 'kako deluje'; + echo '

'.$lang["povezave__kako_deluje_h2"].'

'; + echo '

'.$lang["povezave__kako_deluje_text"].'

'; + if($lang['id'] == '1') + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + else + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + echo '
'; + + echo '
'; + echo 'o 1ka'; + echo '

'.$lang["povezave_pogosta_h2"].'

'; + echo '

'.$lang["povezave_pogosta_text"].'

'; + if($lang['id'] == '1') + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + else + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + echo '
'; + + echo '
'; + echo '1ka podpora'; + echo '

'.$lang["povezave_1ka_podpora_h2"].'

'; + echo '

'.$lang["povezave_1ka_podpora_text"].'

'; + if($lang['id'] == '1') + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + else + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + echo '
'; + + echo '
'; + echo 'arnes podpora'; + echo '

'.$lang["povezave_arnes_podpora_h2"].'

'; + echo '

'.$lang["povezave_arnes_podpora_text"].'

'; + if($lang['id'] == '1') + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + else + echo ' '.$lang["povezave_preberi_vec"].'hero image '; + echo '
'; + + echo '
'; + echo '
'; + echo '
'; } // Izris okna za login na prvi strani @@ -381,7 +572,7 @@ class DisplayController{ $error = ''; } else{ - $email = (isset($_GET['email'])) ? $_GET['email'] : ''; + $email = (isset($_GET['email'])) ? htmlspecialchars($_GET['email'], ENT_QUOTES) : ''; $error = ''; if(isset($_GET['a']) && $_GET['a'] == 'login_noEmail'){ @@ -398,11 +589,11 @@ class DisplayController{ // Email echo ' '; - echo ' '; + echo ' '; // Password echo ' '; - echo ' '; + echo ' '; // Error text if($error != ''){ @@ -418,11 +609,14 @@ class DisplayController{ echo '
'; } + // Submit + echo ' '; + // Lost pass echo ' '; - // Submit - echo ' '; + // // Submit + // echo ' '; echo ''; } @@ -431,8 +625,6 @@ class DisplayController{ private function displayFrontPageRegistration(){ global $lang; global $site_url; - global $secret_captcha; - global $recaptcha_sitekey; if(!isset($_GET['a']) || $_GET['a'] != 'register'){ $email = ''; @@ -440,8 +632,8 @@ class DisplayController{ $error = array(); } else{ - $email = (isset($_GET['email'])) ? $_GET['email'] : ''; - $ime = (isset($_GET['ime'])) ? $_GET['ime'] : ''; + $email = (isset($_GET['email'])) ? htmlspecialchars($_GET['email'], ENT_QUOTES) : ''; + $ime = (isset($_GET['ime'])) ? htmlspecialchars($_GET['ime'], ENT_QUOTES) : ''; if(isset($_GET['invalid_email']) && $_GET['invalid_email'] == '1'){ $error['email'] = '1'; @@ -464,38 +656,35 @@ class DisplayController{ } - echo '
'; + echo ''; - echo ' '.$lang['cms_register_user_text'].''; - // Email - echo ' '; - echo ' '; + echo ' '; + echo ' '; // Ime echo ' '; - echo ' '; - - // RECAPTCHA - if($secret_captcha != '' && $recaptcha_sitekey != '') - echo '
'; - + echo ' '; + // Geslo echo ' '; - echo ' '; + echo ' '; // Geslo2 echo ' '; - echo ' '; + echo ' '; // Strinjam se s pogoji - //echo ' '; $terms_url = ($lang['id'] == '1') ? 'https://www.1ka.si/d/sl/o-1ka/pogoji-uporabe-storitve-1ka' : 'https://www.1ka.si/d/en/about/terms-of-use'; echo '
'; - echo '
'; + + // RECAPTCHA + if(AppSettings::getInstance()->getSetting('google-secret_captcha') !== false && AppSettings::getInstance()->getSetting('google-recaptcha_sitekey') !== false) + echo '
'; + // Error text if(!empty($error)){ @@ -527,8 +716,12 @@ class DisplayController{ } // Submit - echo ' '; + echo ' '; + // Lost pass + echo ' '; + + echo '
'; } @@ -547,7 +740,7 @@ class DisplayController{ // Ce je email v getu pomeni da se je zmotil pri passwordu if(isset($_GET['email']) && $_GET['email'] != ''){ - $email = $_GET['email']; + $email = htmlspecialchars($_GET['email'], ENT_QUOTES); echo $lang['hello'].' '.$email.''; echo '

'; @@ -578,6 +771,8 @@ class DisplayController{ echo ' '; echo ' '.str_replace('#URL#', $site_url.$this->root.'index.php?a=register', $lang['cms_login_registration_link']).''; + + echo ' '; @@ -591,7 +786,7 @@ class DisplayController{ - echo '