Mobile admin - V DELU
This commit is contained in:
parent
a9311db638
commit
e3957f04d8
@ -267,158 +267,93 @@ class SurveyAdmin
|
||||
global $site_domain;
|
||||
global $aai_instalacija;
|
||||
|
||||
$sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'");
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
if ($row['email'] == "test@1ka.si") {
|
||||
echo '<div id="test_user_alert">';
|
||||
echo '<span>' . $lang['notify_testUser'] . '</span>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '<div id="blue_header"><a href="' . $site_url . 'admin/survey"></a></div>';
|
||||
|
||||
|
||||
// user navigacija
|
||||
echo '<div id="enka_nav">';
|
||||
|
||||
// Search po zunanji lupini - preusmeri na drupalov search
|
||||
echo '<div id="search_holder">';
|
||||
|
||||
if($lang['id'] != "1")
|
||||
$drupal_search_url = 'https://www.1ka.si/d/en/iskanje/';
|
||||
else
|
||||
$drupal_search_url = 'https://www.1ka.si/d/sl/iskanje/';
|
||||
|
||||
echo '<form method="GET" id="1kasf" action="'.$drupal_search_url.'">';
|
||||
|
||||
echo '<input type="hidden" id="drupal_search_url" name="drupal_search_url" value="'.$drupal_search_url.'" />';
|
||||
|
||||
echo '<a href="#" onclick="showSearch();"><span class="faicon search pointer"></span></a> ';
|
||||
echo '<input id="searchSurvey" type="text" value="" placeholder="' . $lang['s_search_frontend'] . '" name="search" />';
|
||||
echo '<input type="button" style="display: none;" value="' . $lang['s_search'] . '" />';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Hitra pomoč - povezave na linke s pomočjo na www.1ka.si
|
||||
$subdomain = ($lang['id'] == "1") ? 'www' : 'english';
|
||||
$help_url = Common::getHelpUrl($subdomain, $this->first_action);
|
||||
echo '<div id="help_holder">';
|
||||
echo ' <a href="' . $help_url . '" title="' . $lang['srv_settings_help'] . '" target="_blank">';
|
||||
echo '<span class="faicon help2"></span>';
|
||||
echo '</a> ';
|
||||
echo '</div>';
|
||||
|
||||
// povezava na fieldwork sync
|
||||
if ($this->anketa > 0) {
|
||||
|
||||
// poglej če je tale ID ankete v srv_fieldwork
|
||||
$sql = sisplet_query("SELECT id FROM srv_fieldwork where sid_server='" . $this->anketa . "'");
|
||||
if (mysqli_num_rows($sql) > 0) {
|
||||
// nariši link.
|
||||
echo '<div id="fieldwork_holder">';
|
||||
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_FIELDWORK . '" title="' . $lang['srv_vrsta_survey_type_13'] . '">';
|
||||
echo '<span class="sprites fieldwork"></span>';
|
||||
echo '</a> ';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$sql = $this->db_select_user($global_user_id);
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
$text = $row['name'] . ' ' . $row['surname'];
|
||||
$text = (strlen($text) > 25) ? substr($text, 0, 25) . '...' : $text;
|
||||
|
||||
|
||||
echo '<div id="xtradiv"><strong class="xtraname">' . $text . ' <span class="faicon after sort_down_arrow"/></strong>';
|
||||
echo '<div id="xtradivSettings">';
|
||||
|
||||
echo '<span class="xtraSetting"><a class="xtra" href="' . $site_url . 'admin/survey/index.php?a=nastavitve&m=global_user_myProfile"><span class="faicon user"></span>' . $lang['edit_data'] . '</a></span>';
|
||||
|
||||
// Odjava na nov nacin preko frontend/api
|
||||
echo '<form name="odjava" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
|
||||
echo '<span class="xtraSetting"><a class="xtra" href="#" onClick="document.odjava.submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</a></span>';
|
||||
echo '</form>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// logotip
|
||||
echo '<div id="logo">';
|
||||
|
||||
$logo_class = ($lang['id'] != "1") ? ' class="english"' : '';
|
||||
$su = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
|
||||
|
||||
echo '<a href="' . $su . '" title="' . $lang['srv_1cs'] . '" id="enka_logo" ' . $logo_class . '></a>';
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '<div id="main_holder">';
|
||||
|
||||
echo '<div id="main">';
|
||||
|
||||
/***** SEZNAM ANKET - Ce ni nastavljene ankete, potem prikazujemo seznam na prvi strani *****/
|
||||
if (!($this->anketa > 0)) {
|
||||
/********************* GLAVA *********************/
|
||||
echo '<header>';
|
||||
|
||||
$this->displaySeznamAnket();
|
||||
}
|
||||
/***** GLAVNA VSEBINA - Znotraj posamezne ankete *****/
|
||||
else{
|
||||
// DESKTOP HEADER
|
||||
echo '<div class="desktop_header">';
|
||||
|
||||
echo ' <div id="anketa"' . ($this->anketa == 0 ? ' class="prva"' : '') . '>';
|
||||
// Nastavitve zgoraj desno v headerju (search, help, profil...)
|
||||
$this->displayHeaderRight();
|
||||
|
||||
// logotip
|
||||
$this->displayHeaderLogo();
|
||||
|
||||
// Znotraj posamezne ankete
|
||||
if($this->anketa > 0){
|
||||
|
||||
// Utripajoc napis "Demo anketa"
|
||||
$this->displayHeaderDemoSurvey();
|
||||
|
||||
// Prikaze podatke o anketi in navigacijo - na vrhu (top bar)
|
||||
$this->displayAnketaTop();
|
||||
$this->displayHeaderAnketa();
|
||||
}
|
||||
// Seznam anket
|
||||
else{
|
||||
$this->displayHeaderSeznamAnket();
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// MOBILE HEADER
|
||||
echo '<div class="mobile_header">';
|
||||
|
||||
$mobile_admin = new MobileSurveyAdmin($this);
|
||||
$mobile_admin->displayHeaderMobile();
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '</header>';
|
||||
/********************* GLAVA - END *********************/
|
||||
|
||||
|
||||
/********************* MAIN *********************/
|
||||
echo '<div id="main">';
|
||||
|
||||
// SEZNAM ANKET - Ce ni nastavljene ankete, potem prikazujemo seznam na prvi strani *****/
|
||||
if (!($this->anketa > 0)) {
|
||||
$this->displaySeznamAnket();
|
||||
}
|
||||
// ZNOTRAJ ANKETE
|
||||
else{
|
||||
echo '<div id="anketa">';
|
||||
|
||||
echo '<div id="anketa_edit" class="page_'.$_GET['a'].' subpage_'.$_GET['m'].' '.($this->survey_type == '1' ? 'forma' : '').' '.($this->survey_type == '0' ? 'glasovanje' : '').'">';
|
||||
$this->displayAnketa();
|
||||
echo '</div>';
|
||||
|
||||
echo ' </div> <!-- /anketa -->';
|
||||
|
||||
|
||||
// Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
|
||||
if (($_GET['a'] == '' && isset($_GET['anketa'])) || $_GET['a'] == 'branching') {
|
||||
|
||||
echo '<div id="tip_preview">';
|
||||
|
||||
echo '<div class="top-left"></div><div class="top-right"></div><div class="inside">';
|
||||
$this->getTipPreviewHtml();
|
||||
echo '</div><div class="bottom-left"></div><div class="bottom-right"></div>';
|
||||
|
||||
echo '</div>'; // tip_preview
|
||||
}
|
||||
|
||||
// Utripajoc napis "Demo anketa"
|
||||
$row = SurveyInfo::getInstance()->getSurveyRow();
|
||||
if ($row['invisible'] == 1 && !Dostop::isMetaAdmin()) {
|
||||
echo '<div id="invisible-layer"></div>';
|
||||
echo '<div id="invisible-close" onClick="window.close(); return false;"><span>' . $lang['srv_close_invisible'] . '</span></div>';
|
||||
|
||||
?> <script> $('#invisible-close span').effect("pulsate", {times: 3}, 2000); </script> <?
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/***** SKRITI DIVI ZA POPUPE *****/
|
||||
$this->displayHiddenPopups();
|
||||
|
||||
echo '</div> <!-- /main -->';
|
||||
echo '</div>';
|
||||
/********************* MAIN - END *********************/
|
||||
|
||||
|
||||
/***** FOOTER *****/
|
||||
/********************* FOOTER *********************/
|
||||
$this->displayFooter();
|
||||
/********************* FOOTER - END *********************/
|
||||
|
||||
|
||||
echo '</div> <!-- /main_holder -->';
|
||||
}
|
||||
|
||||
|
||||
// Prikazemo skrite dive za popupe
|
||||
private function displayHiddenPopups(){
|
||||
global $lang;
|
||||
|
||||
|
||||
// Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
|
||||
$this->getTipPreviewHtml();
|
||||
|
||||
|
||||
// Loading ikona
|
||||
echo ' <div id="loading">';
|
||||
echo ' <span class="faicon spinner fa-spin spaceRight"></span> '.$lang['srv_saving'];
|
||||
@ -547,8 +482,123 @@ class SurveyAdmin
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Prikazemo podatke zgoraj desno v glavi (search, user, help)
|
||||
private function displayHeaderRight(){
|
||||
global $site_url;
|
||||
global $global_user_id;
|
||||
global $lang;
|
||||
|
||||
|
||||
// user navigacija
|
||||
echo '<div id="enka_nav">';
|
||||
|
||||
|
||||
// Search po zunanji lupini - preusmeri na drupalov search
|
||||
echo '<div id="search_holder">';
|
||||
|
||||
if($lang['id'] != "1")
|
||||
$drupal_search_url = 'https://www.1ka.si/d/en/iskanje/';
|
||||
else
|
||||
$drupal_search_url = 'https://www.1ka.si/d/sl/iskanje/';
|
||||
|
||||
echo '<form method="GET" id="1kasf" action="'.$drupal_search_url.'">';
|
||||
|
||||
echo '<input type="hidden" id="drupal_search_url" name="drupal_search_url" value="'.$drupal_search_url.'" />';
|
||||
|
||||
echo '<a href="#" onclick="showSearch();"><span class="faicon search pointer"></span></a> ';
|
||||
echo '<input id="searchSurvey" type="text" value="" placeholder="' . $lang['s_search_frontend'] . '" name="search" />';
|
||||
echo '<input type="button" style="display: none;" value="' . $lang['s_search'] . '" />';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Hitra pomoč - povezave na linke s pomočjo na www.1ka.si
|
||||
$subdomain = ($lang['id'] == "1") ? 'www' : 'english';
|
||||
$help_url = Common::getHelpUrl($subdomain, $this->first_action);
|
||||
echo '<div id="help_holder">';
|
||||
echo ' <a href="' . $help_url . '" title="' . $lang['srv_settings_help'] . '" target="_blank">';
|
||||
echo '<span class="faicon help2"></span>';
|
||||
echo '</a> ';
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// povezava na fieldwork sync
|
||||
if ($this->anketa > 0) {
|
||||
|
||||
// poglej če je tale ID ankete v srv_fieldwork
|
||||
$sql = sisplet_query("SELECT id FROM srv_fieldwork where sid_server='" . $this->anketa . "'");
|
||||
if (mysqli_num_rows($sql) > 0) {
|
||||
// nariši link.
|
||||
echo '<div id="fieldwork_holder">';
|
||||
|
||||
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_FIELDWORK . '" title="' . $lang['srv_vrsta_survey_type_13'] . '">';
|
||||
echo '<span class="sprites fieldwork"></span>';
|
||||
echo '</a> ';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// User profil
|
||||
$sql = $this->db_select_user($global_user_id);
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
||||
$text = $row['name'] . ' ' . $row['surname'];
|
||||
$text = (strlen($text) > 25) ? substr($text, 0, 25) . '...' : $text;
|
||||
|
||||
echo '<div id="xtradiv"><strong class="xtraname">'.$text.' <span class="faicon after sort_down_arrow"/></strong>';
|
||||
echo '<div id="xtradivSettings">';
|
||||
|
||||
echo '<span class="xtraSetting"><a class="xtra" href="' . $site_url . 'admin/survey/index.php?a=nastavitve&m=global_user_myProfile"><span class="faicon user"></span>' . $lang['edit_data'] . '</a></span>';
|
||||
|
||||
// Odjava na nov nacin preko frontend/api
|
||||
echo '<form name="odjava" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
|
||||
echo '<span class="xtraSetting"><a class="xtra" href="#" onClick="document.odjava.submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</a></span>';
|
||||
echo '</form>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Prikazemo logo zgoraj levo
|
||||
public function displayHeaderLogo(){
|
||||
global $lang;
|
||||
global $site_url;
|
||||
|
||||
echo '<div id="logo">';
|
||||
|
||||
$logo_class = ($lang['id'] != "1") ? ' class="english"' : '';
|
||||
$su = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
|
||||
|
||||
echo '<a href="' . $su . '" title="' . $lang['srv_1cs'] . '" id="enka_logo" ' . $logo_class . '></a>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Utripajoc napis "Demo anketa"
|
||||
private function displayHeaderDemoSurvey(){
|
||||
global $lang;
|
||||
|
||||
$row = SurveyInfo::getInstance()->getSurveyRow();
|
||||
|
||||
if ($row['invisible'] == 1 && !Dostop::isMetaAdmin()) {
|
||||
|
||||
echo '<div id="invisible-layer"></div>';
|
||||
echo '<div id="invisible-close" onClick="window.close(); return false;"><span>' . $lang['srv_close_invisible'] . '</span></div>';
|
||||
|
||||
?> <script> $('#invisible-close span').effect("pulsate", {times: 3}, 2000); </script> <?
|
||||
}
|
||||
}
|
||||
|
||||
// Prikaze podatke o anketi na vrhu
|
||||
private function displayAnketaTop(){
|
||||
private function displayHeaderAnketa(){
|
||||
global $lang;
|
||||
global $site_url;
|
||||
|
||||
@ -567,6 +617,59 @@ class SurveyAdmin
|
||||
$this->thirdNavigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* prikaze glavo v seznamu anket
|
||||
*
|
||||
*/
|
||||
private function displayHeaderSeznamAnket(){
|
||||
global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
|
||||
|
||||
// Pobrisemo vse preview vnose
|
||||
Common::deletePreviewData($this->anketa);
|
||||
|
||||
# naložimo razred z seznamom anket
|
||||
$SL = new SurveyList();
|
||||
$SLCount = $SL->countSurveys();
|
||||
$SLCountPhone = $SL->countPhoneSurveys();
|
||||
|
||||
// Obvestilo da ima uporabnik neprebrano sporocilo
|
||||
$NO = new Notifications();
|
||||
$countMessages = $NO->countMessages();
|
||||
if ($countMessages > 0) {
|
||||
echo '<div id="new_notification_alert" onClick="showUnreadMessages();">';
|
||||
echo $lang['srv_notifications_alert'];
|
||||
echo '</div>';
|
||||
|
||||
// Ce imamo vklopljen avtomatski prikaz sporcila (za pomembne zadeve), ga prikazemo po loadu
|
||||
if($NO->checkForceShow())
|
||||
echo '<script>$(document).ready(function(){showUnreadMessages();})</script>';
|
||||
}
|
||||
|
||||
// GDPR popup za prejemanje obvestil - force ce ga se ni izpolnil - SAMO NA www.1ka.si, test.1ka.si in virtualkah
|
||||
if (($site_url == 'https://www.1ka.si/' || $site_url == 'http://test.1ka.si/' || $site_url == 'https://1ka.arnes.si/' || ($cookie_domain == '.1ka.si' && $virtual_domain == true))
|
||||
&& User::getInstance()->getSetting($setting='gdpr_agree') == '-1') {
|
||||
|
||||
// Avtomatsko prikazemo po loadu
|
||||
echo '<script>$(document).ready(function(){showGDPRMessage();})</script>';
|
||||
}
|
||||
|
||||
|
||||
echo '<div id="anketa_active" class="folders">';
|
||||
|
||||
echo ' <div id="topLine2"> </div>';
|
||||
|
||||
echo ' <div id="surveyNavigation">';
|
||||
$SL->display_tabs();
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
# smo v knjižnici
|
||||
$SL->display_sub_tabs();
|
||||
}
|
||||
|
||||
|
||||
// Priakz footerja
|
||||
private function displayFooter(){
|
||||
global $lang;
|
||||
@ -575,7 +678,8 @@ class SurveyAdmin
|
||||
global $aai_instalacija;
|
||||
global $mysql_database_name;
|
||||
|
||||
echo '<div id="srv_footer">';
|
||||
|
||||
echo '<footer id="srv_footer">';
|
||||
|
||||
|
||||
// Leva stran footerja
|
||||
@ -648,11 +752,10 @@ class SurveyAdmin
|
||||
echo '</div>';
|
||||
|
||||
|
||||
echo '</div>'; // END #main
|
||||
|
||||
echo '</div>'; // END #main_holder
|
||||
echo '</footer>';
|
||||
}
|
||||
|
||||
|
||||
// Prikaze ime ankete, zvezdico in tiste linke spodi (ker se vse refresha z ajaxom)
|
||||
private function anketa_active() {
|
||||
global $lang;
|
||||
@ -3140,7 +3243,7 @@ class SurveyAdmin
|
||||
}
|
||||
|
||||
// Linki za napredne module
|
||||
function showAdvancedModulesLinks()
|
||||
private function showAdvancedModulesLinks()
|
||||
{
|
||||
global $lang;
|
||||
global $site_url;
|
||||
@ -3329,54 +3432,15 @@ class SurveyAdmin
|
||||
* prikaze seznam anket in polje za dodajanje na prvi strani
|
||||
*
|
||||
*/
|
||||
function displaySeznamAnket(){
|
||||
private function displaySeznamAnket(){
|
||||
global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
|
||||
|
||||
// Pobrisemo vse preview vnose
|
||||
Common::deletePreviewData($this->anketa);
|
||||
|
||||
# naložimo razred z seznamom anket
|
||||
$SL = new SurveyList();
|
||||
$SLCount = $SL->countSurveys();
|
||||
$SLCountPhone = $SL->countPhoneSurveys();
|
||||
|
||||
// Obvestilo da ima uporabnik neprebrano sporocilo
|
||||
$NO = new Notifications();
|
||||
$countMessages = $NO->countMessages();
|
||||
if ($countMessages > 0) {
|
||||
echo '<div id="new_notification_alert" onClick="showUnreadMessages();">';
|
||||
echo $lang['srv_notifications_alert'];
|
||||
echo '</div>';
|
||||
|
||||
// Ce imamo vklopljen avtomatski prikaz sporcila (za pomembne zadeve), ga prikazemo po loadu
|
||||
if($NO->checkForceShow())
|
||||
echo '<script>$(document).ready(function(){showUnreadMessages();})</script>';
|
||||
}
|
||||
|
||||
// GDPR popup za prejemanje obvestil - force ce ga se ni izpolnil - SAMO NA www.1ka.si, test.1ka.si in virtualkah
|
||||
if (($site_url == 'https://www.1ka.si/' || $site_url == 'http://test.1ka.si/' || $site_url == 'https://1ka.arnes.si/' || ($cookie_domain == '.1ka.si' && $virtual_domain == true))
|
||||
&& User::getInstance()->getSetting($setting='gdpr_agree') == '-1') {
|
||||
|
||||
// Avtomatsko prikazemo po loadu
|
||||
echo '<script>$(document).ready(function(){showGDPRMessage();})</script>';
|
||||
}
|
||||
|
||||
|
||||
echo '<div id="anketa_active" class="folders">';
|
||||
|
||||
echo ' <div id="topLine2"> </div>';
|
||||
|
||||
echo ' <div id="surveyNavigation">';
|
||||
$SL->display_tabs();
|
||||
echo ' </div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
# smo v knjižnici
|
||||
$SL->display_sub_tabs();
|
||||
|
||||
|
||||
|
||||
// VSEBINA POSAMEZNEGA TABA PRI MOJIH ANKETAH
|
||||
echo '<div id="moje_ankete_edit" class="page_'.$_GET['a'].' subpage_'.$_GET['t'].' '.(isset($_GET['b']) ? 'subpage_b_'.$_GET['b'] : '').' '.($SLCount == 0 ? 'page_ustvari_anketo' : '').'">';
|
||||
@ -3666,6 +3730,8 @@ class SurveyAdmin
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* vrne kodo ankete, ki se jo uporabi za embed
|
||||
*
|
||||
@ -4983,10 +5049,24 @@ class SurveyAdmin
|
||||
* preview
|
||||
*
|
||||
*/
|
||||
function getTipPreviewHtml(){
|
||||
private function getTipPreviewHtml(){
|
||||
global $lang;
|
||||
global $global_user_id;
|
||||
|
||||
|
||||
// Predpregled tipa vprašanj - prikazujemo samo kadar smo v urejanju ankete
|
||||
if (!$this->anketa > 0)
|
||||
return;
|
||||
|
||||
if ( ($_GET['a'] != '' || !isset($_GET['anketa'])) && $_GET['a'] != 'branching' )
|
||||
return;
|
||||
|
||||
|
||||
echo '<div id="tip_preview">';
|
||||
|
||||
echo '<div class="top-left"></div><div class="top-right"></div><div class="inside">';
|
||||
|
||||
|
||||
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
|
||||
$userAccess = UserAccess::getInstance($global_user_id);
|
||||
|
||||
@ -5892,6 +5972,11 @@ class SurveyAdmin
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '</div><div class="bottom-left"></div><div class="bottom-right"></div>';
|
||||
|
||||
echo '</div>'; // tip_preview
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1281,7 +1281,7 @@ class SurveyAdminAjax {
|
||||
$avtorSql = sisplet_query("SELECT insert_uid FROM srv_anketa WHERE id='" . $this->anketa . "'");
|
||||
$avtorRow = mysqli_fetch_assoc($avtorSql);
|
||||
|
||||
// da ne more zbrisat avtorja (razen če je test@1ka.si)
|
||||
// da ne more zbrisat avtorja
|
||||
$avtorPogoj = (isset ($avtorRow['insert_uid']) && $avtorRow['insert_uid'] > 0) ? " AND (uid != ".$avtorRow['insert_uid']." )" : "";
|
||||
// da ne more zbrisat sam sebe
|
||||
$avtorID = " AND uid != '" . $global_user_id . "'";
|
||||
|
@ -7,33 +7,78 @@
|
||||
|
||||
|
||||
|
||||
class MobileSurveyAdmin extends SurveyAdmin{
|
||||
class MobileSurveyAdmin{
|
||||
|
||||
|
||||
function __construct(){
|
||||
var $surveyAdminClass;
|
||||
|
||||
|
||||
function __construct($surveyAdminClass){
|
||||
global $site_url;
|
||||
|
||||
$this->surveyAdminClass = $surveyAdminClass;
|
||||
}
|
||||
|
||||
|
||||
// Izris glave z menijem
|
||||
public function displayMobileHeader(){
|
||||
// Izris glave z menijem - znotraj ankete
|
||||
public function displayHeaderMobile(){
|
||||
|
||||
echo '<div class="mobile_header">';
|
||||
echo '<div class="mobile_header '.($this->surveyAdminClass->anketa > 0 ? 'survey_edit' : 'survey_list').'">';
|
||||
|
||||
// Ikona za meni
|
||||
$this->displayMobileMenuIcon();
|
||||
|
||||
// Meni
|
||||
$this->displayMobileMenu();
|
||||
|
||||
// Logo
|
||||
echo '<div class="mobile_logo"></div>';
|
||||
// Naslov ankete
|
||||
if($this->surveyAdminClass->anketa > 0){
|
||||
$this->displayMobileSurveyTitle();
|
||||
}
|
||||
// Logo - enak kot na desktopu
|
||||
else{
|
||||
$this->displayMobileLogo();
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Prikazemo mobile logo
|
||||
private function displayMobileLogo(){
|
||||
global $lang;
|
||||
global $site_url;
|
||||
|
||||
echo '<div class="mobile_logo">';
|
||||
|
||||
$logo_class = ($lang['id'] != "1") ? ' class="english"' : '';
|
||||
$su = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
|
||||
|
||||
echo '<a href="' . $su . '" title="' . $lang['srv_1cs'] . '" id="enka_logo" ' . $logo_class . '></a>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
private function displayMobileSurveyTitle(){
|
||||
|
||||
SurveyInfo::getInstance()->SurveyInit($this->surveyAdminClass->anketa);
|
||||
$row = SurveyInfo::getInstance()->getSurveyRow();
|
||||
|
||||
echo '<div class="mobile_survey_title">'.$row['naslov'].'</div>';
|
||||
}
|
||||
|
||||
private function displayMobileMenuIcon(){
|
||||
|
||||
echo '<div class="mobile_menu_icon">';
|
||||
echo ' <span class="faicon bars" onClick="$(\'#mobile_menu\').toggle();"></span>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Izris menija
|
||||
private function displayMobileMenu(){
|
||||
|
||||
echo '<div class="mobile_menu">';
|
||||
echo '<div class="mobile_menu" id="mobile_menu">';
|
||||
|
||||
// Izris uporabniških podatkov v dropdownu
|
||||
$this->displayMobileMenuUser();
|
||||
|
@ -2802,13 +2802,6 @@ class SurveyInvitationsNew {
|
||||
return false;
|
||||
}
|
||||
|
||||
# če je testni uporabnik mu ne prikažemo linkov
|
||||
$sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'");
|
||||
list($email) = mysqli_fetch_row($sql);
|
||||
if ( $email == 'test@1ka.si' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isset($_POST['noNavi']) || (isset($_POST['noNavi']) && $_POST['noNavi'] != 'true')) {
|
||||
$_sub_action = $_GET['m'];
|
||||
|
||||
|
@ -175,10 +175,6 @@
|
||||
$sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'");
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
|
||||
if ( $row['email'] == 'test@1ka.si') {
|
||||
$cssBodyClass .= ' test_user';
|
||||
}
|
||||
|
||||
|
||||
/**************** BODY ****************/
|
||||
echo '<body class="mainBody'.$cssBodyClass.'">'."\n";
|
||||
|
@ -253,6 +253,7 @@ iframe {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
#main #anketa {
|
||||
border: 0;
|
||||
@ -5892,6 +5893,10 @@ and open the template in the editor.
|
||||
#enka_nav input[type="text"]:focus {
|
||||
width: 200px;
|
||||
}*/
|
||||
.mobile_header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#logo {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
@ -7506,6 +7511,12 @@ span.faicon.spinner::before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* Bars - mobile menu */
|
||||
span.faicon.bars::before {
|
||||
font-size: 26px;
|
||||
content: "";
|
||||
}
|
||||
|
||||
/*
|
||||
To change this license header, choose License Headers in Project Properties.
|
||||
To change this template file, choose Tools | Templates
|
||||
@ -13516,6 +13527,7 @@ and open the template in the editor.
|
||||
#globalSetingsLinks ul {
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
#globalSetingsLinks ul li {
|
||||
padding: 4px 0px 4px 20px;
|
||||
@ -28444,6 +28456,55 @@ a.addIfIcon {
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.desktop_header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile_header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
}
|
||||
.mobile_header.survey_edit {
|
||||
color: white;
|
||||
background-color: #1e88e5;
|
||||
}
|
||||
.mobile_header.survey_list {
|
||||
color: #1e88e5;
|
||||
background-color: white;
|
||||
}
|
||||
.mobile_header .mobile_menu_icon {
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.mobile_header .mobile_menu_icon span {
|
||||
cursor: pointer;
|
||||
}
|
||||
.mobile_header .mobile_survey_title {
|
||||
width: calc(100% - 100px);
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.mobile_header .mobile_logo {
|
||||
width: calc(100% - 100px);
|
||||
}
|
||||
.mobile_header .mobile_logo #enka_logo {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.mobile_header .mobile_menu {
|
||||
display: none;
|
||||
z-index: 99999;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
#srv_footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -26,6 +26,9 @@ and open the template in the editor.
|
||||
ul {
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
padding: 4px 0px 4px 20px;
|
||||
border-bottom: 1px $grey_super_light solid;
|
||||
|
@ -259,6 +259,8 @@ iframe {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
|
||||
flex-grow: 1;
|
||||
|
||||
#anketa {
|
||||
border: 0;
|
||||
padding: 0px 0px 0px 0px;
|
||||
|
@ -27,6 +27,10 @@ $header_background: #ffffff;
|
||||
width: 200px;
|
||||
}*/
|
||||
|
||||
.mobile_header{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#logo {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
|
@ -526,9 +526,15 @@ span.faicon.minus_orange::before{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Spinner */
|
||||
span.faicon.spinner::before{
|
||||
font-size: 18px;
|
||||
content: "\f110";
|
||||
}
|
||||
|
||||
|
||||
/* Bars - mobile menu */
|
||||
span.faicon.bars::before{
|
||||
font-size: 26px;
|
||||
content: "\f0c9";
|
||||
}
|
||||
|
@ -1 +1,64 @@
|
||||
.desktop_header{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile_header{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
|
||||
|
||||
// Znotraj ankete
|
||||
&.survey_edit{
|
||||
color: white;
|
||||
background-color: $strong_blue;
|
||||
}
|
||||
|
||||
// Seznam anket
|
||||
&.survey_list{
|
||||
color: $strong_blue;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
.mobile_menu_icon{
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
|
||||
span{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile_survey_title{
|
||||
width: calc(100% - 100px);
|
||||
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.mobile_logo{
|
||||
width: calc(100% - 100px);
|
||||
|
||||
#enka_logo{
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile_menu{
|
||||
display: none;
|
||||
z-index: 99999;
|
||||
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
|
||||
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user