0) {
$sql = sisplet_query("SELECT lang_admin FROM srv_anketa WHERE id = '$anketa'");
$row = @mysqli_fetch_array($sql);
$lang_admin = $row['lang_admin'];
}
if ($lang_admin == 0) {
$sql = sisplet_query("SELECT lang FROM users WHERE id = '$global_user_id'");
$row = @mysqli_fetch_array($sql);
$lang_admin = $row['lang'];
}
if ($lang_admin == 0) {
$sql = sisplet_query("SELECT value FROM misc WHERE what = 'SurveyLang_admin'");
$row = @mysqli_fetch_array($sql);
$lang_admin = $row['value'];
}
if ($lang_admin == 0)
$lang_admin = 2; // za vsak slucaj, ce ni v bazi
// Naložimo jezikovno datoteko
$file = '../../lang/'.$lang_admin.'.php';
include($file);
$_SESSION['langX'] = $site_url .'lang/'.$lang_admin.'.php';
/**************** END LANGUAGE ****************/
// Poseben redirect za gorenje instalacijo (ce ima nastavljen default password ga preusmerimo na urejanje profila in prisilimo, da spremeni geslo)
if (Common::checkModule('gorenje')){
SurveyGorenje::redirectGorenjePassword();
}
echo '';
echo '';
/**************** HEAD ****************/
echo '
';
// Google analytics
if($site_domain == 'www.1ka.si'){
echo "";
}
$sqlv = sisplet_query("SELECT value FROM misc WHERE what='version'");
$rowv = mysqli_fetch_array($sqlv);
// Custom head title
if(AppSettings::getInstance()->getSetting('app_settings-head_title_custom')){
echo ''.AppSettings::getInstance()->getSetting('app_settings-head_title_text').'' . "\n";
}
// Default head title
else{
echo ''.$lang['1ka_surveys'].'' . "\n";
}
echo '';
echo '';
// Responsive
echo '';
// ZAMENJAMO UREJEVALNIK ZA CKEDITOR
echo '';
echo '';
// END CKEDITOR
// LANG JS
echo '';
// JS
if (isset($_GET['mode']) && $_GET['mode'] == 'old') {
echo '';
}
else {
if(isset($_GET['a']) && ($_GET['a'] == 'hierarhija_superadmin' || $_GET['a'] == 'hierarhija')){
echo '';
}
elseif((isset($_GET['a']) && $_GET['a'] == 'narocila') || (isset($_GET['t']) && $_GET['t'] == 'uporabniki')){
echo '';
}
else{
echo '';
}
}
echo '';
echo '';
// Gorenje js
if(Common::checkModule('gorenje')){
echo '';
}
// Fonts
echo '';
?>
';
echo ''."\n";
/**************** END HEAD ****************/
// Zaenkrat preusmeritev za demo anketo - boljse bi blo z rewrite ampak noce delat:)
if (isset($_GET['anketa']) && $_GET['anketa'] == '15313'){
$query = $_GET;
$query['anketa'] = '32173';
$query_new = http_build_query($query);
header ('location: '.$site_url.'admin/survey/index.php?'.$query_new);
}
/**************** BODY ****************/
// za css - barve ozadja
$cssBodyClass = '';
if(isset($_GET['anketa'])){
$cssBodyClass = 'body_anketa';
}
elseif(isset($_GET['a']) && $_GET['a'] == 'knjiznica'){
$cssBodyClass = 'body_library';
}
elseif(!isset($_GET['a']) || $_GET['a'] == 'pregledovanje'){
// Pogled s folderji
if(SurveyList::hasFolders()){
$cssBodyClass = 'body_mySurveys_folders';
}
// Klasicne moje ankete
else{
$cssBodyClass = 'body_mySurveys';
}
}
// Class za jezik
$langBodyClass = ($lang['id'] != "1") ? 'eng' : 'slo';
// Class za fullscreen tabelo s podatki
session_start();
$dataFullscreen = '';
if($anketa > 0){
//ali imamo full screen za podatke?
//naredi full screen samo na strani pregleda podatkov (v nasprotnem primeru laho uporabnik klikne browser nazaj in meniji niso prikazani)
$dataFullscreen = (isset($_SESSION['sid_'.$anketa]['data_fullscreen']) && $_SESSION['sid_'.$anketa]['data_fullscreen'] == true
&& isset($_GET['a']) && $_GET['a'] == 'data' && !isset($_GET['m']))
? 'data_fullscreen' : '';
}
echo ''."\n";
// Google analytics
if($site_domain == 'www.1ka.si'){
echo '
';
}
// Opozorilo za update browserja -> IE8 ali manj
?>
=0))
|| isDemoSurvey($anketa)
) {
$s = new SurveyAdmin();
$s->display();
}
else {
global $site_frontend;
// Popravljen redirect za drupal
if($site_url == "https://www.1ka.si/" || $site_frontend == 'drupal'){
global $cookie_domain;
$piskotSpremembaGesla = (!empty($_COOKIE['spremembaGesla']) ? 1 : 0);
setcookie('spremembaGesla', '', time() - 3600, '/', $cookie_domain);
header('location: ' . $site_url . '/d/' . ($lang_admin == 2 ? 'en' : 'sl') . ($piskotSpremembaGesla == 0 ? '#neregistriran-uporabnik' : null));
}
else{
header ('location: ' .$site_url .'/index.php');
}
}
echo '';
/**************** END BODY ****************/
echo '';
function KeepDomain($buffer) {
global $originating_domain;
global $keep_domain;
if ($originating_domain != '' && $keep_domain != '') {
return str_replace ($originating_domain, $keep_domain, str_replace ("https://" .$originating_domain, "http://" .$keep_domain, $buffer));
}
return $buffer;
}
ob_end_flush();