0){ header ('location: '.$site_url.'admin/survey/index.php'); die(); } if(isset($_GET['a'])) $this->stran = $_GET['a']; if(isset($_GET['b'])) $this->podstran = $_GET['b']; // Nastavimo jezik if(isset($_GET['lang_id'])) $this->lang_id = $_GET['lang_id']; elseif(isset($_SESSION['lang_id'])) $this->lang_id = $_SESSION['lang_id']; $_SESSION['langX'] = $site_url .'lang/'.$this->lang_id.'.php'; $_SESSION['lang_id'] = $this->lang_id; $file = '../../lang/'.$this->lang_id.'.php'; include($file); } public function displayHead(){ global $site_url; global $app_settings; global $lang; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; // Custom header title if(isset($app_settings['head_title_custom']) && $app_settings['head_title_custom'] == 1){ echo ''.$app_settings['head_title_text'].'' . "\n"; } // Default header title else{ echo ''.$lang['1ka_surveys'].'' . "\n"; } echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; } // Izris zgornje vrstice z logotipom in menijem public function displayHeader(){ global $site_url; global $lang; global $google_login_client_id; global $aai_instalacija; // Logo v glavi echo ''; // Navigacija echo ''; } // Izris vsebine public function displayMain(){ global $virtual_domain; switch($this->stran){ /*case 'login': $this->displayLoginPage(); break;*/ /*case 'login_noEmail': $this->displayLoginNoEmailPage(); break;*/ case 'login_2fa': $this->displayLogin2faPage(); break; /*case 'register': if(!$virtual_domain) $this->displayRegisterPage(); else $this->displayFrontPage(); break;*/ case 'register_confirm': if(!$virtual_domain) $this->displayRegisterPageConfirm(); else $this->displayFrontPage(); break; case 'register_email': if(!$virtual_domain) $this->displayRegisterPageEmail(); else $this->displayFrontPage(); break; case 'unregister': if(!$virtual_domain) $this->displayUnregisterPage(); else $this->displayFrontPage(); break; case 'unregister_confirm': if(!$virtual_domain) $this->displayUnregisterPageConfirm(); else $this->displayFrontPage(); break; case 'reset_password': $this->displayResetPasswordPage(); break; case 'reset_password_activate': $this->displayResetPasswordPageActivate(); break; case 'gdpr': $this->displayGDPRPage(); break; default: $this->displayFrontPage(); break; } } // Izris footerja public function displayFooter(){ global $virtual_domain; global $lang; global $app_settings; global $aai_instalacija; // Stolpec 1 echo '
'; echo '

'.$lang['simple_footer_about'].'

'; echo ' '.$lang['simple_footer_about_1ka'].''; if($aai_instalacija) 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 '
'.$lang['simple_footer_about_follow'].': '; echo ' '; echo ' '; 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 '
'; // Logotipa FDV in CDI - samo pri virtualkah if($virtual_domain || $aai_instalacija){ echo '
'; echo ' '; echo ' '; echo '
'; } echo '
'; } // Izris prve strani private function displayFrontPage(){ global $aai_instalacija; // AAI if($aai_instalacija) $this->displayFrontPageFormAAI(); else $this->displayFrontPageForm(); } // Izris okna na prvi strani private function displayFrontPageForm(){ global $lang; global $site_url; global $app_settings; global $virtual_domain; echo '
'.$app_settings['app_name'].'
'; // WHITE BOX FOR LOGIN / REGISTRATION echo '
'; // Tabs - samo pri lastni instalaciji, pri virtualkah nimamo registracije if($virtual_domain){ echo '
'; echo '
'.$lang['login_short'].'
'; echo '
'; } else{ echo '
'; echo '
'.$lang['login_short'].'
'; echo '
'.$lang['nu_register'].'
'; echo '
'; } // 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']) ){ echo '
Prijava v aplikacijo iz obstoječega IP naslova ('.$ip.') ni mogoča!
'; } else{ // LOGIN echo '
'; $this->displayFrontPageLogin(); echo '
'; // REGISTRATION echo '
'; $this->displayFrontPageRegistration(); echo '
'; } echo '
'; // APP SUBTITLE echo '
'; if($virtual_domain) echo $lang['app_virtual_domain']; else echo $lang['app_installation']; echo '
'; } // Izris okna na prvi strani - AAI private function displayFrontPageFormAAI(){ global $lang; global $site_url; global $app_settings; // WHITE BOX FOR LOGIN / REGISTRATION echo '
'; // APP TITLE - aai echo '
'.$app_settings['app_name'].'
'; // AAI logo //echo ''; // AAI text echo '
'; echo '
'.$lang['app_aai_installation_text'].'
'; echo '
'; // AAI login/register echo ' '; echo '
'; // APP SUBTITLE /*echo '
'; echo $lang['app_aai_installation']; echo '
';*/ } // Izris okna za login na prvi strani private function displayFrontPageLogin(){ global $lang; global $site_url; if(isset($_GET['a']) && $_GET['a'] == 'register'){ $email = ''; $error = ''; } else{ $email = (isset($_GET['email'])) ? $_GET['email'] : ''; $error = ''; if(isset($_GET['a']) && $_GET['a'] == 'login_noEmail'){ $error = 'email'; } elseif(isset($_GET['error']) && $_GET['error'] == 'password'){ $error = 'password'; } } // Forma za vpis echo '
'; // Email echo ' '; echo ' '; // Password echo ' '; echo ' '; // Error text if($error != ''){ echo '
'; if($error == 'email' && $email == '') echo $lang['cms_error_missing_email']; elseif($error == 'email') echo $lang['cms_error_wrong_email']; elseif($error == 'password') echo $lang['cms_error_password']; echo '
'; } // Lost pass echo '
'.$lang['forgot_password'].'
'; // Submit echo ' '; echo '
'; } // Izris okna za registracijo na prvi strani private function displayFrontPageRegistration(){ global $lang; global $site_url; global $secret_captcha; global $recaptcha_sitekey; if(!isset($_GET['a']) || $_GET['a'] != 'register'){ $email = ''; $ime = ''; $error = array(); } else{ $email = (isset($_GET['email'])) ? $_GET['email'] : ''; $ime = (isset($_GET['ime'])) ? $_GET['ime'] : ''; if(isset($_GET['invalid_email']) && $_GET['invalid_email'] == '1'){ $error['email'] = '1'; } if(isset($_GET['existing_email']) && $_GET['existing_email'] == '1'){ $error['email'] = '1'; } if(isset($_GET['missing_ime']) && $_GET['missing_ime'] == '1'){ $error['ime'] = '1'; } if(isset($_GET['pass_complex']) && $_GET['pass_complex'] == '1'){ $error['password'] = '1'; } if(isset($_GET['pass_mismatch']) && $_GET['pass_mismatch'] == '1'){ $error['password'] = '1'; } if(isset($_GET['missing_agree']) && $_GET['missing_agree'] == '1'){ $error['agree'] = '1'; } } echo '
'; echo ' '.$lang['cms_register_user_text'].''; // Email echo ' '; echo ' '; // Ime echo ' '; echo ' '; // RECAPTCHA if($secret_captcha != '' && $recaptcha_sitekey != '') echo '
'; // Geslo echo ' '; echo ' '; // Geslo2 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 '
'; // Error text if(!empty($error)){ echo '
'; foreach($error as $error_key => $error_type){ if($error_key == 'email' && $email == '') echo $lang['cms_error_missing_email'].'
'; elseif($error_key == 'email' && $_GET['existing_email'] == '1') echo $lang['srv_added_false'].'
'; elseif($error_key == 'email') echo $lang['cms_error_wrong_email'].'
'; if($error_key == 'ime') echo $lang['cms_error_user_field_empty'].'
'; if($error_key == 'password' && $_GET['pass_complex'] == '1') echo $lang['password_err_complex'].'
'; if($error_key == 'password' && $_GET['pass_mismatch'] == '1') echo $lang['ent_pass_doesnt_match'].'
'; if($error_key == 'agree') echo $lang['MustAgree'].'
'; } echo '
'; } // Submit echo ' '; echo '
'; } // Izris strani za prijavo private function displayLoginPage(){ global $lang; global $site_url; echo '
'; // Prijava echo '

'.$lang['login_for_existing2'].'

'; echo '
'; // Ce je email v getu pomeni da se je zmotil pri passwordu if(isset($_GET['email']) && $_GET['email'] != ''){ $email = $_GET['email']; echo $lang['hello'].' '.$email.''; echo '

'; // Warning za napacno geslo echo '

'.$lang['wrong_password2'].'

'; } else{ echo '
'; echo ' '; echo '
'; } // Geslo echo '
'; echo ' '; echo '
'; // Pozabljeno geslo echo '
'; echo ' '.$lang['forgot_password'].''; echo '
'; // Zapomni si me echo '
'; echo ' '; echo '
'; echo ' '; echo ' '.str_replace('#URL#', $site_url.$this->root.'index.php?a=register', $lang['cms_login_registration_link']).''; echo '
'; echo '
'; } // Izris strani za prijavo private function displayLogin2faPage(){ global $lang; global $site_url; echo '
'; // Prijava echo '
'; echo '

'.$lang['google_2fa'].'

'; echo '
'; if(!empty($_GET['error'])){ echo '

'.$lang['google_2fa_user_error_code'].'

'; } // Ce je email v getu pomeni da se je zmotil pri passwordu echo ' '; echo '
'; echo '
'; echo ' '; echo '
'; echo '
'; echo '
'; } // Izris strani z opozorilom da mail za login ne obstaja private function displayLoginNoEmailPage(){ global $lang; global $site_url; $email = (isset($_GET['email'])) ? $_GET['email'] : ''; echo '
'; echo '

'.$lang['error'].'

'; echo '

'.$lang['e_login_invalid'].'

'; echo '

'.$email.'

'; echo ' '; echo ' '; echo '
'; } // Izris strani za registracijo private function displayRegisterPage(){ global $lang; global $site_url; global $secret_captcha; global $recaptcha_sitekey; // Pogledamo ce imamo kaksen error v GET-u $error = false; if(isset($_GET['missing_email']) || isset($_GET['invalid_email']) || isset($_GET['existing_email']) || isset($_GET['missing_ime']) || isset($_GET['existing_ime']) || isset($_GET['pass_mismatch']) || isset($_GET['pass_complex']) || isset($_GET['invalid_recaptcha']) || isset($_GET['missing_agree'])){ $error = true; } // Pogledamo ce imamo poslane podatke preko GET-a $email = (isset($_GET['email'])) ? $_GET['email'] : ''; $ime = (isset($_GET['ime'])) ? $_GET['ime'] : ''; echo '
'; if($error) echo '

'.$lang['e_nu_could_not'].'

'; else echo '

'.$lang['register_new_user'].'

'; echo ' '.$lang['cms_register_user_text'].''; echo '
'; // Email echo '
'; echo '
'; // Ime echo '
'; echo '
'; // RECAPTCHA if($secret_captcha != '' && $recaptcha_sitekey != '') echo '
'; // Geslo echo '
'; echo ' '; echo '
'; // Geslo 2 echo '
'; echo ' '; echo '
'; if(isset($_GET['pass_complex'])) echo ' '.$lang['password_err_complex'].'

'; // 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 '
'; // Strinjam se s posiljanjem mailov (gdpr) /*echo '
'; echo ' '; echo '

'.$lang['more2'].' >>
'; echo '
'.$lang['cms_register_gdpr_agree_explain'].'
'; echo '
';*/ echo ' '; echo ' '; echo '
'; echo '
'; } // Izris strani za registracijo - po vnosu podatkov private function displayRegisterPageConfirm(){ global $lang; global $site_url; $email = (isset($_POST['email'])) ? $_POST['email'] : ''; $ime = (isset($_POST['ime'])) ? $_POST['ime'] : ''; $geslo = (isset($_POST['geslo'])) ? $_POST['geslo'] : ''; $gdpr_agree = (isset($_POST['gdpr-agree'])) ? $_POST['gdpr-agree'] : '0'; echo '
'; echo '

'.$lang['register_new_user'].'

'; echo '
'.$lang['check_login_data'].'
'; echo '
'; // Hidden polja potrebna za registracijo echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; // Url za nazaj na urejanje vnesenih podatkov $url_edit = $site_url.$this->root.'index.php?a=register&email='.$email.'&ime='.$ime; // Email echo '

'; echo ' '.$email.'

'; // Ime echo '

'; echo ' '.$ime.'

'; // Geslo echo '

'; echo ' '.($geslo == '' ? $lang['no1'] : $lang['yes']).'

'; echo '

'; echo '
'; echo '
'; } // Izris strani za registracijo - po poslanem potrditvenem mailu private function displayRegisterPageEmail(){ global $lang; global $site_url; global $site_url; global $confirm_registration; // Ce nimamo poslanega emaila preusmerimo nazaj na prvo stran registracije if(empty($_GET['e'])){ header ('location: '.$site_url.$this->root.'index.php?a=register'); die(); } else{ $email = base64_decode(urldecode($_GET['e'])); } echo '
'; echo '

'.$lang['user_confirm_h'].'

'; // Ce iammo vklopljeno potrjevanje s strani admina je text drugacen if (isset($confirm_registration) && $confirm_registration == 1) echo '

'.str_replace("SFMAIL", $email, $lang['user_confirm_p_admin']).'

'; else echo '

'.str_replace("SFMAIL", $email, $lang['user_confirm_p']).'

'; // Gumb nazaj na naslovnico echo '
'; echo ' '; echo '
'; } // Izris strani za odregistracijo private function displayUnregisterPage(){ global $lang; global $site_url; if (isset($_GET['email'])){ $email = strtolower($_GET['email']); } else{ header ('location: '.$site_url.$this->root.'index.php'); die(); } echo '
'; echo '

'.$lang['unregister_confirm'].'

'; echo '

'; echo ' '.$lang['no1'].'        '; //echo ' '.$lang['yes'].''; echo ' '.$lang['yes'].''; echo "


"; $result = sisplet_query ("SELECT trim(value) from misc where what='UnregisterEmbed' AND length(value)>3"); if (mysqli_num_rows ($result) > 0) { $r = mysqli_fetch_row($result); echo stripslashes($r[0]); } echo '
'; } // Izris strani po potrditvi odregistracije private function displayUnregisterPageConfirm(){ global $lang; global $site_url; echo '
'; echo '

'.$lang['unregister_ok'].'

'; echo '

'.$lang['unregister_ok_text'].'

'; echo '

'.$lang['e_back_to_fp'].'

'; echo '
'; } // Izris strani za reset gesla private function displayResetPasswordPage(){ global $lang; global $site_url; if (isset($_GET['email'])){ $email = strtolower($_GET['email']); } else{ header ('location: '.$site_url.$this->root.'index.php'); die(); } echo '
'; echo '

'.$lang['forgotten_password'].'

'; echo '

'.$lang['lp_sent'].' '.$email.'.

'; echo '

'; echo '
'; } // Izris strani po aktivaciji resetiranega gesla private function displayResetPasswordPageActivate(){ global $lang; global $site_url; // Izpisemo da smo uspesno aktivirali novo geslo if(isset($_GET['success']) && $_GET['success'] == '1'){ echo '
'; echo '

'.$lang['forgotten_password'].'

'; echo '

'.$lang['lp_activate_activation'].' '.$lang['has_been_successful'].'

'; echo '

'.$lang['you_can_change_pass_anytime'].'

'; echo '

'.$lang['to_front'].'

'; echo '
'; } // Ce so vneseni napacni podatki za aktivacijo elseif(isset($_GET['error']) && $_GET['error'] == '1'){ echo '
'; echo '

'.$lang['forgotten_password'].'

'; echo '

' .$lang['lp_activate_error'] .'

'; echo '
'; echo ' '; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo ' '; echo '
'; echo '
'; } // Drugace izpisemo formo za vnos vseh podatkov (novo geslo, email) else{ if (isset($_GET['code']) && $_GET['code'] != ""){ $code = $_GET['code']; echo '
'; echo '

'.$lang['forgotten_password'].'

'; echo '

'.$lang['lp_activate_p'].'

'; echo '
'; echo ' '; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo ' '; echo '
'; echo '
'; } else{ echo '
'; echo '

'.$lang['forgotten_password'].'

'; echo '

'.$lang['srv_wrongcode'].'

'; echo '
'; } } } // Izris strani za prosnjo za izbris (GDPR) private function displayGDPRPage(){ global $lang; global $site_url; // Ce imamo kaksen error $error = array(); echo '
'; GDPR::displayGDPRRequestForm(); echo '
'; } }