diff options
Diffstat (limited to 'admin/survey/SurveyAdmin.php')
-rw-r--r-- | admin/survey/SurveyAdmin.php | 4331 |
1 files changed, 1939 insertions, 2392 deletions
diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index 98555ce..c438167 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -40,6 +40,7 @@ * voting (volitve z anonimnimi vabili)
* uporabnost (evalvacija strani - split screen)
* panel (povezovanje ankete s panelom - npr. Valicon, GFK...)
+ * email_access (enkratni dostop do ankete z emailom - narejeno za mju po narocilu)
* 360_stopinj (adecco)
* 360_stopinj_1ka
* evoli
@@ -81,10 +82,10 @@ define("M_REPORT_TOTAL", "total"); define("SRV_DEVELOPMENT_VERSION", true);
// tipi uporabnikov, (za kontrolo prikaza posameznih elementov) za preverjanje kličemo funkcijo user_role_cehck
-define("U_ROLE_ADMIN", 0);
-define("U_ROLE_MANAGER", 1);
-define("U_ROLE_CLAN", 2);
-define("U_ROLE_NAROCNIK", 3);
+if (!defined('U_ROLE_ADMIN')) define("U_ROLE_ADMIN", 0);
+if (!defined('U_ROLE_MANAGER')) define("U_ROLE_MANAGER", 1);
+if (!defined('U_ROLE_CLAN')) define("U_ROLE_CLAN", 2);
+if (!defined('U_ROLE_NAROCNIK')) define("U_ROLE_NAROCNIK", 3);
global $site_path;
@@ -110,6 +111,14 @@ class SurveyAdmin var $full_screen_edit = false; # ali ima uporabnik nastavljeno da ureja vprašanja v fullscreen načinu
var $isAnketar = false; # Ali je uporabnik anketar ankete privzeto je ne
+ var $first_action = ''; // Prvi nivo navigacije kjer se nahajamo
+ var $second_action = ''; // Drugi nivo navigacije kjer se nahajamo
+ var $third_action = ''; // Tretji nivo navigacije kjer se nahajamo
+
+ var $layout_width = ''; // Layout strani kjer se nahajamo - "fullwidth", "wide" ali "narrow"
+ var $layout_menu = ''; // Layout strani kjer se nahajamo - "menu_lef" (prisoten levi meni)
+
+
/**
* @desc konstruktor
*/
@@ -153,8 +162,7 @@ class SurveyAdmin SurveyInfo::getInstance()->SurveyInit($this->anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- $this->db_table = '_active';
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
$this->survey_type = $this->getSurvey_type($this->anketa);
@@ -168,9 +176,10 @@ class SurveyAdmin header('location: ' . $site_url . 'admin/survey/index.php');
}
else {
- // preverimo userjev dostop
- //if ($this->checkDostop() || $this->checkDostopAktiven() || $_GET['a'] == A_ANALYSIS || $_GET['a'] == 'analiza' || $_GET['a'] == 'analizaReloadData' || $_GET['t'] == A_ANALYSIS || $_GET['a'] == A_REPORTI) {
- if ($this->checkDostop() && ($this->isAnketar || $this->checkDostopAktiven() || $_GET['a']==A_ANALYSIS || $_GET['a']=='analiza' || $_GET['a']=='analizaReloadData' || $_GET['t']==A_ANALYSIS || $_GET['a']==A_REPORTI)) {
+ // preverimo userjev dostop - ZAKAJ SMO TUKAJ IMELI DODATNE POGOJE??? NEKDO BREZ DOSTOPA DO ANKETE NE MORE KAR VEDNO DOSTOPATI DO ANALIZ
+ //if ($this->checkDostop() || $_GET['a'] == A_ANALYSIS || $_GET['a'] == 'analiza' || $_GET['a'] == 'analizaReloadData' || $_GET['t'] == A_ANALYSIS || $_GET['a'] == A_REPORTI) {
+ //if ($this->checkDostop() && ($this->isAnketar || $this->checkDostopAktiven() || $_GET['a']=='redirectLink' || $_GET['a']==A_ANALYSIS || $_GET['a']=='analiza' || $_GET['a']=='analizaReloadData' || $_GET['t']==A_ANALYSIS || $_GET['a']==A_REPORTI)) {
+ if ($this->checkDostop()){
// pasivne uporabnike preusmerimo na status tudi pri neaktivni anketi
if ($this->checkDostop() && !$this->checkDostopAktiven() && !isset($_GET['a'])) {
@@ -212,6 +221,7 @@ class SurveyAdmin echo '<form name="meta" action="" style="display:none">';
echo '<input type="hidden" name="anketa" id="srv_meta_anketa_id" value="' . $this->anketa . '" />';
+ echo '<input type="hidden" name="anketa_hash" id="srv_meta_anketa_hash" value="' . SurveyInfo::getInstance()->getSurveyHash() . '" />';
echo '<input type="hidden" name="srv_site_url" id="srv_site_url" value="' . $site_url . '" />';
echo '<input type="hidden" name="grupa" id="srv_meta_grupa" value="' . $this->grupa . '" />';
echo '<input type="hidden" name="branching" id="srv_meta_branching" value="' . $this->branching . '" />';
@@ -221,8 +231,7 @@ class SurveyAdmin echo '<input type="hidden" name="editing_mode" id="editing_mode" value="1" />';
// Ce imamo vklopljene komercialne pakete
- global $app_settings;
- if($app_settings['commercial_packages']){
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
$userAccess = UserAccess::getInstance($global_user_id);
// Ce gre za staro anketo nimamo omejitev
@@ -265,7 +274,18 @@ class SurveyAdmin global $lang;
global $admin_type;
global $site_domain;
- global $aai_instalacija;
+
+
+ // prvi in drugi nivo (tretji samo za mobilno navigacijo)
+ $navigationArray = CrossRoad::MainNavigation($this->anketa, true);
+ $this->first_action = $navigationArray['first_action'];
+ $this->second_action = $navigationArray['second_action'];
+ $this->third_action = $navigationArray['third_action'];
+
+ // Layout strani
+ $this->layout_width = $navigationArray['layout_width'];
+ $this->layout_menu = $navigationArray['layout_menu'];
+ $this->hide_header = $navigationArray['hide_header'];
echo '<div id="main_holder">';
@@ -275,20 +295,11 @@ class SurveyAdmin echo '<header>';
// DESKTOP HEADER
- echo '<div class="desktop_header">';
-
- // Nastavitve zgoraj desno v headerju (search, help, profil...)
- $this->displayHeaderRight();
-
- // logotip
- $this->displayHeaderLogo();
+ echo '<div class="desktop_header '.(($this->hide_header == "hide_header") ? 'displayNone' : '').'">';
// Znotraj posamezne ankete
if($this->anketa > 0){
- // Utripajoc napis "Demo anketa"
- $this->displayHeaderDemoSurvey();
-
// Prikaze podatke o anketi in navigacijo - na vrhu (top bar)
$this->displayHeaderAnketa();
}
@@ -312,7 +323,7 @@ class SurveyAdmin /********************* MAIN *********************/
- echo '<div id="main">';
+ echo '<div id="main" class="'.$this->hide_header.'">';
// SEZNAM ANKET - Ce ni nastavljene ankete, potem prikazujemo seznam na prvi strani *****/
if (!($this->anketa > 0)) {
@@ -320,9 +331,29 @@ class SurveyAdmin }
// ZNOTRAJ ANKETE
else{
- echo '<div id="anketa">';
+ echo '<div id="anketa">';
+
+ // breadcrumbs
+ echo '<div class="breadcrumbs">';
+
+ if ((isset($_GET['a']) && $this->first_action == 'NAVI_STATUS')? $breadcrumbs_a = '_' . $_GET['a'] : $breadcrumbs_a = '');
+ if ((isset($_GET['m']) && $this->first_action == 'NAVI_ANALYSIS' && $_GET['m'] == 'charts')? $breadcrumbs_m = '_' . $_GET['m'] : $breadcrumbs_m = '');
+
+ if(isset($lang['navigation_'.$this->first_action])){
+ echo $lang['navigation_'.$this->first_action];
+
+ if(isset($lang['navigation_'.$this->second_action.$breadcrumbs_a.$breadcrumbs_m]))
+ echo ' > ' . $lang['navigation_'.$this->second_action.$breadcrumbs_a.$breadcrumbs_m];
+
+ if (isset($this->third_action) && $this->third_action != '') {
+ echo ' > '.(isset($lang['navigation_'.$this->third_action]) ? $lang['navigation_'.$this->third_action] : '');
+ }
+ }
+
+ echo '</div>';
- echo '<div id="anketa_edit" class="page_'.$_GET['a'].' subpage_'.$_GET['m'].' '.($this->survey_type == '1' ? 'forma' : '').' '.($this->survey_type == '0' ? 'glasovanje' : '').'">';
+
+ echo '<div id="anketa_edit" class="page_'.$_GET['a'].' subpage_'.$_GET['m'].' '.($this->survey_type == '1' ? 'forma' : '').' '.($this->survey_type == '0' ? 'glasovanje' : '').' '.$this->layout_width.' '.$this->layout_menu.'">';
$this->displayAnketa();
echo '</div>';
@@ -342,6 +373,12 @@ class SurveyAdmin echo '</div> <!-- /main_holder -->';
+
+
+ // Preklop domene - javimo popup
+ if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->visibleSwitchPopup()){
+ echo '<script> popupSwitch(); </script>';
+ }
}
@@ -350,15 +387,27 @@ class SurveyAdmin 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'];
+ echo ' <span class="faicon spinner fa-spin"></span>';
+ echo ' <span class="text">'.$lang['srv_saving'].'</span>';
echo ' </div> <!-- /loading -->';
+
+ // Okencki spodaj levo
+ echo '<div class="bottom_left_popup_holder">';
+
+ // Trenutno aktivni uredniki
+ echo ' <div id="active_editors_holder">';
+ $this->check_online_users();
+ echo ' </div>';
+
+ // Obvestilo o akciji (success...) spodaj levo
+ echo ' <div id="action_note_holder"></div>';
+
+ echo '</div>';
+
+
echo ' <div id="clipboard">';
$this->clipboard_display();
echo ' </div> <!-- /clipboard -->';
@@ -372,7 +421,7 @@ class SurveyAdmin echo '<div class="popup_holder">';
// div za setiranje trajanja ankete ob aktiviranju
- echo '<div id="surveyTrajanje" class="divPopUp">';
+ echo '<div id="surveyTrajanje" class="divPopUp PopUpNarrow">';
echo ' <div id="surveyTrajanje_msg"> </div>';
echo '</div> <!-- /surveyTrajanje -->';
@@ -395,7 +444,13 @@ class SurveyAdmin // Generičen popup
- echo '<div id="popup_note" class="divPopUp"></div>';
+ echo '<div id="general_popup" class="divPopUp"></div>';
+
+ // Popup za analize
+ echo '<div id="analysis_popup" class="divPopUp"></div>';
+
+ // Knjiznica popup
+ echo '<div id="library_popup" class="divPopUp"></div>';
// urejanje calculation-ov
echo '<div id="calculation" class="divPopUp"></div>';
@@ -405,10 +460,10 @@ class SurveyAdmin echo '<div id="alert_close_block" class="divPopUp"></div>';
- echo '<div id="div_status_values" class="divPopUp"></div>';
+ echo '<div id="div_status_values" class="divPopUp PopUpNarrow"></div>';
// div za prikaz neprebranih sporocil
- echo '<div id="unread_notifications" class="divPopUp"></div>';
+ echo '<div id="unread_notifications" class="divPopUp PopUpNarrow"></div>';
// div za uvoz vprasanj iz texta
echo '<div id="popup_import_from_text" class="divPopUp"></div>';
@@ -416,17 +471,12 @@ class SurveyAdmin // div za opozorilo, da funkcionalnost ni na voljo v paketu
echo '<div id="popup_user_access" class="divPopUp"></div>';
- // alert za paste from Word
- echo '<div id="pasteFromWordAlert" class="divPopUp">';
- echo $lang['pasteFromWordAlert'];
- echo '</div>';
-
// Alert
echo '<div id="dropped_alert" class="divPopUp"></div>';
// Preverjanje pravilnosti pogojev
- echo '<div id="check_pogoji" class="divPopUp"></div>';
+ echo '<div id="check_pogoji" class="divPopUp PopUpNarrow"></div>';
// ANALIZE
@@ -437,7 +487,7 @@ class SurveyAdmin echo '<div id="zoom_div" class="divPopUp"></div>';
# skrit div za izbor profilov nastavitev
- echo '<div id="inspect_div" class="divPopUp"></div>';
+ echo '<div id="inspect_div" class="divPopUp PopUpNarrow"></div>';
# skrit div za izbor profilov zank
echo '<div id="div_zanka_profiles" class="divPopUp"></div>';
@@ -458,24 +508,27 @@ class SurveyAdmin echo '<div id="chart_float_editing" class="divPopUp"></div>';
//div za opozorilo pri vkljucevanju v report
- echo '<div id="custom_report_alert" class="divPopUp"></div>';
+ echo '<div id="custom_report_alert" class="divPopUp PopUpNarrow"></div>';
// Skriti divi za profile
- echo '<div id="div_creport_settings_profiles" class="divPopUp"></div>';
+ echo '<div id="div_creport_settings_profiles" class="divPopUp PopUpNarrow"></div>';
// Creport
- echo '<div id="div_mc_tables" class="divPopUp"></div>';
+ echo '<div id="div_mc_tables" class="divPopUp PopUpNarrow"></div>';
// REKODIRANJE
- echo '<div id="question_recode" class="divPopUp"></div>';
+ echo '<div id="question_recode" class="divPopUp PopUpNarrow"></div>';
echo '<div id="question_recode_run_note" class="divPopUp"></div>';
// NAROCILA in PLACILA
echo '<div id="user_narocila_popup" class="user_narocila_popup divPopUp"></div>';
echo '<div id="user_placila_popup" class="user_placila_popup divPopUp"></div>';
+
+ //Telefonska anketa
+ echo '<div id="telephone_popup" class="divPopUp PopUpNarrow"></div>';
echo '</div>';
@@ -483,141 +536,16 @@ class SurveyAdmin }
- // 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">';
-
-
- // Gumb za nadgraditev paketa v mojih anketah (ce imamo vklopljene pakete in nimamo 3ka paketa)
- if($this->anketa == 0){
-
- global $app_settings;
- if($app_settings['commercial_packages'] == true){
-
- // Preverimo trenuten paket uporabnika
- $userAccess = UserAccess::getInstance($global_user_id);
- $current_package = $userAccess->getPackage();
- if($current_package != '3' && !$userAccess->userNotAuthor()){
-
- $drupal_url = ($lang['id'] == '2') ? $site_url.'d/en/' : $site_url.'d/';
- $upgrade_url = $drupal_url.'izvedi-nakup/3/podatki';
-
- $button_text = ($current_package == '2') ? $lang['srv_access_upgrade2'] : $lang['srv_access_upgrade'];
-
- echo '<div class="upgrade_package">';
- echo '<div class="buttonwrapper"><a class="ovalbutton ovalbutton_purple" href="'.$upgrade_url.'" target="_blank"><span>'.$button_text.'</span></a></div>';
- echo '</div>';
- }
- }
- }
-
-
- // 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" id="form_odjava_desktop" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
- echo '<span class="xtraSetting"><a class="xtra" href="#" onClick="$(\'#form_odjava_desktop\').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()) {
-
+ // Demo anketa utripanje
+ if (!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> <?
+ ?> <script> $('#invisible-close span').effect("pulsate", {times: 5}, 2000); </script> <?
}
}
@@ -626,19 +554,22 @@ class SurveyAdmin global $lang;
global $site_url;
- // Aktivacija ankete, preview...
- echo '<div id="anketa_active" class="newCss '.substr($lang['language'], 0, 3).'">';
- $this->anketa_active();
- echo '</div> <!-- /anketa_active -->';
+ // Zgornja vrstica v headerju
+ $this->displayHeaderTopLine();
// Prvi nivo navigacije
$this->showMainNavigation();
- // Drugi nivo navigacije
- $this->secondNavigation();
+ // Preverimo, ce ima uporabnik dostop do te podstrani
+ $d = new Dostop();
+ if($d->checkDostopSubFromNavigation($this->first_action)){
+
+ // Drugi nivo navigacije
+ $this->secondNavigation();
- // Tretji nivo navigacije po potrebi glede na podstran
- $this->thirdNavigation();
+ // Tretji nivo navigacije po potrebi glede na podstran
+ $this->thirdNavigation();
+ }
}
/**
@@ -646,7 +577,8 @@ class SurveyAdmin *
*/
private function displayHeaderSeznamAnket(){
- global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
+ global $lang, $site_url, $global_user_id, $admin_type, $site_domain, $cookie_domain;
+
// Pobrisemo vse preview vnose
Common::deletePreviewData($this->anketa);
@@ -670,118 +602,204 @@ class SurveyAdmin }
// 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') {
+ if ( ($site_url == 'http://test.1ka.si/'
+ || isWWW()
+ || isAAI()
+ || ($cookie_domain == '.1ka.si' && isVirtual()))
+ && 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>';
+ // Zgornja vrstica v headerju
+ $this->displayHeaderTopLine($class='folders');
+ // Navigacija
echo ' <div id="surveyNavigation">';
$SL->display_tabs();
echo ' </div>';
-
- echo '</div>';
-
# smo v knjižnici
$SL->display_sub_tabs();
}
+ public function displayHeaderTopLine($class=''){
+ global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
+
+ echo '<div id="top_line" class="'.$class.'">';
- // Priakz footerja
- private function displayFooter(){
- global $lang;
- global $app_settings;
- global $site_frontend;
- global $aai_instalacija;
- global $mysql_database_name;
+ // logotip
+ $this->displayHeaderLogo();
+ // Nastavitve ankete
+ if($class != 'folders')
+ $this->displayHeaderAnketaSettings();
- echo '<footer id="srv_footer">';
-
+ // Nastavitve zgoraj desno v headerju (search, help, profil...)
+ $this->displayHeaderRight();
- // Leva stran footerja
- echo '<div class="footer_left">';
-
- // Custom footer
- if(isset($app_settings['footer_custom']) && $app_settings['footer_custom'] == 1){
- echo $app_settings['footer_text'];
+ // Utripajoc napis "Demo anketa"
+ if(isDemoSurvey($this->anketa)){
+ $this->displayHeaderDemoSurvey();
}
- // Default footer
- else{
- echo $lang['srv_footer_links'];
- if(isset($aai_instalacija) && $aai_instalacija == true){
- echo ' | <a href="https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja/pogosta-vprasanja-o-arnes-aai-prijavi-uporabi-orodja-1ka" target="_blank">'.$lang['aa4'].'</a>';
- }
+ echo '</div>';
+ }
+
+ // Prikazemo podatke zgoraj desno v glavi (search, user, help)
+ private function displayHeaderRight(){
+ global $site_url;
+ global $global_user_id;
+ global $lang;
- echo '<br />';
- // Verzijo izpišemo samo za admine
- if ($admin_type == 0) {
+ // user navigacija
+ echo '<div id="enka_nav">';
- // Verzija 1ka
- $sqlVersion = sisplet_query("SELECT value FROM misc WHERE what='version'", "obj");
- if (!empty($sqlVersion)) {
- echo $lang['srv_footer_1ka_version'].': ' . $sqlVersion->value . ' | ';
- }
- // Verzija Drupal
- if ($site_frontend == 'drupal') {
- $sqlDrupal = sisplet_query("SELECT value FROM misc WHERE what='drupal version'", "obj");
- if (!empty($sqlDrupal)) {
- echo 'Drupal: ' . $sqlDrupal->value . ' | ';
- }
+ // Gumb za nadgraditev paketa v mojih anketah (ce imamo vklopljene pakete in nimamo 3ka paketa)
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
+
+ // Preverimo trenuten paket uporabnika
+ $userAccess = UserAccess::getInstance($global_user_id);
+ $current_package = $userAccess->getPackage();
+ if($current_package != '3' && !$userAccess->userNotAuthor() && !isDemoSurvey($this->anketa)){
+
+ $drupal_url = ($lang['id'] == '2') ? $site_url.'d/en/' : $site_url.'d/';
+ $upgrade_url = $drupal_url.'izvedi-nakup/3/podatki';
+
+ $button_text = ($current_package == '2') ? $lang['srv_access_upgrade2'] : $lang['srv_access_upgrade'];
+
+ if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
+ /*echo '<div class="anketa_header_upgrade_package">';
+ echo ' <a href="'.$upgrade_url.'"><button class="small yellow">'.$button_text.'</button></a>';
+ echo '</div>';*/
+ }
+ else{
+ echo '<div class="anketa_header_upgrade_package">';
+ echo ' <a href="'.$upgrade_url.'"><button class="small yellow">'.$button_text.'</button></a>';
+ echo '</div>';
}
}
-
- echo 'Copyright (©) 2002-'.date('Y').' '.$lang['srv_footer_copyright'];
}
+
+ // Grid vseh linkov za pomoc, cenik,...
+ echo '<div id="link_grid_holder" class="setting_box tooltip">';
+ echo ' <a>';
+ echo ' <span class="faicon grid"></span>';
+ echo ' </a> ';
+ echo ' <div class="expanded-tooltip bottom big left" id="link_grid_content">';
+ $this->tooltip_link_grid();
+ echo ' </div>';
echo '</div>';
- // Desna stran footerja - report a bug
- echo '<div id="reportabug" class="footer_right">';
-
- // www.1ka.si ima se link na go instrukcije
- if($mysql_database_name == 'real1kasi' || $mysql_database_name == 'test1kasi' || $mysql_database_name == 'test21kasi'){
+ // Search po zunanji lupini - preusmeri na drupalov search
+ echo '<div id="search_holder" class="setting_box">';
- echo '<a href="#" onClick="consultingPopupOpen();"><span class="faicon external_link"></span> '.$lang['srv_svetovanje'].'</a>';
- echo '<br>';
- }
+ 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.'">';
- // Posebej report buga za gorenje
- if (Common::checkModule('gorenje')){
- echo '<a href="https://helpdesk.gorenje.com/SubmitSR.jsp" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
- }
- elseif(isset($aai_instalacija) && $aai_instalacija == true){
- echo '<a href="https://www.1ka.si/help1KA" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
- }
- else{
- // Slovenski jezik
- if ($lang['id'] == 1)
- echo '<a href="https://www.1ka.si/a/72864?Q1=292032" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
- // Angleski jezik
- else
- echo '<a href="https://www.1ka.si/a/72864?Q1=292032&language=2" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
- }
+ echo '<input type="hidden" id="drupal_search_url" name="drupal_search_url" value="'.$drupal_search_url.'" />';
+
+ echo '<a href="#" onclick="showSearch();" title="' . $lang['s_search_frontend'] . '"><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" class="setting_box">';
+ 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 arrow2_d small" /></strong>';
+
+ echo '<div id="xtradivSettings"><ul>';
+
+ echo '<li><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></li>';
+
+ // Odjava na nov nacin preko frontend/api
+ echo '<li>';
+ echo ' <form name="odjava" id="form_odjava_desktop" method="post" action="'.$site_url.'frontend/api/api.php?action=logout">';
+ echo ' <a class="xtra" href="#" onClick="$(\'#form_odjava_desktop\').submit();"><span class="faicon logout"></span>' . $lang['logout'] . '</a>';
+ echo ' </form>';
+ echo '</li>';
+
+ echo '</ul></div>';
+ echo '</div>';
+
- echo '</footer>';
+ echo '</div>';
}
+ // Prikazemo logo zgoraj levo
+ private function displayHeaderLogo(){
+ global $lang;
+ global $site_url;
+
+ // Logo glede na jezik in namestitev
+ $logo_class = '';
+
+ if(isLastnaInstalacija() || isVirtual())
+ $logo_class = 'namestitev';
+ elseif(isAAI())
+ $logo_class = 'arnes';
+
+ if($lang['id'] != "1")
+ $logo_class .= ' english';
+
+ $url = ($site_url == "https://www.1ka.si/" && $lang['id'] != "1") ? "https://www.1ka.si/d/en/" : $site_url;
+
+ echo '<div id="logo_holder" class="'.$logo_class.'">';
+ echo ' <a href="'.$url.'" title="'.$lang['srv_1cs'].'"></a>';
+ echo '</div>';
+ }
// Prikaze ime ankete, zvezdico in tiste linke spodi (ker se vse refresha z ajaxom)
- private function anketa_active() {
+ private function displayHeaderAnketaSettings() {
global $lang;
global $site_url;
global $admin_type;
@@ -803,34 +821,32 @@ class SurveyAdmin if ($this->skin == 0) {
// Top navigacija
- echo '<div id="topLine2" class="noMargin">';
+ echo '<div id="anketa_header_settings">';
// aktivni ki lahko tudi urejajo
if ($this->checkDostopAktiven()) {
- echo '<span id="anketa_naslov" class="anketa_img_nav">';
+ echo '<div class="anketa_header_naslov">';
if($hierarhija_type == 10){
- echo '<a href="#" title="' . $lang['srv_anketarename'] . '" style="cursor:text !important;">' . $row['naslov'] . '</a>';
- }else{
- echo '<a href="#" onclick="anketa_title_edit(\'' . $this->anketa . '\',\'1\'); return false;" title="' . $lang['srv_anketarename'] . '">' . $row['naslov'] . '</a>';
+ echo '<a href="#" title="' . $lang['srv_anketarename'] . ' - ' . $row['naslov'] . '" style="cursor:text !important;">' . $row['naslov'] . '</a>';
+ }
+ else{
+ echo '<a href="#" onclick="anketa_title_edit(\'' . $this->anketa . '\',\'1\'); return false;" title="' . $lang['srv_anketarename'] . ' - ' . $row['naslov'] . '">' . $row['naslov'] . '</a>';
}
- $this->request_help();
-
- $this->check_online_users();
-
- echo '</span>';
+ echo '</div>';
}
// pasivni lahko samo gledajo
else {
+ echo ' <div class="anketa_header_naslov">'.$row['naslov'].'</div>';
+ }
- echo ' <span id="anketa_naslov" class="anketa_img_nav">';
- echo ' ' . $row['naslov'] . '';
- echo ' </span>';
- $link = SurveyInfo::getSurveyLink();
- }
+ // Pomoc
+ echo '<div class="anketa_header_help setting_box">';
+ $this->request_help();
+ echo '</div>';
echo '<script type="text/javascript">';
echo '$(document).ready(function() {';
@@ -840,48 +856,33 @@ class SurveyAdmin echo '});';
echo '</script>';
-
- // aktivacija, deaktivacija
- echo '<span id="anketa_activation"' . ($this->isAnketar == true ? ' class="visibility_hidden"' : '') . '>';
+
+ // URL, aktivacija, deaktivacija
+ echo '<div class="anketa_header_activation"' . ($this->isAnketar == true ? ' class="visibility_hidden"' : '') . '>';
$this->displayAktivnost();
- echo '</span>'; # id="anketa_activation"
+ echo '</div>';
- // Nastavitve ankete
+ // Nastavitve ankete - ikona
$d = new Dostop();
if ($d->checkDostopSub('edit')) {
+ echo '<div class="anketa_header_quick_settings setting_box">';
+
if ($hierarhija_type == 10) {
- echo ' <a href="#" title="' . $lang['srv_survey_settings'] . '" style="padding: 0 5px;cursor:text !important;">';
+ echo '<a href="#" title="' . $lang['srv_survey_settings'] . '" style="cursor:text !important;">';
+ echo '<span class="faicon wheel_32"></span>';
+ echo '<span class="text">'.$lang['settings'].'</span>';
+ echo '</a>';
}
else {
- echo ' <a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=nastavitve" title="' . $lang['srv_survey_settings'] . '" style="padding: 0 5px;">';
+ echo '<a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=nastavitve" title="' . $lang['srv_survey_settings'] . '">';
+ echo '<span class="faicon wheel_32"></span>';
+ echo '<span class="text">'.$lang['settings'].'</span>';
+ echo '</a>';
}
- echo '<span class="faicon wheel_32 icon-orange_hover_red" style="margin-bottom:1px;"></span>';
- echo '</a> ';
- }
-
-
- // Gumb za nadgraditev paketa (ce imamo vklopljene pakete in nimamo 3ka paketa)
- global $app_settings;
- global $global_user_id;
- if($app_settings['commercial_packages'] == true){
-
- // Preverimo trenuten paket uporabnika
- $userAccess = UserAccess::getInstance($global_user_id);
- $current_package = $userAccess->getPackage();
- if($current_package != '3' && !$userAccess->userNotAuthor()){
-
- $drupal_url = ($lang['id'] == '2') ? $site_url.'d/en/' : $site_url.'d/';
- $upgrade_url = $drupal_url.'izvedi-nakup/3/podatki';
-
- $button_text = ($current_package == '2') ? $lang['srv_access_upgrade2'] : $lang['srv_access_upgrade'];
-
- echo '<div class="upgrade_package">';
- echo '<div class="buttonwrapper"><a class="ovalbutton ovalbutton_purple" href="'.$upgrade_url.'" target="_blank"><span>'.$button_text.'</span></a></div>';
- echo '</div>';
- }
+ echo '</div> ';
}
@@ -889,8 +890,10 @@ class SurveyAdmin $reloadSetting = ($_GET['a'] == "nastavitve") ? "'1'" : "'0'";
echo '<span id="survey_comment_holder" style="visibility: hidden" spremenljivka="0" view="0" type="0"> </span>';
- echo ' </div>';
+
+ echo '</div>';
+
SurveySetting::getInstance()->Init($this->anketa);
// komentar na anketo, ki je vedno viden
@@ -913,12 +916,6 @@ class SurveyAdmin $modules = SurveyInfo::getSurveyModules();
- # vse tri nivoje akcij pohendlamo tukaj, da bo lažje ob kakih spremnjanjih
-
- # prvi in drugi nivo
- $navigationArray = CrossRoad::MainNavigation($this->anketa, true);
- $this->first_action = $navigationArray['first_action'];
- $this->second_action = $navigationArray['second_action'];
$css_status = 'off';
$css_urejanje = 'off';
@@ -926,7 +923,6 @@ class SurveyAdmin $css_objava = 'off';
$css_data = 'off';
$css_analysis = 'off';
- $separatorli = '<li class="separator"> </li>';
if ($this->first_action == NAVI_STATUS) {
$css_status = 'on';
@@ -954,254 +950,179 @@ class SurveyAdmin echo '<div id="firstNavigation" >';
- echo '<div id="mojeAnketeLink">';
- echo '<a class="left-1ka" href="index.php?a=pregledovanje" title="' . $lang['srv_pregledovanje'] . ' (' . strtolower($lang['srv_create_survey']) . ', ' . strtolower($lang['srv_library']) . ')">'/*<span class="sprites moje_ankete_off"></span>*/.'<span class="library_link">' . $lang['srv_pregledovanje'] . '</span></a>';
- echo '</div>';
-
-
- echo '<ol class="left-side right-space' . ($this->isAnketar == true ? ' visibility_hidden' : '') . '">';
- if ($this->skin == 0 /*&& $this->checkDostopAktiven()*/ && $this->isAnketar == false) {
- echo $separatorli;
- echo '<li>';
+ echo '<ol class="navigation_buttons_list">';
- if ($d->checkDostopSub('dashboard'))
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_REPORTI . '" title="' . $lang['srv_navigation_status'] . '">';
+ // Samo anketar pri telefonski anketi - vidi moje ankete in poseben zavihek
+ if($this->isAnketar == true){
+ // Tab Moje ankete
+ echo '<li class="active_off">';
+ echo ' <a href="index.php?a=pregledovanje" title="' . $lang['srv_pregledovanje'] . ' (' . strtolower($lang['srv_create_survey']) . ', ' . strtolower($lang['srv_library']) . ')">';
+ echo ' <div id="mojeAnketeLink"><span class="faicon clipboard_notes"></span><span class="mojeAnketeLink_text">'.$lang['srv_pregledovanje'].'</span></div>';
+ echo ' </a>';
+ echo '</li>';
- echo '<div id="status_link_' . $css_status . '">';
+ // Tab telefonske ankete
+ echo '<li class="active_off">';
+ echo '<a href="index.php?a=phoneSurveys" title="' . $lang['srv_telephone_surveys'] . '">';
+ echo '<div class="smaller-singlebutton-off">' . $lang['srv_telephone_surveys'] . '</div>';
+ echo '</a>';
+ echo '</li>';
+
+ echo '<li class="active_on">';
+ echo ' <a href="index.php?anketa=' . $this->anketa . '&a=' . A_TELEPHONE . '&m=start_call" title="' . $lang['srv_telephone_surveying'] . '">';
+ echo ' <div class="step-on">' . $lang['srv_telephone_surveying'] . '</div>';
+ echo ' </a>';
+ echo '</li>';
+ }
+ else{
+ // Tab Moje ankete
+ echo '<li class="active_off">';
+ echo ' <a href="index.php?a=pregledovanje" title="' . $lang['srv_pregledovanje'] . ' (' . strtolower($lang['srv_create_survey']) . ', ' . strtolower($lang['srv_library']) . ')">';
+ echo ' <div id="mojeAnketeLink"><span class="faicon clipboard_notes"></span><span class="mojeAnketeLink_text">'.$lang['srv_pregledovanje'].'</span></div>';
+ echo ' </a>';
+ echo '</li>';
- if ($d->checkDostopSub('dashboard')) {
- echo '<span id="baseSurveyInfoImg" class="tooltip anketa_img_nav">';
- echo '<span class="faicon info icon-inline '.($css_status == 'on' ? 'icon-orange' : 'icon-white').'"></span>';
- echo '<span class="expanded-tooltip bottom light">';
- echo '<span id="surveyInfo_msg"></span>';
- echo '<span class="arrow"></span>';
- echo '</span>'; // expanded-tooltip bottom
- echo '</span>';
- }
- echo '<span class="status_link">' . $lang['srv_navigation_status'] . '</span>';
+ // Tab Status
+ if ($this->skin == 0 && $this->isAnketar == false) {
- echo '</div>';
+ // Separator
+ if($css_status == 'off')
+ echo '<li class="separator"></li>';
- if ($d->checkDostopSub('dashboard'))
- echo '</a>';
+ echo '<li class="active_'.$css_status.'">';
- echo '</li>';
- }
+ if ($d->checkDostopSub('dashboard')){
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_REPORTI . '" title="' . $lang['srv_navigation_status'] . '">';
- echo $separatorli;
- echo '<li>';
- if ($d->checkDostopSub('edit') && $hierarhija_type < 5) {
- echo '<a href="index.php?anketa=' . $this->anketa . ($this->survey_type > 1 ? '&a=' . A_BRANCHING : '') . '" title="' . $lang['srv_vprasalnik'] . '">';
- }
- echo '<div class="left-' . $css_urejanje . '"> </div>';
- echo '<div class="step-' . $css_urejanje . '">' . $lang['srv_vprasalnik'] . '</div>';
- //echo $css_urejanjeRight;
- if ($d->checkDostopSub('edit') && $hierarhija_type < 5) {
- echo '</a>';
- }
- echo '</li>';
+ echo '<div id="status_link_' . $css_status . '">';
+ echo ' <span class="status_link">' . $lang['srv_navigation_status'] . '</span>';
+
+ echo '</a>';
+ }
+ else{
+ echo '<div id="status_link_' . $css_status . '" title="'.$lang['srv_dostop_sub_locked_text'].'">';
+ echo ' <span class="status_link">' . $lang['srv_navigation_status'] . '</span>';
+ echo '</div>';
+ }
- # testiranje - ne prikazemo v glasovanju
- if ($this->survey_type != 0 && $this->survey_type != 1) {
- echo $separatorli;
- echo '<li>';
- if ($d->checkDostopSub('test')) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '" title="' . $lang['srv_testiranje'] . '">';
+ echo '</li>';
}
- echo '<div class="step-' . $css_testiranje . '">' . $lang['srv_testiranje'] . '</div>';
- //echo $css_testiranjeRight;
- if ($d->checkDostopSub('test')) {
- echo '</a>';
+ else{
+ // Separator
+ if($css_urejanje == 'off')
+ echo '<li class="separator"></li>';
}
- echo '</li>';
- }
- # če ni manager mora iti na vabila
- if (SurveyInfo::getInstance()->checkSurveyModule('email') && $this->user_role_cehck(U_ROLE_MANAGER) == true) {
- $link = 'invitations';
- }
- else {
- $link = A_VABILA;
- }
-
- echo $separatorli;
- echo '<li>';
- if ($d->checkDostopSub('publish')) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . $link . '" title="' . $lang['srv_vabila'] . '">';
- }
- echo '<div class="step-' . $css_objava . '">' . $lang['srv_vabila'] . '</div>';
- //echo $css_objavaRight;
- if ($d->checkDostopSub('publish')) {
- echo '</a>';
- }
- echo '</li>';
-
-
- // Podatki - ne prikazemo v glasovanju
- if ($this->survey_type != 0) {
- echo $separatorli;
- echo '<li>';
- if ($d->checkDostopSub('data')) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '" title="' . $lang['srv_results'] . '">';
- }
- echo '<div class="step-' . $css_data . '">' . $lang['srv_results'] . '</div>';
- //echo $css_dataRight;
- if ($d->checkDostopSub('data')) {
+ // Tab Urejanje
+ echo '<li class="active_'.$css_urejanje.'">';
+ if ($d->checkDostopSub('edit') && $hierarhija_type < 5) {
+ echo '<a href="index.php?anketa=' . $this->anketa . ($this->survey_type > 1 ? '&a=' . A_BRANCHING : '') . '" title="' . $lang['srv_vprasalnik'] . '">';
+ echo '<div class="step-' . $css_urejanje . '">' . $lang['srv_vprasalnik'] . '</div>';
echo '</a>';
}
+ else{
+ echo '<div class="step-' . $css_urejanje . '" title="'.$lang['srv_dostop_sub_locked_text'].'">' . $lang['srv_vprasalnik'] . '</div>';
+ }
echo '</li>';
- }
- # če je manj kot 20 variabel naj gre default na graf
- $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa'");
- [$varcount] = mysqli_fetch_array($sql);
-
-
- if ($varcount < 20) {
- SurveyDataSettingProfiles:: Init($this->anketa);
- $goto = SurveyDataSettingProfiles::getSetting('analysisGoTo');
- $_goto_m = '&m=' . $goto;
- } else {
- $_goto_m = '&m=' . M_ANALYSIS_SUMMARY;
- }
- echo $separatorli;
- echo '<li>';
- if ($d->checkDostopSub('analyse') && !isset($modules['hierarhija'])) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . $_goto_m . '" title="' . $lang['srv_analiza'] . '">';
- }
- elseif ($d->checkDostopSub('analyse') && isset($modules['hierarhija'])) {
- echo '<a href="#" title="' . $lang['srv_analiza_hierarchy'] . '">';
- }
- echo '<div class="step-' . $css_analysis . '">' . $lang['srv_analiza'] . '</div>';
+ // Tab Testiranje - ne prikazemo v glasovanju
+ if ($this->survey_type != 0 && $this->survey_type != 1) {
- if ($d->checkDostopSub('analyse')) {
- echo '</a>';
- }
- echo '</li>';
-
- echo '</ol>';
-
-
- $d = new Dostop();
- if ($d->checkDostopAktiven()) {
- echo '<ol class="quick_settings' . ($this->isAnketar == true ? ' visibility_hidden' : '') . '">';
-
- # Komentarji
- SurveySetting::getInstance()->Init($this->anketa);
- $survey_comment = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment');
- $question_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment');
- $question_note_view = SurveySetting::getInstance()->getSurveyMiscSetting('question_note_view');
- $question_resp_comment = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment');
-
- $sas = new SurveyAdminSettings();
-
- // V kolikor je vklopljena hierarhija in imamo gor splošne uporabnike, potem nastavitev ne prikazujemo
- $hierarhija_prikaz = true;
- if(SurveyInfo::getInstance()->checkSurveyModule('hierarhija') && $hierarhija_type == 10)
- $hierarhija_prikaz = false;
-
- #ikonco za komentarje prikazujemo po potrebi
- if ($this->survey_type > 1 && $hierarhija_prikaz) {
+ echo '<li class="active_'.$css_testiranje.'">';
+ if ($d->checkDostopSub('test')) {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '" title="' . $lang['srv_testiranje'] . '">';
+ echo '<div class="step-' . $css_testiranje . '">' . $lang['srv_testiranje'] . '</div>';
+ echo '</a>';
+ }
+ else{
+ echo '<div class="step-' . $css_testiranje . '" title="'.$lang['srv_dostop_sub_locked_text'].'">' . $lang['srv_testiranje'] . '</div>';
+ }
+ echo '</li>';
+ }
- global $global_user_id;
- $userAccess = UserAccess::getInstance($global_user_id);
- if ($survey_comment != '' || $question_comment != '' || /*$question_note_view != '' ||*/
- $question_resp_comment == 1 || $sas->testiranje_komentarji_komentarji_na_vprasanje(false) > 0
- ) {
- echo '<li>';
- echo '<div id="quick_comments_link" class="newCss">';
-
- if($userAccess->checkUserAccess('komentarji')){
- if ($sas->testiranje_komentarji_komentarji_na_vprasanje() > 0)
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments_num icon-orange fa-stack-1x" title="' . $lang['srv_view_comment'] . '"><strong class="fa-stack-1x">' . $sas->testiranje_komentarji_komentarji_na_vprasanje() . '</strong></span></div></a>';
- else
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=komentarji" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments fa-stack-1x icon-orange" title="' . $lang['srv_view_comment'] . '"></span></div></a>';
- }
- else{
- if ($sas->testiranje_komentarji_komentarji_na_vprasanje() > 0)
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='. $row['id'].'&a=urejanje" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments_num icon-orange fa-stack-1x user_access_locked" title="' . $lang['srv_view_comment'] . '"><strong class="fa-stack-1x">' . $sas->testiranje_komentarji_komentarji_na_vprasanje() . '</strong></span></div></a>';
- else
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=urejanje" title="' . $lang['srv_view_comment'] . '" ><div class="fa-stack"><span class="faicon comments fa-stack-1x icon-orange user_access_locked" title="' . $lang['srv_view_comment'] . '"></span></div></a>';
- }
+ // Tab Objava
+ # če ni manager mora iti na vabila
+ if (SurveyInfo::getInstance()->checkSurveyModule('email') && $this->user_role_cehck(U_ROLE_MANAGER) == true)
+ $link = 'invitations';
+ else
+ $link = A_VABILA;
- echo '</div>';
- echo '</li>';
- }
- // ce ni komentarjev, potem prikazemo link do nastavitev komentarjev
- else {
- echo '<li>';
- echo '<div id="quick_comments_link" class="newCss">';
+ echo '<li class="active_'.$css_objava.'">';
+ if ($d->checkDostopSub('publish')) {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . $link . '" title="' . $lang['srv_vabila'] . '">';
+ echo '<div class="step-' . $css_objava . '">' . $lang['srv_vabila'] . '</div>';
+ echo '</a>';
+ }
+ else{
+ echo '<div class="step-' . $css_objava . '" title="'.$lang['srv_dostop_sub_locked_text'].'">' . $lang['srv_vabila'] . '</div>';
+ }
+ echo '</li>';
- // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
-
- if($userAccess->checkUserAccess('komentarji'))
- echo '<a href="' . $site_url . 'admin/survey/ajax.php?anketa='.$row['id'].'&a=comments_onoff&do=on" title="' . $lang['srv_preview_comments'] . '"><div class="fa-stack"><span class="faicon comments fa-stack-1x icon-blue" title="' . $lang['srv_preview_comments'] . '">';
- else
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='.$row['id'].'&a=urejanje" title="' . $lang['srv_preview_comments'] . '"><div class="fa-stack"><span class="faicon comments fa-stack-1x icon-blue user_access_locked" title="' . $lang['srv_preview_comments'] . '">';
- echo '</span></div></a>';
+ // Podatki - ne prikazemo v glasovanju
+ if ($this->survey_type != 0) {
- echo '</div>';
- echo '</li>';
+ echo '<li class="active_'.$css_data.'">';
+ if ($d->checkDostopSub('data')) {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '" title="' . $lang['srv_results'] . '">';
+ echo '<div class="step-' . $css_data . '">' . $lang['srv_results'] . '</div>';
+ echo '</a>';
}
-
- if (($admin_type <= $survey_comment && $survey_comment != '') || $sas->testiranje_komentarji_komentarji_na_anketo(false) > 0) {
- echo '<li>';
- echo '<div id="quick_comments_link" class="newCss">';
- $this->survey_icon_add_comment();
- echo '</div>';
- echo '</li>';
+ else{
+ echo '<div class="step-' . $css_data . '" title="'.$lang['srv_dostop_sub_locked_text'].'">' . $lang['srv_results'] . '</div>';
}
+ echo '</li>';
}
- // ikonco za jezik prikazujemo po potrebi
- if ($row['multilang'] == 1) {
- $p = new Prevajanje($this->anketa);
- global $lang1;
- echo '<li style="margin: 10px 0 0 0;">';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=prevajanje" class="srv_ico" title="' . $lang['lang'] . ': ' . $lang['lang_short'] . ' | ' . $lang1['lang_short'] . $lang_more . '">';
- echo '<span class="faicon language icon-as_link"></span>';
- echo '</a>';
- echo '</li>';
+ // Tab Analize
+ # če je manj kot 20 variabel naj gre default na graf
+ $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa'");
+ [$varcount] = mysqli_fetch_array($sql);
+
+ if ($varcount < 20) {
+ SurveyDataSettingProfiles:: Init($this->anketa);
+ $goto = SurveyDataSettingProfiles::getSetting('analysisGoTo');
+ $_goto_m = '&m=' . $goto;
+ } else {
+ $_goto_m = '&m=' . M_ANALYSIS_SUMMARY;
}
- elseif (UserSetting::getInstance()->getUserSetting('showLanguageShortcut')) {
- // Ikona za vklop jezika, če je v globalnih nastavitvah vklopljena opcija
- echo '<li style="margin: 10px 0 0 0;">';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=prevajanje" class="srv_ico" title="' . $lang['lang'] . '">';
- echo '<span class="faicon language icon-grey_normal pointer"></span>';
+
+ echo '<li class="active_'.$css_analysis.'">';
+ if ($d->checkDostopSub('analyse') && isset($modules['hierarhija'])) {
+ echo '<a href="#" title="' . $lang['srv_analiza_hierarchy'] . '">';
+ echo '<div class="step-' . $css_analysis . '">' . $lang['srv_analiza'] . '</div>';
echo '</a>';
- echo '</li>';
}
-
- // Ikonca ce je izklopljeno prilagajanje za mobitel (mobile friendly)
- $mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly');
- if ($mobile_friendly == 0) {
- echo '<li style="margin: 10px 0 0 0;">';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=mobile_settings" class="srv_ico" title="' . $lang['srv_settings_mobile_friendly_off'] . '">';
- echo '<span class="faicon mobile_off icon-as_link"></span>';
+ elseif ($d->checkDostopSub('analyse')) {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . $_goto_m . '" title="' . $lang['srv_analiza'] . '">';
+ echo '<div class="step-' . $css_analysis . '">' . $lang['srv_analiza'] . '</div>';
echo '</a>';
- echo '</li>';
+ }
+ else{
+ echo '<div class="step-' . $css_analysis . '" title="'.$lang['srv_dostop_sub_locked_text'].'">' . $lang['srv_analiza'] . '</div>';
}
-
- echo '</ol>';
+ echo '</li>';
}
+ echo '</ol>';
+
+
+ // Ikone na desni
+ echo '<div class="right_icons '.($this->isAnketar == true ? ' displayNone' : '').'">';
# zavhiki dodatnih nastavitev
- echo '<ol class="smaller right-side">';
+ echo '<ol class="navigation_modules">';
# MAZA - mobilna aplikacija za anketirance
if (isset($modules['maza'])) {
$css = ($this->first_action == A_MAZA) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MAZA . '" title="' . $lang['srv_maza'] . '">';
echo '<span class="module_icon maza"></span>';
@@ -1212,8 +1133,6 @@ class SurveyAdmin if (isset($modules['wpn'])) {
$css = ($this->first_action == A_WPN) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_WPN . '" title="' . $lang['srv_wpn'] . '">';
echo '<span class="module_icon wpn"></span>';
@@ -1224,8 +1143,6 @@ class SurveyAdmin if (isset($modules['phone'])) {
$css = ($this->first_action == NAVI_PHONE) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
# če je navadni user in anketar
if ($this->isAnketar) {
@@ -1241,8 +1158,6 @@ class SurveyAdmin if (isset($modules['slideshow'])) {
$css = ($this->first_action == NAVI_SLIDESHOW) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SLIDESHOW . '" title="' . $lang['srv_vrsta_survey_type_9'] . '">';
echo '<span class="module_icon slideshow"></span>';
@@ -1253,8 +1168,6 @@ class SurveyAdmin if (isset($modules['uporabnost'])) {
$css = ($this->first_action == NAVI_UPORABNOST) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_UPORABNOST . '" title="' . $lang['srv_uporabnost'] . '">';
echo '<span class="module_icon evalvation"></span>';
@@ -1265,8 +1178,6 @@ class SurveyAdmin if ($row['user_from_cms'] >= 1) {
$css = ($this->first_action == NAVI_VNOS) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COOKIE . '" title="' . $lang['srv_vnos'] . '">';
echo '<span class="module_icon vnos"></span>';
@@ -1277,8 +1188,6 @@ class SurveyAdmin if (isset($modules['social_network'])) {
$css = ($this->first_action == NAVI_VNOS) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SOCIAL_NETWORK . '" title="' . $lang['srv_vrsta_survey_type_8'] . '">';
echo '<span class="module_icon social"></span>';
@@ -1289,8 +1198,6 @@ class SurveyAdmin if (isset($modules['quiz'])) {
$css = ($this->first_action == A_KVIZ) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_KVIZ . '" title="' . $lang['srv_vrsta_survey_type_6'] . '">';
echo '<span class="module_icon quiz"></span>';
@@ -1301,8 +1208,6 @@ class SurveyAdmin if (isset($modules['voting'])) {
$css = ($this->first_action == A_VOTING) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_VOTING . '" title="' . $lang['srv_vrsta_survey_type_18'] . '">';
echo '<span class="module_icon voting"></span>';
@@ -1313,20 +1218,26 @@ class SurveyAdmin if (isset($modules['advanced_paradata'])) {
$css = ($this->first_action == A_ADVANCED_PARADATA) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_PARADATA . '" title="' . $lang['srv_vrsta_survey_type_16'] . '">';
echo '<span class="module_icon advanced_paradata"></span>';
echo '</a>';
echo '</li>';
}
+ # napredni casi po straneh
+ if (isset($modules['advanced_timestamps'])) {
+ $css = ($this->first_action == A_ADVANCED_TIMESTAMPS) ? 'on' : 'off';
+
+ echo '<li>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_TIMESTAMPS . '" title="' . $lang['srv_vrsta_survey_type_20'] . '">';
+ echo '<span class="module_icon advanced_timestamps"></span>';
+ echo '</a>';
+ echo '</li>';
+ }
# excelleration matrix
if (isset($modules['excell_matrix'])) {
$css = ($this->first_action == 'excell_matrix') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=excell_matrix" title="Excelleration matrix">';
echo '<span class="module_icon excell_matrix"></span>';
@@ -1337,8 +1248,6 @@ class SurveyAdmin if (isset($modules['chat'])) {
$css = ($this->first_action == A_CHAT) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_CHAT . '" title="' . $lang['srv_vrsta_survey_type_14'] . '">';
echo '<span class="module_icon chat"></span>';
@@ -1349,20 +1258,26 @@ class SurveyAdmin if (isset($modules['panel'])) {
$css = ($this->first_action == A_PANEL) ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PANEL . '" title="' . $lang['srv_vrsta_survey_type_15'] . '">';
echo '<span class="module_icon panel"></span>';
echo '</a>';
echo '</li>';
}
+ # dostop z emailom
+ if (isset($modules['email_access'])) {
+ $css = ($this->first_action == A_EMAIL_ACCESS) ? 'on' : 'off';
+
+ echo '<li>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_EMAIL_ACCESS . '" title="' . $lang['srv_vrsta_survey_type_19'] . '">';
+ echo '<span class="module_icon email_access"></span>';
+ echo '</a>';
+ echo '</li>';
+ }
# evoli
if (isset($modules['evoli'])) {
$css = ($this->first_action == 'evoli') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli" title="Evoli">';
echo '<span class="module_icon evoli"></span>';
@@ -1373,8 +1288,6 @@ class SurveyAdmin if (isset($modules['evoli_teammeter'])) {
$css = ($this->first_action == 'evoli_teammeter') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_teammeter" title="Evoli team meter">';
echo '<span class="module_icon evoli_teammeter"></span>';
@@ -1385,8 +1298,6 @@ class SurveyAdmin if (isset($modules['evoli_quality_climate'])) {
$css = ($this->first_action == 'evoli_quality_climate') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_quality_climate" title="Evoli quality climate">';
echo '<span class="module_icon evoli_quality_climate"></span>';
@@ -1397,8 +1308,6 @@ class SurveyAdmin if (isset($modules['evoli_teamship_meter'])) {
$css = ($this->first_action == 'evoli_teamship_meter') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_teamship_meter" title="Evoli teamship meter">';
echo '<span class="module_icon evoli_teamship_meter"></span>';
@@ -1409,8 +1318,6 @@ class SurveyAdmin if (isset($modules['evoli_organizational_employeeship_meter'])) {
$css = ($this->first_action == 'evoli_organizational_employeeship_meter') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_organizational_employeeship_meter" title="Evoli organizational employeeship meter">';
echo '<span class="module_icon evoli_organizational_employeeship_meter"></span>';
@@ -1421,8 +1328,6 @@ class SurveyAdmin if (isset($modules['evoli_employmeter'])) {
$css = ($this->first_action == 'evoli_employmeter') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_employmeter" title="Evoli employeeship meter">';
echo '<span class="module_icon evoli_employmeter"></span>';
@@ -1433,8 +1338,6 @@ class SurveyAdmin if (isset($modules['mfdps'])) {
$css = ($this->first_action == 'mfdps') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=mfdps" title="MFDPŠ">';
echo '<span class="module_icon mfdps"></span>';
@@ -1445,8 +1348,6 @@ class SurveyAdmin if (isset($modules['borza'])) {
$css = ($this->first_action == 'borza') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=borza" title="BORZA">';
echo '<span class="module_icon borza"></span>';
@@ -1457,8 +1358,6 @@ class SurveyAdmin if (isset($modules['mju'])) {
$css = ($this->first_action == 'mju') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=mju" title="MJU">';
echo '<span class="module_icon mju"></span>';
@@ -1469,8 +1368,6 @@ class SurveyAdmin if (isset($modules['360_stopinj'])) {
$css = ($this->first_action == '360_stopinj') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=360_stopinj" title="' . $lang['srv_360_reports'] . '">';
echo '<span class="module_icon degrees"></span>';
@@ -1481,8 +1378,6 @@ class SurveyAdmin if (isset($modules['360_stopinj_1ka'])) {
$css = ($this->first_action == '360_stopinj_1ka') ? 'on' : 'off';
- echo '<li class="space"> </li>';
-
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=360_stopinj_1ka" title="' . $lang['srv_360_reports'] . '">';
echo '<span class="module_icon degrees_1ka"></span>';
@@ -1492,8 +1387,6 @@ class SurveyAdmin # GDPR
$gdpr = new GDPR();
if (true /*$gdpr->isGDPRSurvey($this->anketa)*/) {
-
- echo '<li class="space"> </li>';
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=gdpr_settings" title="' . $lang['srv_gdpr'] . '">';
@@ -1503,7 +1396,6 @@ class SurveyAdmin }
# SA - hierarhija
if (isset($modules['hierarhija'])) {
- echo '<li class="space"> </li>';
echo '<li>';
if($modules['hierarhija'] == 1) {
@@ -1528,7 +1420,6 @@ class SurveyAdmin echo '</li>';
}
elseif(UserSetting::getInstance()->getUserSetting('showSAicon') && $admin_type < 3){
- echo '<li class="space"> </li>';
echo '<li>';
echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m='.M_HIERARHIJA_STATUS.'" title="' . $lang['srv_hierarchy'] . '">';
@@ -1537,9 +1428,63 @@ class SurveyAdmin echo '</li>';
}
-
echo '</ol>';
+ // Ikone komentarjev, jezika...
+ $d = new Dostop();
+ if ($d->checkDostopAktiven()) {
+ echo '<ol class="quick_settings' . ($this->isAnketar == true ? ' displayNone' : '') . '">';
+
+ // V kolikor je vklopljena hierarhija in imamo gor splošne uporabnike, potem nastavitev ne prikazujemo
+ $hierarhija_prikaz = true;
+ if(SurveyInfo::getInstance()->checkSurveyModule('hierarhija') && $hierarhija_type == 10)
+ $hierarhija_prikaz = false;
+
+
+ // ikonco za jezik prikazujemo po potrebi
+ if ($row['multilang'] == 1) {
+ $p = new Prevajanje($this->anketa);
+ global $lang1;
+
+ echo '<li>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=prevajanje" class="srv_ico" title="' . $lang['lang'] . ': ' . $lang['lang_short'] . ' | ' . $lang1['lang_short'] . '">';
+ echo '<span class="faicon language"></span>';
+ echo '</a>';
+ echo '</li>';
+ }
+ // Ikona za vklop jezika, če je v globalnih nastavitvah vklopljena opcija
+ //elseif (UserSetting::getInstance()->getUserSetting('showLanguageShortcut')) {
+ else{
+ echo '<li>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=prevajanje" class="srv_ico" title="' . $lang['lang'] . '">';
+ echo '<span class="faicon language gray"></span>';
+ echo '</a>';
+ echo '</li>';
+ }
+
+
+ // Ikonca ce je izklopljeno prilagajanje za mobitel (mobile friendly)
+ $mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly');
+ if ($mobile_friendly == 0) {
+ echo '<li>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=mobile_settings" class="srv_ico" title="' . $lang['srv_settings_mobile_friendly_off'] . '">';
+ echo '<span class="faicon mobile_off"></span>';
+ echo '</a>';
+ echo '</li>';
+ }
+
+
+ #ikonco za komentarje prikazujemo po potrebi
+ if ($this->survey_type > 1 && $hierarhija_prikaz) {
+ $sc = new SurveyComments($this->anketa);
+ $sc->display_comments_icon();
+ }
+
+ echo '</ol>';
+ }
+
+ echo '</div>'; # class="right_items"
+
echo '</div>'; # id="firstNavigation"
@@ -1554,89 +1499,80 @@ class SurveyAdmin # ajaxa se poslje skupaj z ajaxom, da ob updatu vemo kaksen 'a' je bil na originalni strani
# (drugace se ob updatu z ajaxom informacija o 'a'ju zgubi)
- $get = $_GET['a'];
+ $get = isset($_GET['a']) ? $_GET['a'] : '';
if (isset ($_GET['ajaxa']))
$get = $_GET['ajaxa'];
- if (trim($get) == '') {
+ if (trim($get) == '')
$get = A_BRANCHING;
- }
+
//*** druga vrstica navigacije ***//
echo '<div id="secondNavigation" class="clr subpage_' . $get . '">';
# podzavihek: urejanje ankete
if ($this->first_action == NAVI_UREJANJE) {
- echo '<ul class="secondNavigation ' . ($this->isAnketar == true ? ' visibility_hidden' : '') . '">';
+ echo '<ul class="secondNavigation ' . ($this->isAnketar == true ? ' displayNone' : '') . '">';
#zavihek vprasalnik *
- echo '<li>';
- echo '<a class="no-img side-left' . ($this->second_action == NAVI_UREJANJE_BRANCHING ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . ($this->survey_type > 1 ? '&a=' . A_BRANCHING : '') . '" title="' . $lang['srv_editirajanketo2'] . '">';
+ echo '<li class="'.($this->second_action == NAVI_UREJANJE_BRANCHING ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . ($this->survey_type > 1 ? '&a=' . A_BRANCHING : '') . '" title="' . $lang['srv_editirajanketo2'] . '">';
echo $lang['srv_editirajanketo2'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
#zavihek urejanje akete
- echo '<li>';
- echo '<a class="no-img' . ($this->second_action == NAVI_UREJANJE_ANKETA ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_SETTINGS . '" title="' . $lang['srv_nastavitve_ankete'] . '">';
+ echo '<li class="'.($this->second_action == NAVI_UREJANJE_ANKETA ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SETTINGS . '" title="' . $lang['srv_nastavitve_ankete'] . '">';
echo $lang['srv_nastavitve_ankete'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
# zavihek oblika
- echo '<li>';
- echo '<a class="no-img side-right' . ($this->second_action == NAVI_UREJANJE_TEMA ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_TEMA . '" title="' . $lang['srv_themes'] . '">';
+ echo '<li class="'.($this->second_action == NAVI_UREJANJE_TEMA ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TEMA . '" title="' . $lang['srv_themes'] . '">';
echo $lang['srv_themes'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
echo '</ul>';
+
+ # link arhivi
if (!$this->isAnketar) {
+ echo '<div class="separator"></div>';
+
echo '<ul class="secondNavigationArchive">';
- # link arhivi
- echo '<li class="' . ($get == A_ARHIVI || $get == A_TRACKING ? ' aactive' : '') . '">';
- echo '<a class="' . ($get == A_ARHIVI || $get == A_TRACKING ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '" title="' . $lang['srv_arhivi'] . '">';
- //echo $lang['srv_arhivi'];
- echo /*'<span class="sprites archive"></span>' .*/ $lang['srv_analiza_arhiv'];
+
+ echo '<li class="'.($get == A_ARHIVI || $get == A_TRACKING ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '" title="' . $lang['srv_arhivi'] . '">';
+ echo $lang['srv_analiza_arhiv'];
echo '</a>';
echo '</li>';
+
echo '</ul>';
}
}
# podzavihek: testiranje
if ($this->first_action == NAVI_TESTIRANJE) {
- //$tab = $_GET['m'];
+
echo '<ul class="secondNavigation">';
- echo '<li>';
- echo '<a class="no-img side-left' . ($this->second_action == M_TESTIRANJE_DIAGNOSTIKA ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_DIAGNOSTIKA . '" title="' . $lang['srv_testiranje_diagnostika'] . '">';
+ echo '<li class="'.($this->second_action == M_TESTIRANJE_DIAGNOSTIKA ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_DIAGNOSTIKA . '" title="' . $lang['srv_testiranje_diagnostika'] . '">';
echo $lang['srv_testiranje_diagnostika'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
# zavihek trajanje
- echo '<li>';
- echo '<a class="no-img' . ($this->second_action == NAVI_TESTIRANJE_PREDVIDENI || $this->second_action == NAVI_TESTIRANJE_CAS ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '&m=' . A_TRAJANJE_PREDVIDENI . '" title="' . $lang['srv_testiranje_trajanje'] . '">';
+ echo '<li class="'.($this->second_action == NAVI_TESTIRANJE_PREDVIDENI || $this->second_action == NAVI_TESTIRANJE_CAS ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '&m=' . A_TRAJANJE_PREDVIDENI . '" title="' . $lang['srv_testiranje_trajanje'] . '">';
echo $lang['srv_testiranje_trajanje'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
# zavihek komentarji
- echo '<li>';
- echo '<a class="no-img' . ($this->second_action == NAVI_TESTIRANJE_KOMENTARJI || $this->second_action == NAVI_TESTIRANJE_KOMENTARJI_ANKETA ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_KOMENTARJI . '" title="' . $lang['srv_testiranje_komentarji'] . '">';
+ echo '<li class="'.($this->second_action == NAVI_TESTIRANJE_KOMENTARJI || $this->second_action == NAVI_TESTIRANJE_KOMENTARJI_ANKETA ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_KOMENTARJI . '" title="' . $lang['srv_testiranje_komentarji'] . '">';
echo $lang['srv_testiranje_komentarji'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
- echo '<li>';
- echo '<a class="no-img side-right' . ($this->second_action == NAVI_TESTIRANJE_VNOSI ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_VNOSI . '" title="' . $lang['srv_testiranje_vnosi'] . '">';
+
+ echo '<li class="'.($this->second_action == NAVI_TESTIRANJE_VNOSI ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TESTIRANJE . '&m=' . M_TESTIRANJE_VNOSI . '" title="' . $lang['srv_testiranje_vnosi'] . '">';
echo $lang['srv_testiranje_vnosi'] . '</a>';
echo '</li>';
@@ -1648,15 +1584,18 @@ class SurveyAdmin $query_testdata = sisplet_query($str_testdata);
[$testdata] = mysqli_fetch_row($query_testdata);
+ # link arhivi
if ((int)$testdata > 0) {
+ echo '<div class="separator"></div>';
+
echo '<ul class="secondNavigationArchive">';
- # link arhivi
- echo '<li>';
- echo '<a class="' . ($get == A_ARHIVI || $get == A_TRACKING ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '&m=testdata" title="' . $lang['srv_arhivi'] . '">';
- echo /*'<span class="sprites archive"></span>' .*/ $lang['srv_analiza_arhiv'];
+
+ echo '<li class="'.($get == A_ARHIVI || $get == A_TRACKING ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '&m=testdata" title="' . $lang['srv_arhivi'] . '">';
+ echo $lang['srv_analiza_arhiv'];
echo '</a>';
echo '</li>';
+
echo '</ul>';
}
}
@@ -1670,38 +1609,36 @@ class SurveyAdmin echo '<ul class="secondNavigation">';
- #((($tab == 'url' || ($row['email'] != 1 && !$tab && $get!='email')) && ($get != 'invitations'))
- echo '<li>';
- echo '<a class="no-img side-left' . ($_GET['a'] == A_VABILA && ($_GET['m'] == '' || $_GET['m'] == 'settings') ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_VABILA . '&m=settings" title="' . $lang['srv_publication_base'] . '">';
+ echo '<li class="'.($_GET['a'] == A_VABILA && ($_GET['m'] == '' || $_GET['m'] == 'settings') ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_VABILA . '&m=settings" title="' . $lang['srv_publication_base'] . '">';
echo $lang['srv_publication_base'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
- echo '<li>';
- echo '<a class="no-img side' . ($_GET['a'] == A_VABILA && $_GET['m'] == 'url' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_VABILA . '&m=url" title="' . $lang['srv_publication_url'] . '">';
- echo $lang['srv_publication_url'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- echo '<li>';
- echo '<a class="no-img side-right' . ($_GET['a'] == A_INVITATIONS && $_GET['m'] != 'view_archive' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_INVITATIONS . '" title="' . $lang['srv_inv_nav_invitations'] . '">';
+
+ echo '<li class="'.($_GET['a'] == A_INVITATIONS && $_GET['m'] != 'view_archive' ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_INVITATIONS . '" title="' . $lang['srv_inv_nav_invitations'] . '">';
echo $lang['srv_inv_nav_invitations'] . '</a>';
echo '</li>';
+ echo '<li class="'.($_GET['a'] == A_OTHER_INV && $_GET['m'] != 'view_archive' ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_OTHER_INV . '" title="' . $lang['srv_inv_nav_other_inv'] . '">';
+ echo $lang['srv_inv_nav_other_inv'] . '</a>';
+ echo '</li>';
+
echo '</ul>';
- echo '<ul class="secondNavigationArchive">';
+
# link arhivi
- echo '<li>';
- echo '<a class="' . ($get == A_ARHIVI || $get == A_TRACKING || $_GET['m'] == 'view_archive' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=invitations&m=view_archive" title="' . $lang['srv_arhivi'] . '">';
- //echo $lang['srv_arhivi'];
- echo /*'<span class="sprites archive"></span>' .*/ $lang['srv_analiza_arhiv'];
+ echo '<div class="separator"></div>';
+
+ echo '<ul class="secondNavigationArchive">';
+
+ echo '<li class="'.($get == A_ARHIVI || $get == A_TRACKING || $_GET['m'] == 'view_archive' ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=invitations&m=view_archive" title="' . $lang['srv_arhivi'] . '">';
+ echo $lang['srv_analiza_arhiv'];
echo '</a>';
echo '</li>';
- echo '</ul>';
+ echo '</ul>';
}
# podzavihek: analize
if ($this->first_action == NAVI_ANALYSIS) {
@@ -1709,104 +1646,91 @@ class SurveyAdmin # ZDRUŽIMO STATISTIKE
# osnovne
- echo '<li>';
- echo '<a class="no-img side-left' . ($_GET['m'] == M_ANALYSIS_SUMMARY
- || $_GET['m'] == M_ANALYSIS_FREQUENCY
- || $_GET['m'] == M_ANALYSIS_DESCRIPTOR
- || $_GET['m'] == M_ANALYSIS_CROSSTAB
- || $_GET['m'] == M_ANALYSIS_MEANS
- || $_GET['m'] == M_ANALYSIS_TTEST
- || $_GET['m'] == M_ANALYSIS_BREAK
- || $_GET['m'] == M_ANALYSIS_PARA
- || $_GET['m'] == M_ANALYSIS_MULTICROSSTABS
- || $_GET['m'] == M_ANALYSIS_MEANS_HIERARHY
- || $_GET['m'] == M_ANALYSIS_HEATMAP
- ? ' active' : '') . '"';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_SUMMARY
+ || $_GET['m'] == M_ANALYSIS_FREQUENCY
+ || $_GET['m'] == M_ANALYSIS_DESCRIPTOR
+ || $_GET['m'] == M_ANALYSIS_CROSSTAB
+ || $_GET['m'] == M_ANALYSIS_MEANS
+ || $_GET['m'] == M_ANALYSIS_TTEST
+ || $_GET['m'] == M_ANALYSIS_BREAK
+ || $_GET['m'] == M_ANALYSIS_PARA
+ || $_GET['m'] == M_ANALYSIS_MULTICROSSTABS
+ || $_GET['m'] == M_ANALYSIS_MEANS_HIERARHY
+ || $_GET['m'] == M_ANALYSIS_HEATMAP
+ ? ' active' : '').'">';
if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
- echo ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MEANS_HIERARHY . '" title="' . $lang['srv_stat_analiza'] . '">';
- } else {
- echo ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_SUMMARY . '" title="' . $lang['srv_stat_analiza'] . '">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MEANS_HIERARHY . '" title="' . $lang['srv_stat_analiza'] . '">';
+ }
+ else {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_SUMMARY . '" title="' . $lang['srv_stat_analiza'] . '">';
}
echo $lang['srv_stat_analiza'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
-
if (!SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
# zavihek GRAFI
- echo '<li>';
- echo '<a class="no-img ' . ($_GET['m'] == M_ANALYSIS_CHARTS ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_CHARTS . '" title="' . $lang['srv_analiza_charts'] . '">';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_CHARTS ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_CHARTS . '" title="' . $lang['srv_analiza_charts'] . '">';
echo $lang['srv_analiza_charts'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
// zavihek POROCILA
// Link na navadna porocila
if (SurveyCustomReport::checkEmpty($this->anketa)) {
- echo '<li>';
- echo '<a class="no-img side-right ' . ($_GET['m'] == M_ANALYSIS_CREPORT || $this->second_action == NAVI_ANALYSIS_LINKS ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_LINKS . '" title="' . $lang['srv_reporti'] . '">';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_CREPORT || $this->second_action == NAVI_ANALYSIS_LINKS ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_LINKS . '" title="' . $lang['srv_reporti'] . '">';
echo $lang['srv_reporti'] . '</a>';
echo '</li>';
- } // Link na porocilo po meri (ce ni prazno)
+ }
+ // Link na porocilo po meri (ce ni prazno)
else {
- echo '<li>';
- echo '<a class="no-img side-right' . ($_GET['m'] == M_ANALYSIS_CREPORT || $this->second_action == NAVI_ANALYSIS_LINKS ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_CREPORT . '" title="' . $lang['srv_reporti'] . '">';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_CREPORT || $this->second_action == NAVI_ANALYSIS_LINKS ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_CREPORT . '" title="' . $lang['srv_reporti'] . '">';
echo $lang['srv_reporti'] . '</a>';
echo '</li>';
}
- // zavihek vizualizacija - zaenkrat samo admini
- if ($admin_type === '0') {
- echo '<li class="space"></li>';
+ // zavihek vizualizacija - zaenkrat kar odstranimo, ker itak ne dela
+ /*if ($admin_type === '0') {
- echo '<li>';
- echo '<a class="no-img ' . ($_GET['m'] == M_ANALYSIS_VIZUALIZACIJA ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_VIZUALIZACIJA . '" title="' . $lang['srv_vizualizacija'] . '">';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_VIZUALIZACIJA ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_VIZUALIZACIJA . '" title="' . $lang['srv_vizualizacija'] . '">';
echo $lang['srv_vizualizacija'] . '</a>';
echo '</li>';
- }
+ }*/
// zavihek 360 STOPINJSKA POROCILA
if (SurveyInfo::getInstance()->checkSurveyModule('360_stopinj')) {
- echo '<li class="space"></li>';
- echo '<li>';
- echo '<a class="no-img ' . ($_GET['m'] == M_ANALYSIS_360 ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_360 . '" title="' . $lang['srv_360_stopinj'] . '">';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_360 ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_360 . '" title="' . $lang['srv_360_stopinj'] . '">';
echo $lang['srv_360_report'] . '</a>';
echo '</li>';
}
// zavihek 360 STOPINJSKA POROCILA 1KA
if (SurveyInfo::getInstance()->checkSurveyModule('360_stopinj_1ka')) {
- echo '<li class="space"></li>';
- echo '<li>';
- echo '<a class="no-img ' . ($_GET['m'] == M_ANALYSIS_360_1KA ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_360_1KA . '" title="' . $lang['srv_360_stopinj'] . '">';
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_360_1KA ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_360_1KA . '" title="' . $lang['srv_360_stopinj'] . '">';
echo $lang['srv_360_report'] . '</a>';
echo '</li>';
}
-
- //$row = Cache::srv_spremenljivka($spremenljivka);
-
}
echo '</ul>';
- echo '<ul class="secondNavigationArchive">';
+
# link arhivi
- echo '<li>';
- echo '<a class="no-img ' . ($_GET['m'] == M_ANALYSIS_ARCHIVE ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_ARCHIVE . '" title="' . $lang['srv_analiza_arhiv'] . '">';
- echo /*'<span class="sprites archive"></span>' .*/ $lang['srv_analiza_arhiv'];
+ echo '<div class="separator"></div>';
+
+ echo '<ul class="secondNavigationArchive">';
+
+ echo '<li class="'.($_GET['m'] == M_ANALYSIS_ARCHIVE ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_ARCHIVE . '" title="' . $lang['srv_analiza_arhiv'] . '">';
+ echo $lang['srv_analiza_arhiv'];
echo '</a>';
echo '</li>';
@@ -1820,50 +1744,45 @@ class SurveyAdmin echo '<ul class="secondNavigation">';
// podatki
- echo '<li>';
- echo '<a class="no-img side-left' . ((($_GET['m'] == 'view' || $_GET['m'] == '' || $_GET['m'] == M_COLLECT_DATA_QUICKEDIT || $_GET['m'] == M_COLLECT_DATA_VARIABLE_VIEW || $_GET['m'] == M_COLLECT_DATA_QUICKEDIT) && $_GET['a'] != A_COLLECT_DATA_EXPORT) ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '" title="' . $lang['srv_link_data_browse'] . '">';
+ echo '<li class="'.((($_GET['m'] == 'view' || $_GET['m'] == '' || $_GET['m'] == M_COLLECT_DATA_QUICKEDIT || $_GET['m'] == M_COLLECT_DATA_VARIABLE_VIEW || $_GET['m'] == M_COLLECT_DATA_QUICKEDIT) && $_GET['a'] != A_COLLECT_DATA_EXPORT) ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '" title="' . $lang['srv_link_data_browse'] . '">';
echo $lang['srv_link_data_browse'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
// izracuni
- echo '<li>';
- echo '<a class="no-img' . ($_GET['m'] == M_COLLECT_DATA_CALCULATION || $_GET['m'] == M_COLLECT_DATA_CODING || $_GET['m'] == 'coding_auto' || $_GET['m'] == M_COLLECT_DATA_RECODING || $_GET['m'] == M_COLLECT_DATA_RECODING_DASHBOARD ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=calculation" title="' . $lang['srv_data_navigation_calculate'] . '">';
+ echo '<li class="'.($_GET['m'] == M_COLLECT_DATA_CALCULATION || $_GET['m'] == M_COLLECT_DATA_CODING || $_GET['m'] == 'coding_auto' || $_GET['m'] == M_COLLECT_DATA_RECODING || $_GET['m'] == M_COLLECT_DATA_RECODING_DASHBOARD ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=calculation" title="' . $lang['srv_data_navigation_calculate'] . '">';
echo $lang['srv_data_navigation_calculate'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
// uvoz
- echo '<li>';
- echo '<a class="no-img' . ($_GET['m'] == 'append' || $_GET['m'] == 'merge' || $_GET['m'] == 'upload_xls' || $_GET['m'] == 'append_xls' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=append" title="' . $lang['srv_data_navigation_import'] . '">';
+ echo '<li class="'.($_GET['m'] == 'append' || $_GET['m'] == 'merge' || $_GET['m'] == 'upload_xls' || $_GET['m'] == 'append_xls' ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=append" title="' . $lang['srv_data_navigation_import'] . '">';
echo $lang['srv_data_navigation_import'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
$d = new Dostop();
# izvozi
if ($d->checkDostopSub('export')) {
- echo '<li>';
- echo '<a class="no-img side-right' . ($this->second_action == NAVI_DATA_EXPORT ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '" title="' . $lang['srv_export_tab'] . '">';
+ echo '<li class="'.($this->second_action == NAVI_DATA_EXPORT ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '" title="' . $lang['srv_export_tab'] . '">';
echo $lang['srv_export_tab'] . '</a>';
echo '</li>';
}
echo '</ul>';
+
+ # link arhivi
if ($d->checkDostopSub('edit')) {
+ echo '<div class="separator"></div>';
+
echo '<ul class="secondNavigationArchive">';
- # link arhivi
- echo '<li>';
- echo '<a class="no-img ' . ($_GET['a'] == A_ARHIVI && $_GET['m'] == 'data' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '&m=data" title="' . $lang['srv_arhiv_data'] . '">';
- //echo $lang['srv_analiza_arhiv'];
- echo /*'<span class="sprites archive"></span>' .*/ $lang['srv_analiza_arhiv'];
+
+ echo '<li class="'.($_GET['a'] == A_ARHIVI && $_GET['m'] == 'data' ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '&m=data" title="' . $lang['srv_arhiv_data'] . '">';
+ echo $lang['srv_analiza_arhiv'];
echo '</a>';
echo '</li>';
@@ -1897,8 +1816,8 @@ class SurveyAdmin || isset($modules['quiz'])
|| isset($modules['social_network'])
|| isset($modules['slideshow'])) ? '' : ' side-right';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img' . $_right . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_UPORABNOST . '" title="' . $lang['srv_uporabnost'] . '">' . $lang['srv_uporabnost'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_UPORABNOST . '" title="' . $lang['srv_uporabnost'] . '">' . $lang['srv_uporabnost'] . '</a></li>';
}
# vnos
if ($row['user_from_cms'] == 2 && $row['cookie'] == -1) {
@@ -1906,45 +1825,53 @@ class SurveyAdmin $_right = (isset($modules['quiz'])
|| isset($modules['social_network'])
|| isset($modules['slideshow'])) ? '' : ' side-right';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img' . $_right . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_VNOS . '" title="' . $lang['srv_vnos'] . '">' . $lang['srv_vnos'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_VNOS . '" title="' . $lang['srv_vnos'] . '">' . $lang['srv_vnos'] . '</a></li>';
}
#kviz
if (isset($modules['quiz'])) {
$_active = ($_GET['a'] == A_KVIZ) ? ' active' : '';
$_right = (isset($modules['social_network'])
|| isset($modules['slideshow'])) ? '' : ' side-right';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img' . $_right . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_KVIZ . '" title="' . $lang['srv_kviz'] . '">' . $lang['srv_kviz'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_KVIZ . '" title="' . $lang['srv_kviz'] . '">' . $lang['srv_kviz'] . '</a></li>';
}
#volitve
if (isset($modules['voting'])) {
$_active = ($_GET['a'] == A_VOTING) ? ' active' : '';
$_right = (isset($modules['social_network'])
|| isset($modules['slideshow'])) ? '' : ' side-right';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img' . $_right . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_VOTING . '" title="' . $lang['srv_voting'] . '">' . $lang['srv_voting'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_VOTING . '" title="' . $lang['srv_voting'] . '">' . $lang['srv_voting'] . '</a></li>';
}
#napredni parapodatki
if (isset($modules['advanced_paradata'])) {
$_active = ($_GET['a'] == A_ADVANCED_PARADATA) ? ' active' : '';
$_right = (isset($modules['advanced_paradata'])
|| isset($modules['advanced_paradata'])) ? '' : ' side-right';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img' . $_right . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_PARADATA . '" title="' . $lang['srv_advanced_paradata'] . '">' . $lang['srv_advanced_paradata'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_PARADATA . '" title="' . $lang['srv_advanced_paradata'] . '">' . $lang['srv_advanced_paradata'] . '</a></li>';
+ }
+ #napredni casi po straneh
+ if (isset($modules['advanced_timestamps'])) {
+ $_active = ($_GET['a'] == A_ADVANCED_TIMESTAMPS) ? ' active' : '';
+ $_right = (isset($modules['advanced_timestamps'])
+ || isset($modules['advanced_timestamps'])) ? '' : ' side-right';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_TIMESTAMPS . '" title="' . $lang['srv_advanced_timestamps'] . '">' . $lang['srv_advanced_timestamps'] . '</a></li>';
}
# SN
if (isset($modules['social_network'])) {
$_active = ($_GET['a'] == A_SOCIAL_NETWORK) ? ' active' : '';
$_right = (isset($modules['slideshow'])) ? '' : ' side-right';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img' . $_right . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_SOCIAL_NETWORK . '" title="' . $lang['srv_vrsta_survey_type_8'] . '">' . $lang['srv_vrsta_survey_type_8'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_SOCIAL_NETWORK . '" title="' . $lang['srv_vrsta_survey_type_8'] . '">' . $lang['srv_vrsta_survey_type_8'] . '</a></li>';
}
#slideshow
if (isset($modules['slideshow'])) {
$_active = ($_GET['a'] == A_SLIDESHOW) ? ' active' : '';
- echo '<li class="space"></li>';
- echo '<li><a class="no-img side-right' . $_active . '" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_SLIDESHOW . '" title="' . $lang['srv_vrsta_survey_type_9'] . '">' . $lang['srv_vrsta_survey_type_9'] . '</a></li>';
+
+ echo '<li class="'.$_active.'"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_SLIDESHOW . '" title="' . $lang['srv_vrsta_survey_type_9'] . '">' . $lang['srv_vrsta_survey_type_9'] . '</a></li>';
}
echo '</ul>';
@@ -1958,147 +1885,37 @@ class SurveyAdmin || $this->first_action == 'langStatistic'
|| $this->first_action == 'usable_resp'
|| $this->first_action == 'speeder_index'
- || $this->first_action == 'reminder_tracking') {
+ || $this->first_action == 'reminder_tracking'
+ || $this->first_action == 'status_advanced') {
echo '<ul class="secondNavigation">';
# dashboard
- echo '<li>';
- echo '<a class="no-img single' . ($_GET['a'] == A_REPORTI ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_REPORTI . '" title="' . $lang['srv_status_osnovni'] . '">';
+ echo '<li class="'.($_GET['a'] == A_REPORTI ? ' active' : '').'">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_REPORTI . '" title="' . $lang['srv_status_osnovni'] . '">';
echo $lang['srv_status_summary'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
# parapodatki (browser, os, js...) - volitve imajo to ugasnjeno
if(!SurveyInfo::getInstance()->checkSurveyModule('voting')) {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_PARA_GRAPH ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_PARA_GRAPH . '" title="' . $lang['srv_metapodatki'] . '">';
+ echo '<li class="' . ($_GET['a'] == A_PARA_GRAPH ? ' active' : '') . '">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PARA_GRAPH . '" title="' . $lang['srv_metapodatki'] . '">';
echo $lang['srv_metapodatki'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
}
# neodgovori in uporabnost enot
- //if ($admin_type === '0') {
# non-responses
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_NONRESPONSE_GRAPH ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_NONRESPONSE_GRAPH . '" title="' . $lang['srv_para_neodgovori'] . '">';
+ echo '<li class="' . ($_GET['a'] == A_NONRESPONSE_GRAPH ? ' active' : '') . '">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_NONRESPONSE_GRAPH . '" title="' . $lang['srv_para_neodgovori'] . '">';
echo $lang['srv_para_neodgovori'] . '</a>';
echo '</li>';
- echo '<li class="space"></li>';
- //}
- # usable respondents
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_USABLE_RESP ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_USABLE_RESP . '" title="' . $lang['srv_usable_respondents'] . '">';
- echo $lang['srv_usable_respondents'] . '</a>';
+ # Gumb za novo stran napredni statusi
+ echo '<li class="' . ($_GET['a'] == A_STATUS_ADVANCED ? ' active' : '') . '">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_STATUS_ADVANCED . '" title="' . $lang['srv_status_advanced'] . '">';
+ echo $lang['srv_status_advanced'] . '<span class="faicon arrow2_r"></span></a>';
echo '</li>';
- echo '<li class="space"></li>';
-
- # kakovost resp - V DELU - ZAENKRAT SAMO ADMINI
- if ($admin_type === '0') {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_KAKOVOST_RESP ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_KAKOVOST_RESP . '" title="' . $lang['srv_kakovost'] . '">';
- echo $lang['srv_kakovost'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # speeder index - V DELU - ZAENKRAT SAMO ADMINI
- if ($admin_type === '0') {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_SPEEDER_INDEX ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_SPEEDER_INDEX . '" title="' . $lang['srv_speeder_index'] . '">';
- echo $lang['srv_speeder_index'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # text analysis
- if ($admin_type === '0' || $admin_type === '1') {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_TEXT_ANALYSIS ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_TEXT_ANALYSIS . '" title="' . $lang['srv_text_analysis'] . '">';
- echo $lang['srv_text_analysis'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # IP analiza lokacij - gorenje ima to ugasnjeno, volitve imajo tudi ugasnjeno
- if (!Common::checkModule('gorenje') && !SurveyInfo::getInstance()->checkSurveyModule('voting')) {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_GEOIP_LOCATION ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_GEOIP_LOCATION . '" title="' . $lang['srv_geoip_location'] . '">';
- echo $lang['srv_geoip_location'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # Analize urejanja - V DELU - ZAENKRAT SAMO ADMINI
- if ($admin_type === '0') {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_EDITS_ANALYSIS ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_EDITS_ANALYSIS . '" title="' . $lang['srv_edits_analysis'] . '">';
- echo $lang['srv_edits_analysis'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # reminder tracking - pokazi, ce je admin in so vklopljeni napredni parapodatki
- $survey_track_reminders = SurveySetting::getInstance()->getSurveyMiscSetting('survey_track_reminders');
- if ($survey_track_reminders == '') $survey_track_reminders = 0;
- if (($admin_type === '0' || $admin_type === '1') && SurveyInfo::getInstance()->checkSurveyModule('advanced_paradata')) {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_REMINDER_TRACKING ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_REMINDER_TRACKING . '&m='. A_REMINDER_TRACKING_RECNUM .'" title="' . $lang['srv_reminder_tracking'] . '">';
- echo $lang['srv_reminder_tracking'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # ul evalvacija
- if (Common::checkModule('evalvacija') == '1') {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == A_UL_EVALVATION ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_UL_EVALVATION . '" title="UL evalvacije">';
- echo 'UL evalvacije</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # AAPOR
- #aapor naj bo viden samo če so vabila
- if (SurveyInfo::getSurveyColumn('user_base') == 1 || SurveyInfo::getInstance()->checkSurveyModule('email')) {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == 'AAPOR' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=AAPOR&m=aapor1" title="' . $lang['srv_aapor'] . '">';
- echo $lang['srv_aapor'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
-
- # langStatistic
- #langStatistic naj bo viden samo če imamo različne jezike in nimamo volitev
- if (!Common::checkModule('gorenje') && !SurveyInfo::getInstance()->checkSurveyModule('voting')) {
-
- $qry_string = "SELECT language FROM srv_user WHERE ank_id = '" . $this->anketa . "' AND preview = '0' AND deleted='0' group by language";
- $qry = (sisplet_query($qry_string));
- $cntLang = mysqli_num_rows($qry);
-
- if ($cntLang > 1) {
- echo '<li>';
- echo '<a class="no-img' . ($_GET['a'] == 'langStatistic' ? ' active' : '') . '"'
- . ' href="index.php?anketa=' . $this->anketa . '&a=langStatistic" title="' . $lang['srv_languages_statistics'] . '">';
- echo $lang['srv_languages_statistics'] . '</a>';
- echo '</li>';
- echo '<li class="space"></li>';
- }
- }
echo '</ul>';
}
@@ -2107,14 +1924,14 @@ class SurveyAdmin #quicksettings
if ($_GET['a'] == 'quicksettings') {
echo '<ul class="secondNavigation">';
- echo '<li><a class="no-img single active" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_QUICK_SETTINGS . '" title="' . $lang['srv_settings_quick'] . '">' . $lang['srv_settings_quick'] . '</a></li>';
+ echo '<li class="active"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=' . A_QUICK_SETTINGS . '" title="' . $lang['srv_settings_quick'] . '">' . $lang['srv_settings_quick'] . '</a></li>';
echo '</ul>';
}
if ($_GET['a'] == 'data' && $_GET['m'] == 'monitoring') {
echo '<ul class="secondNavigation">';
- echo '<li><a class="no-img single active" href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=data&m=monitoring" title="' . $lang['srv_monitoring'] . '">' . $lang['srv_monitoring'] . '</a></li>';
+ echo '<li class="active"><a href="' . $site_url . 'admin/survey/index.php?anketa=' . $this->anketa . '&a=data&m=monitoring" title="' . $lang['srv_monitoring'] . '">' . $lang['srv_monitoring'] . '</a></li>';
echo '</ul>';
}
@@ -2123,6 +1940,7 @@ class SurveyAdmin if($hierarhija_type < 5) {
echo '<div id="secondNavigation_links">';
+
# Ikonce za delete, copy ....
$d = new Dostop();
if ($d->checkDostopAktiven()) {
@@ -2192,10 +2010,6 @@ class SurveyAdmin $podstran = M_ANALYSIS_SUMMARY;
}
}
- // Zavihki STATUS
- elseif($_GET['a'] == 'reporti'){
- $podstran = 'status';
- }
elseif($_GET['a'] == 'usable_resp'){
$podstran = 'usable_resp';
}
@@ -2221,29 +2035,159 @@ class SurveyAdmin }
}
+
+ // Priakz footerja
+ private function displayFooter(){
+ global $lang;
+ global $site_frontend;
+ global $mysql_database_name;
+ global $admin_type;
+
+
+ echo '<footer id="srv_footer"'.(($this->hide_header == "hide_header") ? 'class="displayNone"' : '').'>';
+
+ // Leva stran footerja
+ echo '<div class="footer_left">';
+
+ // Custom footer
+ if(AppSettings::getInstance()->getSetting('app_settings-footer_custom') !== false){
+ echo '<div class="footer_line">';
+ echo AppSettings::getInstance()->getSetting('app_settings-footer_text');
+ echo '</div>';
+ }
+ // Default footer
+ else{
+
+ // First left line - links
+ echo '<div class="footer_line">';
+
+ echo $lang['srv_footer_links'];
+
+ if(isAAI())
+ echo '<span class="footer_item"><a href="https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja/pogosta-vprasanja-o-arnes-aai-prijavi-uporabi-orodja-1ka" target="_blank">'.$lang['aa4'].'</a></span>';
+
+ echo '</div>';
+
+
+ // Second left line - version...
+ echo '<div class="footer_line">';
+
+ // Verzijo izpišemo samo za admine
+ if ($admin_type == 0) {
+
+ // Verzija 1ka
+ $sqlVersion = sisplet_query("SELECT value FROM misc WHERE what='version' LIMIT 1", "obj");
+ if (!empty($sqlVersion)) {
+ echo '<span class="footer_item">'.$lang['srv_footer_1ka_version'].': ' . $sqlVersion->value . '</span>';
+ }
+
+ // Verzija Drupal
+ if ($site_frontend == 'drupal') {
+ $sqlDrupal = sisplet_query("SELECT value FROM misc WHERE what='drupal version'", "obj");
+ if (!empty($sqlDrupal)) {
+ echo '<span class="footer_item">Drupal: ' . $sqlDrupal->value . '</span>';
+ }
+ }
+ }
+
+ echo '<span class="footer_item">Copyright (©) 2002-'.date('Y').' '.$lang['srv_footer_copyright'].'</span>';
+
+ echo '</div>';
+ }
+
+ echo '</div>';
+
+
+ // Desna stran footerja - report a bug
+ echo '<div id="reportabug" class="footer_right">';
+
+ // www.1ka.si ima se link na go instrukcije
+ if($mysql_database_name == 'real1kasi' || $mysql_database_name == 'test1kasi' || $mysql_database_name == 'test21kasi'){
+
+ echo '<a href="#" onClick="consultingPopupOpen();"><span class="faicon external_link"></span> '.$lang['srv_svetovanje'].'</a>';
+ echo '<br>';
+ }
+
+ // Posebej report buga za gorenje
+ if (Common::checkModule('gorenje')){
+ echo '<a href="https://helpdesk.gorenje.com/SubmitSR.jsp" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
+ }
+ /*elseif(isAAI()){
+ echo '<a href="https://www.1ka.si/help1KA" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
+ }*/
+ else{
+ // Slovenski jezik
+ if ($lang['id'] == 1){
+ echo '<a href="https://www.1ka.si/a/72864?Q1=292032" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
+
+ // Zacasen gumb na desni
+ echo '<a href="https://www.1ka.si/a/72864?Q1=292032" target="_blank"><div class="right_help_button">'.$lang['srv_footer_reportabug2'].'</div></a>';
+ }
+ // Angleski jezik
+ else{
+ echo '<a href="https://www.1ka.si/a/72864?Q1=292032&language=2" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
+
+ // Zacasen gumb na desni
+ echo '<a href="https://www.1ka.si/a/72864?Q1=292032&language=2" target="_blank"><div class="right_help_button">'.$lang['srv_footer_reportabug2'].'</div></a>';
+ }
+ }
+
+ echo '</div>';
+
+
+ echo '</footer>';
+ }
+
+
// Pohendla prikazovanje vsebine ankete
private function displayAnketa(){
global $global_user_id;
- // Prikazemo meni na levi po potrebi glede na podstran
- $this->displayLeftMenu();
-
- // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
- $userAccess = UserAccess::getInstance($global_user_id);
- if(!$userAccess->checkUserAccess()){
-
- $userAccess->displayNoAccess();
+ // Preverimo, ce ima uporabnik dostop do te podstrani
+ $d = new Dostop();
+ if(!$d->checkDostopSubFromNavigation($this->first_action)){
+ $d->displayDostopNoAccess();
return;
}
- // Prikazemo glavni del urejanja ankete
- $this->displayAnketaMain();
+ // Imamo levi meni
+ if($this->layout_menu == 'menu_left'){
+ $userAccess = UserAccess::getInstance($global_user_id);
+
+ // Prikazemo meni na levi po potrebi glede na podstran
+ echo '<div class="layout_left_item '.(!$userAccess->checkUserAccess('komentarji') ? 'user_access_locked' : '').'">';
+ $this->displayLeftMenu();
+ echo '</div>';
+
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+ $userAccess = UserAccess::getInstance($global_user_id);
+ if(!$userAccess->checkUserAccess()){
+ $userAccess->displayNoAccess();
+ return;
+ }
+
+ // Prikazemo glavni del urejanja ankete
+ echo '<div class="layout_right_item">';
+ $this->displayAnketaMain();
+ echo '</div>';
+ }
+ // Ni levega menija
+ else{
+
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+ $userAccess = UserAccess::getInstance($global_user_id);
+ if(!$userAccess->checkUserAccess()){
+ $userAccess->displayNoAccess();
+ return;
+ }
+
+ // Prikazemo glavni del urejanja ankete
+ $this->displayAnketaMain();
+ }
}
// Prikazemo glavni del urejanja ankete
private function displayAnketaMain(){
-
- echo '<div class="anketa_edit_main">';
// Ustrezno redirectamo anketo na ustrezno stran
if ($_GET['a'] == 'redirectLink') {
@@ -2319,12 +2263,12 @@ class SurveyAdmin }
}
- echo '</div>';
}
// Prikazemo levi meni po potrebi
private function displayLeftMenu(){
-
+ global $lang, $global_user_id;
+ $userAccess = UserAccess::getInstance($global_user_id);
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
// Levi meni v nastavitvah ankete
@@ -2339,6 +2283,7 @@ class SurveyAdmin || $_GET['a'] == 'forma'
|| $_GET['a'] == 'metadata'
|| $_GET['a'] == 'mobile_settings'
+ || $_GET['a'] == 'table_settings'
|| $_GET['a'] == A_PRIKAZ
|| $_GET['a'] == A_MISSING
|| $_GET['a'] == A_SKUPINE
@@ -2353,6 +2298,7 @@ class SurveyAdmin || $_GET['a'] == A_TELEPHONE
|| $_GET['a'] == A_CHAT
|| $_GET['a'] == A_PANEL
+ || $_GET['a'] == A_EMAIL_ACCESS
|| $_GET['a'] == A_FIELDWORK
|| $_GET['a'] == A_MAZA
|| $_GET['a'] == A_WPN
@@ -2370,29 +2316,25 @@ class SurveyAdmin || $_GET['a'] == 'mju'
|| $_GET['a'] == 'excell_matrix'
|| $_GET['a'] == 'advanced_paradata'
+ || $_GET['a'] == 'advanced_timestamps'
|| $_GET['a'] == 'json_survey_export'
){
- echo '<div class="anketa_edit_left" '.($this->isAnketar ? ' style="display:none;"' : '').'>';
+ if ($this->isAnketar) {
+ return;
+ }
- echo '<div id="globalSetingsLinks" class="globalSetingsLinks baseSettings">';
$this->showGlobalSettingsLinks();
- echo '</div>';
if ($this->survey_type > 1) {
- echo '<div id="globalSetingsLinks" class="globalSetingsLinks advancedModules" '.($this->isAnketar ? ' style="display:none;"' : '').'>';
$this->showAdvancedModulesLinks();
- echo '</div>';
}
- echo '<div id="globalSetingsLinks" class="globalSetingsLinks aditionalSettings" '.($this->isAnketar ? ' style="display:none;"' : '').'>';
$this->showAdditionalSettingsLinks();
- echo '</div>';
- echo '</div>';
}
// Uvoz podatkov levi meni
- elseif ($_GET['a'] == A_COLLECT_DATA && in_array($_GET['m'], ['append', 'merge', 'upload_xls', 'append_xls'])) {
+ elseif ($_GET['a'] == A_COLLECT_DATA && in_array($_GET['m'], ['append', 'merge', 'upload_xls', 'append_xls', 'merge_xls'])) {
echo '<div class="anketa_edit_left">';
@@ -2426,18 +2368,20 @@ class SurveyAdmin // Arhiv levi meni
elseif(in_array($_GET['a'], ['arhivi', 'tracking', 'tracking-hierarhija']) || in_array($_GET['m'], ['anal_arch', 'view_archive'])){
- echo '<div class="anketa_edit_left">';
+ //echo '<span class="menu_left-title title '.(!$userAccess->checkUserAccess('arhivi') ? 'user_access_locked' : '').'">'.$lang['srv_arhivi'].'</span>';
echo '<div id="globalSetingsLinks" class="globalSetingsLinks archive">';
$SSH = new SurveyStaticHtml($this->anketa);
$SSH->displayArchiveNavigation();
echo '</div>';
- echo '</div>';
}
+
}
private function displayAnketaTabStatus(){
+ global $lang;
+ global $admin_type;
// Osnovni statusi
if ($_GET['a'] == A_REPORTI) {
@@ -2534,13 +2478,122 @@ class SurveyAdmin echo ' <div id="surveyStatistic">';
$ss->DisplayLangStatistic();
echo ' </div>';
- }
+ }
+ //prikaze napredne statuse
+ elseif ($_GET['a'] == A_STATUS_ADVANCED) {
+ echo '<div class="status_advanced">';
+
+ // Uporabni respondenti
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_USABLE_RESP ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_USABLE_RESP . '" title="' . $lang['srv_usable_respondents'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box1" id="status_advanced_box1" >';
+ echo $lang['srv_usable_respondents'];
+ echo '</div> </a>';
+
+ // Kakovost respondentov - v delu, zaenkrat samo admini
+ if ($admin_type === '0') {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_KAKOVOST_RESP ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_KAKOVOST_RESP . '" title="' . $lang['srv_kakovost'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box2" id="status_advanced_box2" >';
+ echo $lang['srv_kakovost'];
+ echo '</div> </a>';
+
+ }
+
+ // Index hitrosti - v delu, zaenkrat samo admini
+ if ($admin_type === '0') {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_SPEEDER_INDEX ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_SPEEDER_INDEX . '" title="' . $lang['srv_speeder_index'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box3" id="status_advanced_box3" >';
+ echo $lang['srv_speeder_index'];
+ echo '</div> </a>';
+
+ }
+
+ // Analiza besedil
+ if ($admin_type === '0' || $admin_type === '1') {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_TEXT_ANALYSIS ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_TEXT_ANALYSIS . '" title="' . $lang['srv_text_analysis'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box4" id="status_advanced_box4" >';
+ echo $lang['srv_text_analysis'];
+ echo '</div> </a>';
+ }
+
+ // IP lokacija - gorenje ima to ugasnjeno, volitve imajo tudi ugasnjeno
+ if (!Common::checkModule('gorenje') && !SurveyInfo::getInstance()->checkSurveyModule('voting')) {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_GEOIP_LOCATION ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_GEOIP_LOCATION . '" title="' . $lang['srv_geoip_location'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box5" id="status_advanced_box5" >';
+ echo $lang['srv_geoip_location'];
+ echo '</div> </a>';
+ }
+
+ // Analize urejanja - v delu, zaenkrat samo admini
+ if ($admin_type === '0') {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_EDITS_ANALYSIS ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_EDITS_ANALYSIS . '" title="' . $lang['srv_edits_analysis'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box6" id="status_advanced_box6" >';
+ echo $lang['srv_edits_analysis'];
+ echo '</div> </a>';
+ }
+
+ // reminder tracking - pokazi, ce je admin in so vklopljeni napredni parapodatki
+ $survey_track_reminders = SurveySetting::getInstance()->getSurveyMiscSetting('survey_track_reminders');
+ if ($survey_track_reminders == '') $survey_track_reminders = 0;
+ if (($admin_type === '0' || $admin_type === '1') && SurveyInfo::getInstance()->checkSurveyModule('advanced_paradata')) {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_REMINDER_TRACKING ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_REMINDER_TRACKING . '&m='. A_REMINDER_TRACKING_RECNUM .'" title="' . $lang['srv_reminder_tracking'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box7" id="status_advanced_box7" >';
+ echo $lang['srv_reminder_tracking'];
+ echo '</div> </a>';
+ }
+
+ // ul evalvacija
+ if (Common::checkModule('evalvacija') == '1') {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == A_UL_EVALVATION ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=' . A_UL_EVALVATION . '" title="UL evalvacije">';
+ echo '<div class="status_advanced_box" name="status_advanced_box8" id="status_advanced_box8" >';
+ echo 'UL evalvacije';
+ echo '</div> </a>';
+ }
+
+ // AAPOR
+ // aapor naj bo viden samo če so vabila
+ if (SurveyInfo::getSurveyColumn('user_base') == 1 || SurveyInfo::getInstance()->checkSurveyModule('email')) {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == 'AAPOR' ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=AAPOR&m=aapor1" title="' . $lang['srv_aapor'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box9" id="status_advanced_box9" >';
+ echo $lang['srv_aapor'];
+ echo '</div> </a>';
+ }
+
+ // langStatistic
+ // langStatistic naj bo viden samo če imamo različne jezike in nimamo volitev
+ if (!Common::checkModule('gorenje') && !SurveyInfo::getInstance()->checkSurveyModule('voting')) {
+
+ $qry_string = "SELECT language FROM srv_user WHERE ank_id = '" . $this->anketa . "' AND preview = '0' AND deleted='0' group by language";
+ $qry = (sisplet_query($qry_string));
+ $cntLang = mysqli_num_rows($qry);
+
+ if ($cntLang > 1) {
+ echo '<a class="status_advanced_link' . ($_GET['a'] == 'langStatistic' ? ' active' : '') . '"'
+ . ' href="index.php?anketa=' . $this->anketa . '&a=langStatistic" title="' . $lang['srv_languages_statistics'] . '">';
+ echo '<div class="status_advanced_box" name="status_advanced_box10" id="status_advanced_box10" >';
+ echo $lang['srv_languages_statistics'];
+ echo '</div> </a>';
+ }
+ }
+
+ echo '</div>';
+ }
}
private function displayAnketaTabUrejanje(){
+ $a = isset($_GET['a']) ? $_GET['a'] : '';
+
// Prikaze branching
- if ($_GET['a'] == 'branching' || !isset($_GET['a']) || $_GET['a'] == '') {
+ if ($a == 'branching' || $a == '') {
$bn = new Branching($this->anketa);
$bn->display_new();
@@ -2549,86 +2602,89 @@ class SurveyAdmin $hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
- echo '<div id="globalSetingsList" '.(($_GET['a'] != 'prevajanje' && $_GET['a'] != 'prevajanje2' && $_GET['a'] != A_TEMA && $_GET['a'] != 'theme-editor') ? '' : ' class="full_width"').'>';
+ echo '<div id="globalSetingsList" '.(($a != 'prevajanje' && $a != 'prevajanje2' && $a != A_TEMA && $a != 'theme-editor') ? '' : ' class="full_width"').'>';
// Prikaze nastavitve
- if ($_GET['a'] == 'nastavitve'
- || $_GET['a'] == 'urejanje'
- || $_GET['a'] == 'dostop'
- || $_GET['a'] == 'jezik'
- || $_GET['a'] == 'osn_pod'
- || $_GET['a'] == 'piskot'
- || $_GET['a'] == 'trajanje'
- || $_GET['a'] == 'forma'
- || $_GET['a'] == 'metadata'
- || $_GET['a'] == 'mobile_settings'
- || $_GET['a'] == A_PRIKAZ
- || $_GET['a'] == A_EXPORTSETTINGS
- || $_GET['a'] == A_GDPR
+ if ($a == 'nastavitve'
+ || $a == 'urejanje'
+ || $a == 'dostop'
+ || $a == 'jezik'
+ || $a == 'osn_pod'
+ || $a == 'piskot'
+ || $a == 'trajanje'
+ || $a == 'forma'
+ || $a == 'metadata'
+ || $a == 'mobile_settings'
+ || $a == 'table_settings'
+ || $a == A_PRIKAZ
+ || $a == A_EXPORTSETTINGS
+ || $a == A_GDPR
) {
$sas = new SurveyAdminSettings();
$sas->anketa_nastavitve_global();
}
- elseif ($_GET['a'] == 'prevajanje' || $_GET['a'] == 'prevajanje2') {
+ elseif ($a == 'prevajanje' || $a == 'prevajanje2') {
$p = new Prevajanje($this->anketa);
$p->prevajaj();
}
- elseif ($_GET['a'] == 'tema') {
+ elseif ($a == 'tema') {
$st = new SurveyTheme($this->anketa);
$st->displayGroup();
}
- elseif ($_GET['a'] == 'theme-editor') {
+ elseif ($a == 'theme-editor') {
$ste = new SurveyTheme($this->anketa);
$ste->displayEditing();
}
// nastavitve manjkajočih vrednosti za anketos
- elseif ($_GET['a'] == A_MISSING) {
+ elseif ($a == A_MISSING) {
$smv = new SurveyMissingValues($this->anketa);
$smv->displayMissingForSurvey();
}
// skupine respondentov
- elseif ($_GET['a'] == A_SKUPINE) {
+ elseif ($a == A_SKUPINE) {
$ss = new SurveySkupine($this->anketa);
$ss->displayEdit();
}
// prikaze nastavitve za obvescanje
- elseif ($_GET['a'] == 'alert') {
+ elseif ($a == 'alert') {
$sas = new SurveyAdminSettings();
$sas->alert_nastavitve();
}
// Prikaze urejanje teme
- elseif ($_GET['a'] == 'edit_css') {
+ elseif ($a == 'edit_css') {
$sas = new SurveyAdminSettings();
$sas->anketa_editcss();
}
// Napredni moduli
- elseif ($_GET['a'] == 'uporabnost'
- || ($_GET['a'] == 'hierarhija_superadmin' && $hierarhija_type < 5)
- || $_GET['a'] == 'kviz'
- || $_GET['a'] == 'voting'
- || $_GET['a'] == 'slideshow'
- || $_GET['a'] == 'vnos'
- || $_GET['a'] == A_TELEPHONE
- || $_GET['a'] == A_CHAT
- || $_GET['a'] == A_PANEL
- || $_GET['a'] == A_FIELDWORK
- || $_GET['a'] == A_MAZA
- || $_GET['a'] == A_WPN
- || $_GET['a'] == 'social_network'
- || $_GET['a'] == A_360
- || $_GET['a'] == A_360_1KA
- || $_GET['a'] == 'evoli'
- || $_GET['a'] == 'evoli_teammeter'
- || $_GET['a'] == 'evoli_quality_climate'
- || $_GET['a'] == 'evoli_teamship_meter'
- || $_GET['a'] == 'evoli_organizational_employeeship_meter'
- || $_GET['a'] == 'evoli_employmeter'
- || $_GET['a'] == 'mfdps'
- || $_GET['a'] == 'borza'
- || $_GET['a'] == 'mju'
- || $_GET['a'] == 'excell_matrix'
- || $_GET['a'] == 'advanced_paradata'
- || $_GET['a'] == 'json_survey_export'
+ elseif ($a == 'uporabnost'
+ || ($a == 'hierarhija_superadmin' && $hierarhija_type < 5)
+ || $a == 'kviz'
+ || $a == 'voting'
+ || $a == 'slideshow'
+ || $a == 'vnos'
+ || $a == A_TELEPHONE
+ || $a == A_CHAT
+ || $a == A_PANEL
+ || $a == A_EMAIL_ACCESS
+ || $a == A_FIELDWORK
+ || $a == A_MAZA
+ || $a == A_WPN
+ || $a == 'social_network'
+ || $a == A_360
+ || $a == A_360_1KA
+ || $a == 'evoli'
+ || $a == 'evoli_teammeter'
+ || $a == 'evoli_quality_climate'
+ || $a == 'evoli_teamship_meter'
+ || $a == 'evoli_organizational_employeeship_meter'
+ || $a == 'evoli_employmeter'
+ || $a == 'mfdps'
+ || $a == 'borza'
+ || $a == 'mju'
+ || $a == 'excell_matrix'
+ || $a == 'advanced_paradata'
+ || $a == 'advanced_timestamps'
+ || $a == 'json_survey_export'
) {
$sas = new SurveyAdminSettings();
$sas->showAdvancedModules();
@@ -2640,37 +2696,42 @@ class SurveyAdmin }
private function displayAnketaTabTestiranje(){
- if ($_GET['a'] == 'komentarji') {
- $sas = new SurveyAdminSettings();
- $sas->testiranje_komentarji();
- }
- elseif ($_GET['a'] == 'komentarji_anketa') {
- $sas = new SurveyAdminSettings();
- $sas->testiranje_komentarji_anketa();
+
+ $a = isset($_GET['a']) ? $_GET['a'] : '';
+ $m = isset($_GET['m']) ? $_GET['m'] : '';
+
+ if($a == 'komentarji' || $a == 'komentarji_anketa'){
+ $sc = new SurveyComments($this->anketa);
+ $sc->display_komentarji();
}
- elseif (trim($_GET['m']) == '' || $_GET['m'] == 'diagnostika') {
+ elseif (trim($m) == '' || $m == 'diagnostika') {
$sd = new SurveyDiagnostics($this->anketa);
$sd->doDiagnostics();
$sd->displayDiagnostic();
}
- elseif ($_GET['m'] == 'predvidenicas' || $_GET['m'] == 'cas') {
+ elseif ($m == 'predvidenicas' || $m == 'cas') {
$sas = new SurveyAdminSettings();
$sas->tabTestiranje();
}
- elseif($_GET['a'] == A_TESTIRANJE) {
+ elseif($a == A_TESTIRANJE) {
$sas = new SurveyAdminSettings();
$sas->tabTestiranje();
}
}
private function displayAnketaTabObjava(){
-
if ($_GET['a'] == A_VABILA) {
echo '<div id="vabila">';
$sas = new SurveyAdminSettings();
$sas->anketa_vabila();
echo '</div>';
}
+ elseif ($_GET['a'] == A_OTHER_INV) {
+ echo '<div id="vabila">';
+ $sas = new SurveyAdminSettings();
+ $sas->anketa_vabila_drugo();
+ echo '</div>';
+ }
elseif ($_GET['a'] == A_INVITATIONS) {
$SI = new SurveyInvitationsNew($this->anketa);
$SI->action($_GET['m']);
@@ -2763,6 +2824,11 @@ class SurveyAdmin $spp = new SurveyAppendMerge($this->anketa);
$spp->append_xls();
}
+ elseif ($_GET['m'] == 'merge_xls') {
+
+ $spp = new SurveyAppendMerge($this->anketa);
+ $spp->merge_xls();
+ }
elseif ($_GET['m'] == 'evoli') {
// Posebno PDF porocilo za Evoli
@@ -2910,9 +2976,7 @@ class SurveyAdmin SurveyAnalysis::Init($this->anketa);
SurveyAnalysis::DisplayFilters();
- if ($_GET['m'] == M_ANALYSIS_CROSSTAB) {
- echo '<br class="clr"/>';
- }
+
echo '<div id="div_analiza_data" class="' . $podstran . '">';
SurveyAnalysis::Display();
echo '</div>'; // div_analiza_data
@@ -2924,38 +2988,39 @@ class SurveyAdmin private function displayAnketaTabArhiv(){
- echo '<div id="div_archive_content" ' . (in_array($_GET['a'], ['tracking', 'tracking-hierarhija']) ? ' class="tracking"' : '') . '>';
+ $a = isset($_GET['a']) ? $_GET['a'] : '';
+ $m = isset($_GET['m']) ? $_GET['m'] : '';
+ $d = isset($_GET['d']) ? $_GET['d'] : '';
+
+
+ echo '<div id="div_archive_content" ' . (in_array($a, ['tracking', 'tracking-hierarhija']) ? ' class="tracking"' : '') . '>';
$sas = new SurveyAdminSettings();
- if ($_GET['m'] == 'data') {
+ if ($m == 'data') {
$sas->arhivi_data();
-
}
- else if ($_GET['m'] == 'testdata') {
+ else if ($m == 'testdata') {
$sas->arhivi_testdata();
-
}
- else if ($_GET['m'] == 'survey' || $_GET['m'] == 'survey_data') {
+ else if ($m == 'survey' || $m == 'survey_data') {
$sas->arhivi_survey();
-
}
- else if ($_GET['a'] == 'tracking') {
- if($_GET['d'] == 'download')
+ else if ($a == 'tracking') {
+ if($d == 'download')
return TrackingClass::init()->filter([20,21,22])->csvExport();
TrackingClass::init()->filter([20,21,22])->trackingDisplay();
-
}
- else if ($_GET['a'] == 'tracking-hierarhija') {
- if($_GET['m'] == 'udelezenci') {
- if ($_GET['d'] == 'download')
+ else if ($a == 'tracking-hierarhija') {
+ if($m == 'udelezenci') {
+ if ($d == 'download')
return TrackingClass::init()->filter(22, true)->csvExport();
return TrackingClass::init()->filter(22, true)->trackingDisplay();
}
- if ($_GET['d'] == 'download')
+ if ($d == 'download')
return TrackingClass::init()->filter([20,21], true)->csvExport();
return TrackingClass::init()->filter([20,21], true)->trackingDisplay();
@@ -3032,33 +3097,47 @@ class SurveyAdmin global $admin_type;
global $global_user_id;
- if (trim($_GET['m']) == '') {
- $_GET['m'] = M_EXPORT_SPSS;
+ $userAccess = UserAccess::getInstance($global_user_id);
+
+ if(!$userAccess->checkUserAccess('data_export')){
+ echo '<div class="data user_access_locked locked">';
+ }
+
+
+ if (!isset($_GET['m']) || trim($_GET['m']) == '') {
+ $_GET['m'] = M_EXPORT_EXCEL_XLS;
}
- echo '<ul>';
+ echo '<span class="menu_left-title">'.$lang['srv_survey_archives'].'</span>';
+
+ echo '<ul class="menu_left-list">';
+
+ # EXCEL - XLS
+ echo '<li ' . ($_GET['m'] == M_EXPORT_EXCEL_XLS ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_EXCEL_XLS . '" title="' . $lang['srv_lnk_excel_xls'] . '">' . $lang['srv_lnk_excel_xls'] . '</a></li> ';
+
# SPSS
- echo '<li ' . ($_GET['m'] == M_EXPORT_SPSS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_SPSS . '" title="' . $lang['srv_lnk_spss'] . '"><span>' . $lang['srv_lnk_spss'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == M_EXPORT_SPSS ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_SPSS . '" title="' . $lang['srv_lnk_spss'] . '">' . $lang['srv_lnk_spss'] . '</a></li> ';
# SPSS SAV
- echo '<li ' . ($_GET['m'] == M_EXPORT_SAV ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_SAV . '" title="' . $lang['srv_lnk_sav'] . '"><span>' . $lang['srv_lnk_sav'] . '</span></a></li> ';
-
- # EXCEL - XLS
- echo '<li ' . ($_GET['m'] == M_EXPORT_EXCEL_XLS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_EXCEL_XLS . '" title="' . $lang['srv_lnk_excel_xls'] . '"><span>' . $lang['srv_lnk_excel_xls'] . '</span></a></li> ';
+ //echo '<li ' . ($_GET['m'] == M_EXPORT_SAV ? ' class="active"' : '') . '>';
+ //echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_SAV . '" title="' . $lang['srv_lnk_sav'] . '">' . $lang['srv_lnk_sav'] . '</a></li> ';
# EXCEL - CSV
- echo '<li ' . ($_GET['m'] == M_EXPORT_EXCEL ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_EXCEL . '" title="' . $lang['srv_lnk_excel'] . '"><span>' . $lang['srv_lnk_excel'] . '</span></a></li> ';
+ //echo '<li ' . ($_GET['m'] == M_EXPORT_EXCEL ? ' class="active"' : '') . '>';
+ //echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_EXCEL . '" title="' . $lang['srv_lnk_excel'] . '">' . $lang['srv_lnk_excel'] . '</a></li> ';
# TXT
- echo '<li ' . ($_GET['m'] == M_EXPORT_TXT ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_TXT . '" title="' . $lang['srv_lnk_txt'] . '"><span>' . $lang['srv_lnk_txt'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == M_EXPORT_TXT ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA_EXPORT . '&m=' . M_EXPORT_TXT . '" title="' . $lang['srv_lnk_txt'] . '">' . $lang['srv_lnk_txt'] . '</a></li> ';
echo '</ul>';
+
+ if(!$userAccess->checkUserAccess('data_export')){
+ echo '</div>';
+ }
}
function showcalculationsLinks(){
@@ -3067,25 +3146,37 @@ class SurveyAdmin global $site_path;
global $admin_type;
global $global_user_id;
+
+ $userAccess = UserAccess::getInstance($global_user_id);
- echo '<ul>';
+ if(!$userAccess->checkUserAccess('data_calculation')){
+ echo '<div class="data user_access_locked locked">';
+ }
+
+ echo '<span class="menu_left-title">'.$lang['srv_data_navigation_calculate'].'</span>';
+
+ echo '<ul class="menu_left-list">';
# kalkulacija - nove spremenljivke
- echo '<li ' . ($_GET['m'] == M_COLLECT_DATA_CALCULATION ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=' . M_COLLECT_DATA_CALCULATION . '" title="' . $lang['srv_data_subnavigation_calculaion'] . '"><span>' . $lang['srv_data_subnavigation_calculaion'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == M_COLLECT_DATA_CALCULATION ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=' . M_COLLECT_DATA_CALCULATION . '" title="' . $lang['srv_data_subnavigation_calculaion'] . '">' . $lang['srv_data_subnavigation_calculaion'] . '</a></li> ';
# kodiranje - coding
- echo '<li ' . ($_GET['m'] == 'coding_auto' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=coding_auto" title="' . $lang['srv_auto_coding'] . '"><span>' . $lang['srv_auto_coding'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == 'coding_auto' ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=coding_auto" title="' . $lang['srv_auto_coding'] . '">' . $lang['srv_auto_coding'] . '</a></li> ';
# kodiranje - coding
- echo '<li ' . ($_GET['m'] == 'coding' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=coding" title="' . $lang['srv_hand_coding'] . '"><span>' . $lang['srv_hand_coding'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == 'coding' ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=coding" title="' . $lang['srv_hand_coding'] . '">' . $lang['srv_hand_coding'] . '</a></li> ';
# rekodiranje - recoding
- echo '<li ' . ($_GET['m'] == M_COLLECT_DATA_RECODING || $_GET['m'] == M_COLLECT_DATA_RECODING_DASHBOARD ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=' . M_COLLECT_DATA_RECODING . '" title="' . $lang['srv_data_subnavigation_recode'] . '"><span>' . $lang['srv_data_subnavigation_recode'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == M_COLLECT_DATA_RECODING || $_GET['m'] == M_COLLECT_DATA_RECODING_DASHBOARD ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=' . M_COLLECT_DATA_RECODING . '" title="' . $lang['srv_data_subnavigation_recode'] . '">' . $lang['srv_data_subnavigation_recode'] . '</a></li> ';
echo '</ul>';
+
+ if(!$userAccess->checkUserAccess('data_calculation')){
+ echo '</div>';
+ }
}
function showImportLinks(){
@@ -3095,17 +3186,29 @@ class SurveyAdmin global $admin_type;
global $global_user_id;
- echo '<ul>';
+ $userAccess = UserAccess::getInstance($global_user_id);
+
+ if(!$userAccess->checkUserAccess('data_append')){
+ echo '<div class="data user_access_locked locked">';
+ }
+
+ echo '<span class="menu_left-title">'.$lang['srv_data_navigation_import'].'</span>';
+
+ echo '<ul class="menu_left-list">';
# append
- echo '<li ' . ($_GET['m'] == 'append' || $_GET['m'] == 'upload_xls' || $_GET['m'] == 'append_xls' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=append" title="' . $lang['srv_data_subnavigation_append'] . '"><span>' . $lang['srv_data_subnavigation_append'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == 'append' || $_GET['m'] == 'append_xls' || ((!isset($_POST['do_merge']) || $_POST['do_merge'] == 0) && $_GET['m'] == 'upload_xls') ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=append" title="' . $lang['srv_data_subnavigation_append'] . '">' . $lang['srv_data_subnavigation_append'] . '</a></li> ';
# merge
- echo '<li ' . ($_GET['m'] == 'merge' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=merge" title="' . $lang['srv_data_subnavigation_merge'] . '"><span>' . $lang['srv_data_subnavigation_merge'] . '</span></a></li> ';
+ echo '<li ' . ($_GET['m'] == 'merge' || $_GET['m'] == 'merge_xls' || ($_GET['m'] == 'upload_xls' && (isset($_POST['do_merge']) && $_POST['do_merge'] == 1)) ? ' class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COLLECT_DATA . '&m=merge" title="' . $lang['srv_data_subnavigation_merge'] . '">' . $lang['srv_data_subnavigation_merge'] . '</a></li> ';
echo '</ul>';
+
+ if(!$userAccess->checkUserAccess('data_append')){
+ echo '</div>';
+ }
}
function showGlobalSettingsLinks(){
@@ -3114,96 +3217,103 @@ class SurveyAdmin global $site_path;
global $admin_type;
global $global_user_id;
+
+ $userAccess = UserAccess::getInstance($global_user_id);
$get = $_GET['a'];
$d = new Dostop();
- echo '<h2>' . $lang['srv_survey_settings'] . '</h2>';
+ //echo '<span class="menu_left-title">'.$lang['srv_survey_settings'].'</span>';
+ echo '<span class="menu_left-title ">'.$lang['srv_survey_settings'].'</span>';
- echo '<ul>';
+ echo '<ul class="menu_left-list">';
# zavihek osnovni podatki
- echo '<li ' . ($get == A_SETTINGS || $get == A_OSNOVNI_PODATKI ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_OSNOVNI_PODATKI . '" title="' . $lang['srv_osnovniPodatki2'] . '"><span>' . $lang['srv_osnovniPodatki2'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_SETTINGS || $get == A_OSNOVNI_PODATKI ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_OSNOVNI_PODATKI . '" title="' . $lang['srv_osnovniPodatki2'] . '">' . $lang['srv_osnovniPodatki2'] . '</a></li> ';
- # prikaz pri mobilnikih
- echo '<li ' . ($get == A_MOBILESETTINGS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MOBILESETTINGS . '" title="' . $lang['srv_mobile_settings'] . '"><span>' . $lang['srv_mobile_settings'] . '</span></a></li> ';
+ # prikaz pri mobilnikih - tega zaenkrat nimamo vec, mogoce s bo v prihodnosti se rabilo za kaksne dodatne nastavitve. zaenkrat so tabele v locenem razdelku, slike pa itak vedno prikazujemo
+ /*echo '<li ' . ($get == A_MOBILESETTINGS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MOBILESETTINGS . '" title="' . $lang['srv_mobile_settings'] . '">' . $lang['srv_mobile_settings'] . '</a></li> ';*/
- # tema
- # echo '<li ' . ($get == A_TEMA || $get == 'edit_css' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- # echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_TEMA.'" title="' . $lang['srv_themes'] . '"><span>' . $lang['srv_themes'] . '</span></a></li> ';
+ # prikaz tabel
+ echo '<li ' . ($get == A_TABLESETTINGS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TABLESETTINGS . '" title="' . $lang['srv_table_settings'] . '">' . $lang['srv_table_settings'] . '</a></li> ';
+
# prevajanje - jezik (standardne besede)
- echo '<li ' . ($get == A_JEZIK ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_JEZIK . '" title="' . $lang['srv_standardne_besede'] . '"><span>' . $lang['srv_standardne_besede'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_JEZIK ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_JEZIK . '" title="' . $lang['srv_standardne_besede'] . '">' . $lang['srv_standardne_besede'] . '</a></li> ';
# zavihek dostop -> uredniki
- echo '<li ' . ($get == A_DOSTOP ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_DOSTOP . '" title="' . $lang['srv_global_settnig_access_admin'] . '"><span>' . $lang['srv_global_settnig_access_admin'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_DOSTOP ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_DOSTOP . '" title="' . $lang['srv_global_settnig_access_admin'] . '">' . $lang['srv_global_settnig_access_admin'] . '</a></li> ';
# zavihek piškotek -> dostop respondenti
- echo '<li ' . ($get == A_COOKIE ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COOKIE . '" title="' . $lang['srv_global_settnig_access_respondents'] . '"><span>' . $lang['srv_global_settnig_access_respondents'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_COOKIE ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_COOKIE . '" title="' . $lang['srv_global_settnig_access_respondents'] . '">' . $lang['srv_global_settnig_access_respondents'] . '</a></li> ';
# zavihek obveščanje
- echo '<li class="nonhighlight">';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ALERT . '" title="' . $lang['srv_alert_link'] . '"><span ' . ($get == A_ALERT ? ' class="extended"' : '') . '>' . $lang['srv_alert_link'] . '</span></a>';
+ #echo '<li id="alert" '.(!$userAccess->checkUserAccess('alert') ? 'class="locked"' : '').' ' . ($get == A_ALERT ? 'class="active first"' : '') .'>';
+ echo '<li id="alert" '.(!$userAccess->checkUserAccess('alert') ? 'class="locked"' : '').' ' . ($get == A_ALERT ? 'class="first active"' : 'class="first"') .'>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ALERT . '" title="' . $lang['srv_alert_link'] . '">' . $lang['srv_alert_link'] . '</a>';
$tab = (!$_GET['m']) ? 'complete' : $_GET['m'];
- #echo '<h2>'.$lang['srv_notification_settings'].'</h2>';
echo '</li> ';
- echo '<ul id="sub_navi_alert"' . ($get == A_ALERT ? '' : ' class="displayNone"') . '>';
- echo '<li ' . ($get == A_ALERT && (!$tab || $tab == 'complete') ? ' class="highlightLineTab "' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=complete" title="' . $lang['srv_alert_completed'] . '"><span>' . $lang['srv_alert_completed'] . '</span></a></li> ';
- echo '<li ' . (($tab == 'expired') ? ' class="highlightLineTab "' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=expired" title="' . $lang['srv_alert_expired'] . '"><span>' . $lang['srv_alert_expired'] . '</span></a></li> ';
- echo '<li ' . (($tab == 'active') ? ' class="highlightLineTab "' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=active" title="' . $lang['srv_alert_active'] . '"><span>' . $lang['srv_alert_active'] . '</span></a></li> ';
- echo '<li ' . (($tab == 'delete') ? ' class="highlightLineTab "' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=delete" title="' . $lang['srv_alert_delete'] . '"><span>' . $lang['srv_alert_delete'] . '</span></a></li> ';
+
+ echo '<ul ' . ($get == A_ALERT ? 'class="menu_left-list second"' : ' class="displayNone"') . '>';
+ echo '<li ' . ($get == A_ALERT && (!$tab || $tab == 'complete') ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=complete" title="' . $lang['srv_alert_completed'] . '">' . $lang['srv_alert_completed'] . '</a></li> ';
+ echo '<li ' . (($tab == 'expired') ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=expired" title="' . $lang['srv_alert_expired'] . '">' . $lang['srv_alert_expired'] . '</a></li> ';
+ echo '<li ' . (($tab == 'active') ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=active" title="' . $lang['srv_alert_active'] . '">' . $lang['srv_alert_active'] . '</a></li> ';
+ echo '<li ' . (($tab == 'delete') ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=delete" title="' . $lang['srv_alert_delete'] . '">' . $lang['srv_alert_delete'] . '</a></li> ';
// Gorenje tega nima, po novem to vidijo samo admini, ostali posiljajo preko default
if (!Common::checkModule('gorenje') && $admin_type == '0'){
- echo '<li ' . (($tab == 'email_server') ? ' class="highlightLineTab "' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=email_server" title="' . $lang['srv_user_base_email_server_settings'] . '"><span>' . $lang['srv_user_base_email_server_settings'] . '</span></a></li> ';
+ echo '<li ' . (($tab == 'email_server') ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=alert&m=email_server" title="' . $lang['srv_user_base_email_server_settings'] . '">' . $lang['srv_user_base_email_server_settings'] . '</a></li> ';
}
echo '</ul>';
# zavihek trajanje
- echo '<li ' . ($get == A_TRAJANJE ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TRAJANJE . '" title="' . $lang['srv_settings_activity'] . '"><span>' . $lang['srv_settings_activity'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_TRAJANJE ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TRAJANJE . '" title="' . $lang['srv_settings_activity'] . '">' . $lang['srv_settings_activity'] . '</a></li> ';
# skupine
- echo '<li ' . ($get == A_SKUPINE ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SKUPINE . '" title="' . $lang['srv_skupine'] . '"><span>' . $lang['srv_skupine'] . '</span></a></li> ';
+ echo '<li id="skupine" '.(!$userAccess->checkUserAccess('skupine') ? 'class="locked"' : '').' ' . ($get == A_SKUPINE ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SKUPINE . '" title="' . $lang['srv_skupine'] . '">' . $lang['srv_skupine'] . '</a></li> ';
// Zavihek nastavitve komentarjev
if ($this->survey_type > 1) {
- echo '<li ' . (($_GET['a'] == 'urejanje') ? ' class="highlightLineTab "' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=urejanje" title="' . $lang['srv_settings_komentarji'] . '"><span>' . $lang['srv_settings_komentarji'] . '</span></a></li> ';
+ //echo '<li ' . (($_GET['a'] == 'urejanje') ? 'class="active"' : '') . '>';
+ echo '<li id="komentarji" '.(!$userAccess->checkUserAccess('komentarji') ? 'class="locked"' : '').' ' . (($_GET['a'] == 'urejanje') ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=urejanje" title="' . $lang['srv_settings_komentarji'] . '">' . $lang['srv_settings_komentarji'] . '</a></li> ';
}
if ($this->survey_type > 0) {
// zavihek prikaz podatkov
- echo '<li ' . ($get == A_PRIKAZ ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PRIKAZ . '" title="' . $lang['srv_prikaz_nastavitve'] . '"><span>' . $lang['srv_prikaz_nastavitve'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_PRIKAZ ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PRIKAZ . '" title="' . $lang['srv_prikaz_nastavitve'] . '">' . $lang['srv_prikaz_nastavitve'] . '</a></li> ';
# zavihek metapodatki
- echo '<li ' . ($get == A_METADATA ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_METADATA . '" title="' . $lang['srv_metadata'] . '"><span>' . $lang['srv_metadata'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_METADATA ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_METADATA . '" title="' . $lang['srv_metadata'] . '">' . $lang['srv_metadata'] . '</a></li> ';
- # zavihek manjkajoče vrednosti
- echo '<li ' . ($get == A_MISSING || $_GET['t'] == 'missingValues' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MISSING . '" title="' . $lang['srv_missing_values'] . '"><span>' . $lang['srv_missing_values'] . '</span></a></li> ';
+ /**# zavihek manjkajoče vrednosti
+ echo '<li ' . ($get == A_MISSING || $_GET['t'] == 'missingValues' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MISSING . '" title="' . $lang['srv_missing_values'] . '">' . $lang['srv_missing_values'] . '</a></li> ';**/
+ //Zakomentirano, ker funkcionalnost potrebuje prenovo
}
# PDF/RTF izvozi
- echo '<li ' . ($get == A_EXPORTSETTINGS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_EXPORTSETTINGS . '" title="' . $lang['srv_export_settings'] . '"><span>' . $lang['srv_export_settings'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_EXPORTSETTINGS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_EXPORTSETTINGS . '" title="' . $lang['srv_export_settings'] . '">' . $lang['srv_export_settings'] . '</a></li> ';
# GDPR
- echo '<li ' . ($get == A_GDPR ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_GDPR . '" title="' . $lang['srv_gdpr'] . '"><span>' . $lang['srv_gdpr'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_GDPR ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_GDPR . '" title="' . $lang['srv_gdpr'] . '">' . $lang['srv_gdpr'] . '</a></li> ';
echo '</ul>';
}
@@ -3216,51 +3326,53 @@ class SurveyAdmin global $admin_type;
global $global_user_id;
+ $userAccess = UserAccess::getInstance($global_user_id);
+
$get = $_GET['a'];
$d = new Dostop();
- echo '<h2>' . $lang['set_links'] . '</h2>';
+ echo '<span class="menu_left-title">' . $lang['set_links'] . '</span>';
- echo '<ul>';
+ echo '<ul class="menu_left-list">';
# tema
- echo '<li ' . ($get == A_TEMA || $get == 'edit_css' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TEMA . '" title="' . $lang['srv_themes'] . '"><span>' . $lang['srv_themes'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_TEMA || $get == 'edit_css' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TEMA . '" title="' . $lang['srv_themes'] . '">' . $lang['srv_themes'] . '</a></li> ';
# jezik
- echo '<li ' . ($get == A_PREVAJANJE ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PREVAJANJE . '" title="' . $lang['lang'] . '"><span>' . $lang['lang'] . '</span></a></li> ';
+ echo '<li id="jezik" '.(!$userAccess->checkUserAccess('prevajanje') ? 'class="locked"' : '').' ' . ($get == A_PREVAJANJE ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PREVAJANJE . '" title="' . $lang['lang'] . '">' . $lang['lang'] . '</a></li> ';
# arhivi
- echo '<li ' . ($get == A_ARHIVI || $get == A_TRACKING ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '" title="' . $lang['srv_arhivi'] . '"><span>' . $lang['srv_arhivi'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_ARHIVI || $get == A_TRACKING ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ARHIVI . '" title="' . $lang['srv_arhivi'] . '">' . $lang['srv_arhivi'] . '</a></li> ';
# Objava
if ($d->checkDostopSub('publish')) {
- echo '<li ' . ($get == A_VABILA ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_VABILA . '" title="' . $lang['srv_vabila'] . '"><span>' . $lang['srv_vabila'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_VABILA ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_VABILA . '" title="' . $lang['srv_vabila'] . '">' . $lang['srv_vabila'] . '</a></li> ';
}
# HIERARHIJA
if ($d->checkDostopSub('analyse') && !SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
- echo '<li ' . ($get == A_ANALYSIS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=sumarnik" title="' . $lang['srv_analiza'] . '"><span>' . $lang['srv_analiza'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_ANALYSIS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=sumarnik" title="' . $lang['srv_analiza'] . '">' . $lang['srv_analiza'] . '</a></li> ';
}
if ($d->checkDostopSub('analyse') && SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
- echo '<li ' . ($get == A_ANALYSIS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MEANS_HIERARHY . '" title="' . $lang['srv_analiza'] . '"><span>' . $lang['srv_analiza'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_ANALYSIS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ANALYSIS . '&m=' . M_ANALYSIS_MEANS_HIERARHY . '" title="' . $lang['srv_analiza'] . '">' . $lang['srv_analiza'] . '</a></li> ';
}
if ($this->user_role_cehck(U_ROLE_ADMIN)) {
# Sistemske nastavitve
- echo '<li class="nonhighlight">';
- echo '<a href="index.php?a=nastavitve&m=system" title="' . $lang['srv_settingsSystem'] . '"><span>' . $lang['srv_settingsSystem'] . '</span></a></li> ';
+ echo '<li>';
+ echo '<a href="index.php?a=nastavitve&m=system" title="' . $lang['srv_settingsSystem'] . '">' . $lang['srv_settingsSystem'] . '</a></li> ';
# Nastavitve uporabnika
- echo '<li class="nonhighlight">';
- echo '<a href="index.php?a=nastavitve&m=global_user_settings" title="' . $lang['srv_user_settings'] . '"><span>' . $lang['srv_user_settings'] . '</span></a></li> ';
+ echo '<li>';
+ echo '<a href="index.php?a=nastavitve&m=global_user_settings" title="' . $lang['srv_user_settings'] . '">' . $lang['srv_user_settings'] . '</a></li> ';
}
echo '</ul>';
@@ -3285,79 +3397,100 @@ class SurveyAdmin if ($d->checkDostopAktiven()) {
$userAccess = UserAccess::getInstance($global_user_id);
+ $user_package = $userAccess->getPackage(); // paket, ki ga ima uporabnik (1, 2 , 3)
- echo '<h2>' . $lang['srv_moduli'] . '</h2>';
+ $dostop_styling = "";
+ if ($user_package != "-1" && $user_package != "" && !$userAccess->isAnketaOld())
+ $dostop_styling = "dostop_".$user_package."ka";
- echo '<ul>';
+ if(/*!$userAccess->checkUserAccess('kviz') &&*/ $user_package==1 && $dostop_styling != ""){
+ echo '<div id="advanced_modules" >'; #zacetek napredni moduli
+ }
+ if($user_package != 3 && $dostop_styling != ""){
+ echo '<div class="'.$dostop_styling.'_locked" >'; #zacetek lock
+ }
+
+ echo '<span class="menu_left-title '.$dostop_styling.'">' . $lang['srv_moduli'] . '</span>';
+ if ($dostop_styling != "") {
+ //echo '<span class="faicon lock_close yellow"></span>';
+ }
+
+ echo '<ul class="menu_left-list '.$dostop_styling.'">';
+
+ # Kviz
+ echo '<li ' . ($get == A_KVIZ ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_KVIZ.'" title="' . $lang['srv_vrsta_survey_type_6'] . '" '.(!$userAccess->checkUserAccess($what='kviz') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_6'] . '</a></li> ';
+
+ if($user_package==2){
+ echo '<div id="advanced_modules" class="locked" >'; #zacetek zaklepa naprednih modulov 2KA
+ }
# Evalvacija
- echo '<li ' . ($get == A_UPORABNOST ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_UPORABNOST . '" title="' . $lang['srv_vrsta_survey_type_4'] . '" '.(!$userAccess->checkUserAccess($what='uporabnost') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_4'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_UPORABNOST ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_UPORABNOST . '" title="' . $lang['srv_vrsta_survey_type_4'] . '" '.(!$userAccess->checkUserAccess($what='uporabnost') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_4'] . '</a></li> ';
# Samoevalvacija hirarhija - hierarhija_superadmin
//$row_user se zacasno uporabi tudi za modul MAZA
$row_user = SurveyUserSetting::getInstance()->getUserRow();
if (\Hierarhija\HierarhijaHelper::preveriDostop($this->anketa)) {
- echo '<li ' . ($get == A_HIERARHIJA_SUPERADMIN ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
+ echo '<li ' . ($get == A_HIERARHIJA_SUPERADMIN ? 'class="active"' : '') . '>';
if(SurveyInfo::getSurveyModules('hierarhija') > 1) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m='.M_HIERARHIJA_STATUS.'" title="' . $lang['srv_vrsta_survey_type_10'] . '"><span>' . $lang['srv_vrsta_survey_type_10'] . '</span></a></li> ';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m='.M_HIERARHIJA_STATUS.'" title="' . $lang['srv_vrsta_survey_type_10'] . '">' . $lang['srv_vrsta_survey_type_10'] . '</a></li> ';
}else{
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m='.M_ADMIN_UREDI_SIFRANTE.'" title="' . $lang['srv_vrsta_survey_type_10'] . '"><span>' . $lang['srv_vrsta_survey_type_10'] . '</span></a></li> ';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m='.M_ADMIN_UREDI_SIFRANTE.'" title="' . $lang['srv_vrsta_survey_type_10'] . '">' . $lang['srv_vrsta_survey_type_10'] . '</a></li> ';
}
}
- # Vnos vprasalnikov - premaknjeno kar v nastavitve -> dostop uredniki
- /*echo '<li ' . ($get == A_VNOS ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_VNOS . '" title="' . $lang['srv_vrsta_survey_type_5'] . '" '.(!$userAccess->checkUserAccess($what='vnos') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_5'] . '</span></a></li> ';*/
- # Kviz
- echo '<li ' . ($get == A_KVIZ ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_KVIZ.'" title="' . $lang['srv_vrsta_survey_type_6'] . '" '.(!$userAccess->checkUserAccess($what='kviz') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_6'] . '</span></a></li> ';
-
- # Volitve
- if ($admin_type == 0) {
- echo '<li ' . ($get == A_VOTING ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_VOTING.'" title="' . $lang['srv_vrsta_survey_type_18'] . '" '.(!$userAccess->checkUserAccess($what='voting') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_18'] . '</span></a></li> ';
- }
+ echo '<li ' . ($get == A_VOTING ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_VOTING.'" title="' . $lang['srv_vrsta_survey_type_18'] . '" '.(!$userAccess->checkUserAccess($what='voting') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_18'] . '</a></li> ';
# Socialna omrezja
- echo '<li ' . ($get == A_SOCIAL_NETWORK ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SOCIAL_NETWORK . '" title="' . $lang['srv_vrsta_survey_type_8'] . '" '.(!$userAccess->checkUserAccess($what='social_network') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_8'] . '</span></a></li> ';
-
- # Prezentacija
- echo '<li ' . ($get == A_SLIDESHOW ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SLIDESHOW . '" title="' . $lang['srv_vrsta_survey_type_9'] . '" '.(!$userAccess->checkUserAccess($what='slideshow') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_9'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_SOCIAL_NETWORK ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_SOCIAL_NETWORK . '" title="' . $lang['srv_vrsta_survey_type_8'] . '" '.(!$userAccess->checkUserAccess($what='social_network') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_8'] . '</a></li> ';
# Telefonska anketa
- echo '<li ' . ($get == A_TELEPHONE ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TELEPHONE . '" title="' . $lang['srv_vrsta_survey_type_7'] . '" '.(!$userAccess->checkUserAccess($what='telephone') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_7'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_TELEPHONE ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_TELEPHONE . '" title="' . $lang['srv_vrsta_survey_type_7'] . '" '.(!$userAccess->checkUserAccess($what='telephone') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_7'] . '</a></li> ';
- # Chat
- echo '<li ' . ($get == A_CHAT ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_CHAT . '" title="' . $lang['srv_vrsta_survey_type_14'] . '" '.(!$userAccess->checkUserAccess($what='chat') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_14'] . '</span></a></li> ';
+ # Chat - se ne uporablja vec, viden je samo v anketah, kjer je vklopljen
+ /*echo '<li ' . ($get == A_CHAT ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_CHAT . '" title="' . $lang['srv_vrsta_survey_type_14'] . '" '.(!$userAccess->checkUserAccess($what='chat') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_14'] . '</a></li> ';*/
# Panel
- echo '<li ' . ($get == A_PANEL ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PANEL . '" title="' . $lang['srv_vrsta_survey_type_15'] . '" '.(!$userAccess->checkUserAccess($what='panel') ? 'class="user_access_locked"' : '').'><span>' . $lang['srv_vrsta_survey_type_15'] . '</span></a></li> ';
-
+ echo '<li ' . ($get == A_PANEL ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_PANEL . '" title="' . $lang['srv_vrsta_survey_type_15'] . '" '.(!$userAccess->checkUserAccess($what='panel') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_15'] . '</a></li> ';
+
+ # Dostop z emailom - zaenkrat samo admini
+ if ($admin_type == 0 || SurveyInfo::getInstance()->checkSurveyModule('email_access')) {
+ echo '<li ' . ($get == A_EMAIL_ACCESS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_EMAIL_ACCESS . '" title="' . $lang['srv_vrsta_survey_type_19'] . '" '.(!$userAccess->checkUserAccess($what='email_access') ? 'class="'.$dostop_styling.'"' : '').'>' . $lang['srv_vrsta_survey_type_19'] . '</a></li> ';
+ }
+
# Napredni parapodatki - samo admini oz. ce je vklopljen
if ($admin_type == 0 || SurveyInfo::getInstance()->checkSurveyModule('advanced_paradata')) {
- echo '<li ' . ($get == A_ADVANCED_PARADATA ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_PARADATA . '" title="' . $lang['srv_vrsta_survey_type_16'] . '"><span>' . $lang['srv_vrsta_survey_type_16'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_ADVANCED_PARADATA ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_PARADATA . '" title="' . $lang['srv_vrsta_survey_type_16'] . '">' . $lang['srv_vrsta_survey_type_16'] . '</a></li> ';
+ }
+
+ # Napredni parapodatki - samo admini oz. ce je vklopljen
+ if ($admin_type == 0 || SurveyInfo::getInstance()->checkSurveyModule('advanced_timestamps')) {
+ echo '<li ' . ($get == A_ADVANCED_TIMESTAMPS ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_ADVANCED_TIMESTAMPS . '" title="' . $lang['srv_vrsta_survey_type_20'] . '">' . $lang['srv_vrsta_survey_type_20'] . '</a></li> ';
}
# JSON izvoz ankete - samo admini oz. ce je vklopljen
if ($admin_type == 0 || SurveyInfo::getInstance()->checkSurveyModule('json_survey_export')) {
- echo '<li ' . ($get == A_JSON_SURVEY_EXPORT ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_JSON_SURVEY_EXPORT . '" title="' . $lang['srv_vrsta_survey_type_17'] . '"><span>' . $lang['srv_vrsta_survey_type_17'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_JSON_SURVEY_EXPORT ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_JSON_SURVEY_EXPORT . '" title="' . $lang['srv_vrsta_survey_type_17'] . '">' . $lang['srv_vrsta_survey_type_17'] . '</a></li> ';
}
# Tablice, laptopi
if ($admin_type == 0 || $admin_type == 1) {
- echo '<li ' . ($get == A_FIELDWORK ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_FIELDWORK . '" title="' . $lang['srv_vrsta_survey_type_13'] . '"><span>' . $lang['srv_vrsta_survey_type_13'] .' (beta)' . '</span></a></li> ';
+ echo '<li ' . ($get == A_FIELDWORK ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_FIELDWORK . '" title="' . $lang['srv_vrsta_survey_type_13'] . '">' . $lang['srv_vrsta_survey_type_13'] .' (beta)' . '</a></li> ';
}
# Aplikacija za anketirance
@@ -3368,94 +3501,106 @@ class SurveyAdmin ($global_user_id == 1073 && $row_user['email'] == 'nejc.berzelak@fdv.uni-lj.si') ||
($global_user_id == 836 && $row_user['email'] == 'nejc.berzelak@fdv.uni-lj.si'));
if (Common::checkModule('maza') && $user_dostop) {
- echo '<li ' . ($get == A_MAZA ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MAZA . '" title="' . $lang['srv_maza'] . '"><span>' . $lang['srv_maza'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_MAZA ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_MAZA . '" title="' . $lang['srv_maza'] . '">' . $lang['srv_maza'] . '</a></li> ';
}
# 360 web push notifications - zaenkrat samo admini
if (Common::checkModule('wpn') && $admin_type == 0) {
- echo '<li ' . ($get == A_WPN ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_WPN . '" title="' . $lang['srv_wpn'] . '"><span>' . $lang['srv_wpn'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_WPN ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_WPN . '" title="' . $lang['srv_wpn'] . '">' . $lang['srv_wpn'] . '</a></li> ';
}
# 360 stopinj
if (Common::checkModule('360')) {
- echo '<li ' . ($get == A_360 ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_360 . '" title="' . $lang['srv_vrsta_survey_type_11'] . '"><span>' . $lang['srv_vrsta_survey_type_11'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_360 ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_360 . '" title="' . $lang['srv_vrsta_survey_type_11'] . '">' . $lang['srv_vrsta_survey_type_11'] . '</a></li> ';
}
# 360 stopinj 1ka - zaenkrat samo admini
if (Common::checkModule('360_1ka') && $admin_type == 0) {
- echo '<li ' . ($get == A_360_1KA ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_360_1KA . '" title="' . $lang['srv_vrsta_survey_type_12'] . '"><span>' . $lang['srv_vrsta_survey_type_12'] . '</span></a></li> ';
+ echo '<li ' . ($get == A_360_1KA ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_360_1KA . '" title="' . $lang['srv_vrsta_survey_type_12'] . '">' . $lang['srv_vrsta_survey_type_12'] . '</a></li> ';
}
# evoli
if (Common::checkModule('evoli')) {
- echo '<li ' . ($get == 'evoli' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli" title="Evoli"><span>Evoli</span></a></li> ';
+ echo '<li ' . ($get == 'evoli' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli" title="Evoli">Evoli</a></li> ';
}
# evoli - teammeter
if (Common::checkModule('evoli_teammeter')) {
- echo '<li ' . ($get == 'evoli_teammeter' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_teammeter" title="Evoli team meter"><span>Evoli team meter</span></a></li> ';
+ echo '<li ' . ($get == 'evoli_teammeter' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_teammeter" title="Evoli team meter">Evoli team meter</a></li> ';
}
# evoli - evoli_quality_climate
if (Common::checkModule('evoli_quality_climate')) {
- echo '<li ' . ($get == 'evoli_quality_climate' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_quality_climate" title="Evoli quality climate"><span>Evoli quality climate</span></a></li> ';
+ echo '<li ' . ($get == 'evoli_quality_climate' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_quality_climate" title="Evoli quality climate">Evoli quality climate</a></li> ';
}
# evoli - evoli_teamship_meter
if (Common::checkModule('evoli_teamship_meter')) {
- echo '<li ' . ($get == 'evoli_teamship_meter' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_teamship_meter" title="Evoli teamship meter"><span>Evoli teamship meter</span></a></li> ';
+ echo '<li ' . ($get == 'evoli_teamship_meter' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_teamship_meter" title="Evoli teamship meter">Evoli teamship meter</a></li> ';
}
# evoli - evoli_organizational_employeeship_meter
if (Common::checkModule('evoli_organizational_employeeship_meter')) {
- echo '<li ' . ($get == 'evoli_organizational_employeeship_meter' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_organizational_employeeship_meter" title="Evoli organizational employeeship meter"><span>Evoli organizational employeeship meter</span></a></li> ';
+ echo '<li ' . ($get == 'evoli_organizational_employeeship_meter' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_organizational_employeeship_meter" title="Evoli organizational employeeship meter">Evoli organizational employeeship meter</a></li> ';
}
# evoli - employmeter
if (Common::checkModule('evoli_employmeter')) {
- echo '<li ' . ($get == 'evoli_employmeter' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_employmeter" title="Evoli employeeship meter"><span>Evoli employeeship meter</span></a></li> ';
+ echo '<li ' . ($get == 'evoli_employmeter' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=evoli_employmeter" title="Evoli employeeship meter">Evoli employeeship meter</a></li> ';
}
# mfdps
if (Common::checkModule('mfdps')) {
- echo '<li ' . ($get == 'mfdps' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=mfdps" title="MFDPS"><span>MFDPŠ</span></a></li> ';
+ echo '<li ' . ($get == 'mfdps' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=mfdps" title="MFDPS">MFDPŠ</a></li> ';
}
# borza
if (Common::checkModule('borza') && $admin_type == 0) {
- echo '<li ' . ($get == 'borza' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=borza" title="BORZA"><span>Borza</span></a></li> ';
+ echo '<li ' . ($get == 'borza' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=borza" title="BORZA"Borza</a></li> ';
}
# mju - vsi, ker je to samo na njihovi instalaciji
if (Common::checkModule('mju')) {
- echo '<li ' . ($get == 'mju' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=mju" title="MJU"><span>MJU</span></a></li> ';
+ echo '<li ' . ($get == 'mju' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=mju" title="MJU">MJU</a></li> ';
}
# excelleration matrix - zaenkrat samo admini
if (Common::checkModule('excell_matrix') && $admin_type == 0) {
- echo '<li ' . ($get == 'excell_matrix' ? ' class="highlightLineTab"' : ' class="nonhighlight"') . '>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=excell_matrix" title="Excelleration matrix"><span>Excelleration matrix</span></a></li> ';
+ echo '<li ' . ($get == 'excell_matrix' ? 'class="active"' : '') . '>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=excell_matrix" title="Excelleration matrix">Excelleration matrix</a></li> ';
+ }
+
+ if($user_package==2 && $dostop_styling != ""){
+ echo '</div>'; #konec zaklepa napredni moduli 2KA
}
echo '</ul>';
+
+ if($user_package != 3 && $dostop_styling != ""){
+ echo '</div>'; #konec lock
+ }
+
+ if($user_package==1 && $dostop_styling != ""){
+ echo '</div>'; #konec napredni moduli
+ }
}
}
/**
- * prikaze seznam anket in polje za dodajanje na prvi strani
+ * prikaze admin vmesnik izven specificne ankete (seznam anket in polje za dodajanje na prvi strani, nastavitve uporabnika, uporabnike...)
*
*/
private function displaySeznamAnket(){
@@ -3463,13 +3608,15 @@ class SurveyAdmin # naložimo razred z seznamom anket
- $SL = new SurveyList();
+ $SL = ($has_folders = SurveyList::hasFolders()) ? new SurveyListFolders() : new SurveyList();
+
+
$SLCount = $SL->countSurveys();
$SLCountPhone = $SL->countPhoneSurveys();
// 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' : '').'">';
+ 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' : '').' '.$this->layout_width.' '.$this->layout_menu.'">';
// izpis pregledovanja
if ((!isset($_GET['a']) && !isset($_GET['anketa'])) || ($_GET['a'] == 'pregledovanje')) {
@@ -3483,7 +3630,7 @@ class SurveyAdmin $newSurvey = new NewSurvey();
if (isset($_GET['b']) && $_GET['b'] == 'new_survey'){
- echo '<div id="new_anketa_div">';
+ echo '<div id="new_anketa_div" class="fullwidth menu_left">';
$newSurvey->displayNewSurveyPage();
echo '</div>';
}
@@ -3497,7 +3644,7 @@ class SurveyAdmin // Izpis okna za ustvarjanje ankete (enako kot ce nimamo nobene ankete)
if ($_GET['a'] == 'ustvari_anketo') {
- echo '<div id="new_anketa_div">';
+ echo '<div id="new_anketa_div" class="fullwidth menu_left">';
$newSurvey = new NewSurvey();
$newSurvey->displayNewSurveyPage();
echo '</div>';
@@ -3511,7 +3658,7 @@ class SurveyAdmin echo '</div>';
}
else {
- echo '<div id="new_anketa_div">';
+ echo '<div id="new_anketa_div" class="fullwidth menu_left">';
$newSurvey = new NewSurvey();
$newSurvey->displayNewSurveyPage();
echo '</div>';
@@ -3548,6 +3695,9 @@ class SurveyAdmin elseif($_GET['m'] == 'all'){
$sas->allUsersList();
}
+ elseif($_GET['m'] == 'add'){
+ $sas->dodeljeniUporabniki();
+ }
else {
$sas->assignedUsersList();
}
@@ -3623,6 +3773,9 @@ class SurveyAdmin $sas = new SurveyAdminSettings();
$sas->data_deleted();
}
+ if ($_GET['m'] == 'help_settings' && $this->user_role_cehck(U_ROLE_ADMIN)) {
+ Help::displaySettings();
+ }
if ($_GET['m'] == 'global_user_settings') {
$sas = new SurveyAdminSettings();
$sas->globalUserSettings();
@@ -3631,6 +3784,10 @@ class SurveyAdmin $sas = new SurveyAdminSettings();
$sas->globalUserMyProfile();
}
+ if ($_GET['m'] == 'global_user_ChangeArchive') {
+ $sas = new SurveyAdminSettings();
+ $sas->globalUserChangeArchive();
+ }
echo '</div>';
}
@@ -3752,6 +3909,14 @@ class SurveyAdmin }
}
+ // kolektor modul
+ if ($_GET['a'] == 'kolektor') {
+ echo ' <div id="kolektor">';
+ $kolektor = new Kolektor();
+ $kolektor->display();
+ echo ' </div>';
+ }
+
// Konec moje_ankete_edit
echo '</div>';
}
@@ -3762,11 +3927,10 @@ class SurveyAdmin * vrne kodo ankete, ki se jo uporabi za embed
*
*/
- function getEmbed($js = true)
+ static function getEmbed($js = true)
{
global $site_url;
- //return '<iframe id="1ka" src="'.$site_url.'main/survey/index.php?anketa='.$this->anketa.'" scrolling="auto" frameborder="0" width="100%"></iframe><script type="text/javascript">function r(){var a=window.location.hash.replace("#","");if(a.length==0)return;document.getElementById("1ka").style.height=a+"px";window.location.hash=""};window.setInterval(\\\'r()\\\',100);</script>';
$iframe = '<iframe id="1ka" src="' . SurveyInfo::getSurveyLink() . '" height="400px" width="100%" scrolling="auto" frameborder="0"></iframe>';
$javascript = '<script type="text/javascript">function r(){var a=window.location.hash.replace("#","");if(a.length==0)return;document.getElementById("1ka").style.height=a+"px";window.location.hash=""};window.setInterval("r()",100);</script>';
@@ -3790,32 +3954,22 @@ class SurveyAdmin if (!$sql) return;
if (mysqli_num_rows($sql) > 0 && $hierarhija_type < 5) {
- echo '<div class="active-alert">';
-
- echo '<span class="tooltip active-editors">';
-
- echo '<a href="#" onclick="return false;">';
- echo '<span class="square green"></span>';
- echo ' <span class="active-editors">' . $lang['srv_users_viewing'] . ': <b>' . (mysqli_num_rows($sql) + 1) . '</b></span>';
- echo '</a>';
+ echo '<div class="action_note_box active-users">';
+ echo ' <span class="faicon users"></span>';
+ echo ' <span class="text">'.$lang['srv_users_viewing3'].': ' . (mysqli_num_rows($sql) + 1) . '</span>';
+ /*
if(is_null($hierarhija_type) || $hierarhija_type == 1){
- echo '<span class="expanded-tooltip bottom" id="request_help_content">';
-
- echo '<b>' . $lang['srv_users_viewing2'] . '</b><p>';
- while ($row = mysqli_fetch_array($sql)) {
- $sql1 = sisplet_query("SELECT name, surname, email FROM users WHERE id = '$row[user]'");
- if ($row1 = mysqli_fetch_array($sql1)) {
- echo '<a href="mailto:' . $row1['email'] . '" target="_blank">' . $row1['email'] . '</a> (' . $row1['name'] . ' ' . $row1['surname'] . ')<br>';
+
+ while ($row = mysqli_fetch_array($sql)) {
+ $sql1 = sisplet_query("SELECT name, surname, email FROM users WHERE id = '$row[user]'");
+ if ($row1 = mysqli_fetch_array($sql1)) {
+ echo ' <a href="mailto:' . $row1['email'] . '" target="_blank">' . $row1['email'] . '</a> (' . $row1['name'] . ' ' . $row1['surname'] . ')';
+ }
}
- }
- echo '</p>';
-
- echo '<span class="arrow"></span>';
- echo '</span>'; // expanded-tooltip bottom
}
- echo '</span>'; // request-help
+ */
echo '</div>';
}
@@ -3833,65 +3987,271 @@ class SurveyAdmin echo '<span class="tooltip request-help">';
- echo '<a href="#" onclick="return false;" title="' . $lang['srv_request_help'] . '">';
- echo '<span class="faicon users icon-as_link"></span>';
+ echo '<a href="#" onclick="return false;">';
+ echo ' <span class="faicon users icon-as_link"></span>';
echo '</a>';
- echo '<span class="expanded-tooltip bottom light" id="request_help_content">';
+ echo '<div class="expanded-tooltip bottom" id="request_help_content">';
+ $this->tooltip_request_help();
+ echo '</div>'; // expanded-tooltip bottom
- $this->request_help_content();
-
- echo '</span>'; // expanded-tooltip bottom
echo '</span>'; // request-help
}
- function request_help_content(){
+ // Tooltip "prosi za pomoc"
+ public function tooltip_request_help(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
- echo '<b>' . $lang['srv_dostopmail_1'] . '</b>';
+ echo '<div class="expanded-tooltip-box">';
- $d = new Dostop();
+ echo ' <h1><span class="faicon users"></span>'.$lang['srv_multilang_users'].'</h1>';
+
+ $d = new Dostop();
$users = $d->getDostop();
+
if (is_countable($users[2]) && count($users[2]) > 0) {
- echo '<p><b>' . $lang['srv_users'] . ':</b> ';
- if ($d->checkDostopAktiven()) echo ' (<a href="index.php?anketa=' . $this->anketa . '&a=dostop">' . $lang['srv_add_edit'] . '</a>)';
- echo '<br>';
+
+ echo ' <div class="tooltip_line semi-bold">';
+ if ($d->checkDostopAktiven())
+ echo $lang['srv_users'].' (<a href="index.php?anketa=' . $this->anketa . '&a=dostop">'.$lang['srv_add_edit'].'</a>):';
+ else
+ echo $lang['srv_users'].':';
+ echo ' </div>';
foreach ($users[2] AS $user) {
- echo ' - ' . $user['email'] . '<br>';
+ echo ' <div class="tooltip_line">';
+ echo $user['email'];
+ echo ' </div>';
}
- echo '</p>';
}
+
if (is_countable($users[1]) && count($users[1]) > 0) {
- echo '<p><b>' . $lang['managers'] . ':</b>';
- if ($d->checkDostopAktiven()) echo ' (<a href="index.php?anketa=' . $this->anketa . '&a=dostop">' . $lang['srv_add_edit'] . '</a>)';
- echo '<br>';
+
+ echo ' <div class="tooltip_line semi-bold">';
+ echo $lang['managers'].':';
+ if ($d->checkDostopAktiven())
+ echo $lang['managers'].' (<a href="index.php?anketa=' . $this->anketa . '&a=dostop">' . $lang['srv_add_edit'] . '</a>):';
+ else
+ echo $lang['managers'].':';
+ echo ' </div>';
foreach ($users[1] AS $user) {
- echo ' - ' . $user['email'] . '<br>';
+ echo ' <div class="tooltip_line">';
+ echo $user['email'];
+ echo ' </div>';
}
- echo '</p>';
}
- echo '<p><b>' . $lang['srv_request_help_txt3'] . '</b> ' . Help::display('help-centre') . '<br>';
+
+ echo ' <div class="tooltip_line semi-bold">';
+ echo $lang['srv_request_help_txt3'].' '.Help::display('help-centre');
+ echo ' </div>';
+
+ echo ' <div class="tooltip_line">';
if ($users[0] !== false) {
- echo $lang['srv_request_help_txt4'] . ' ' . date('j.n.Y', strtotime($users[0])) . ' (<a href="#" onclick="dostop_admin(1); return false;">' . $lang['hour_remove'] . '</a>)';
- } else {
- echo '<a href="#" onclick="dostop_admin(); return false;">' . $lang['srv_dostop_admin'] . '</a>';
+ echo ' <input type="checkbox" id="add_dostop_admin" checked="checked" onclick="dostop_admin(1); return false;">';
+ echo ' <label for="add_dostop_admin">'.$lang['srv_dostop_admin'].'</label>';
+ //echo $lang['srv_request_help_txt4'] . ' ' . date('j.n.Y', strtotime($users[0])) . ' (<a href="#" onclick="dostop_admin(1); return false;">' . $lang['hour_remove'] . '</a>)';
+ }
+ else {
+ echo ' <input type="checkbox" id="add_dostop_admin" onclick="dostop_admin(); return false;">';
+ echo ' <label for="add_dostop_admin">'.$lang['srv_dostop_admin'].'</label>';
+ //echo '<a href="#" onclick="dostop_admin(); return false;">' . $lang['srv_dostop_admin'] . '</a>';
}
- echo '</p>';
+ echo ' </div>';
+
- echo '<span class="arrow"></span>';
+ echo '</div>';
}
- function displaySecondNavigationLinks($navigation = 0)
- {
+ // Tooltip "aktivnost ankete"
+ public function tooltip_survey_activity(){
+ global $lang;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ echo '<div class="expanded-tooltip-box">';
+
+ // Aktivna
+ if($row['active'] == 1){
+ echo ' <h1><span class="faicon info"></span>'.$lang['srv_anketa_active2'].'</h1>';
+ echo ' <div class="tooltip_line">'.$lang['srv_anketa_active2_text'].'</div>';
+ }
+ // Ni aktivna
+ else{
+ echo ' <h1><span class="faicon info"></span>'.$lang['srv_anketa_noactive2'].'</h1>';
+ echo ' <div class="tooltip_line">'.$lang['srv_anketa_noactive2_text'].'</div>';
+ }
+
+ echo '</div>';
+ }
+
+ // Tooltip "zaklenjena/odklenjena anketa"
+ public function tooltip_survey_locked(){
+ global $lang;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ echo '<div class="expanded-tooltip-box">';
+
+ // Zaklenjena
+ if($row['locked'] == 1){
+ echo ' <h1><span class="faicon info"></span>'.$lang['srv_anketa_locked'].'</h1>';
+ echo ' <div class="tooltip_line">'.$lang['srv_anketa_locked_text'].'</div>';
+ }
+ // Ni zaklenjena
+ else{
+ echo ' <h1><span class="faicon info"></span>'.$lang['srv_anketa_unlocked'].'</h1>';
+ echo ' <div class="tooltip_line">'.$lang['srv_anketa_unlocked_text'].'</div>';
+ }
+
+ echo '</div>';
+ }
+
+ // Tooltip "testni vnos"
+ public function tooltip_test_data(){
+ global $lang;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ echo '<div class="expanded-tooltip-box">';
+
+ echo ' <h1><span class="faicon info"></span>'.$lang['srv_survey_testdata'].'</h1>';
+ echo ' <div class="tooltip_line">'.$lang['srv_testdata_text'].'</div>';
+
+ echo '</div>';
+ }
+
+ // Tooltip "predogled anekte"
+ public function tooltip_preview_data(){
+ global $lang;
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+ $link = SurveyInfo::getSurveyLink();
+
+ echo '<div class="expanded-tooltip-box">';
+
+ echo ' <h1><span class="faicon monitor"></span>'.$lang['srv_poglejanketo2'].'</h1>';
+
+ echo ' <div class="tooltip_line">'.$lang['srv_monitor_toolbox_preview'].'</div>';
+
+
+ echo ' <div class="tooltip_device">';
+
+ // Ce imamo izklopljene mobilne prilagoditve ne pustimo preview-ja na mobile, ker itak ne prikaze scalano
+ $mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly');
+ if($mobile_friendly != '0'){
+
+ echo '<div class="item">';
+ echo ' <a href="' . $link . '&preview=on" title="'.$lang['srv_preview_computer'].'" target="_blank"><span class="faicon monitor"></span>'.$lang['srv_preview_computer'].'</a>';
+ echo '</div>';
+
+ echo '<div class="item separator"></div>';
+
+ echo '<div class="item expand">';
+ echo ' <a href="' . $link . '&preview=on&mobile=1" title="'.$lang['srv_preview_mobile'].'" target="_blank"><span class="faicon mobile"></span>'.$lang['srv_preview_mobile'].'</a>';
+ echo '</div>';
+
+ echo '<div class="item separator"></div>';
+
+ echo '<div class="item">';
+ echo ' <a href="' . $link . '&preview=on&mobile=2" title="'.$lang['srv_preview_tablet'].'" target="_blank"><span class="faicon tablet"></span>'.$lang['srv_preview_tablet'].'</a>';
+ echo '</div>';
+ }
+ else{
+ echo '<div class="item">';
+ echo ' <a href="' . $link . '&preview=on" title="'.$lang['srv_preview_computer'].'" target="_blank"><span class="faicon monitor"></span>'.$lang['srv_preview_computer'].'</a>';
+ echo '</div>';
+ }
+
+ echo '</div>';
+
+
+ echo '</div>';
+ }
+
+ // Tooltip gridi pomembnih zunanjih linkov
+ public function tooltip_link_grid(){
+ global $lang;
+
+ $subdomain = ($lang['id'] == "1") ? 'www' : 'english';
+ $links = array('www' => array('https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja', 'https://www.1ka.si/d/sl/pomoc/prirocniki', 'https://www.1ka.si/d/sl/cenik/zasebni-paketi',
+ 'https://www.1ka.si/d/sl/cenik/poslovni-paketi', 'https://www.1ka.si/d/sl/novice', 'https://www.1ka.si/d/sl/o-1ka/splosen-opis/nove-funkcionalnosti'),
+ 'english' => array('https://www.1ka.si/d/en/help/frequently-asked-questions', 'https://www.1ka.si/d/en/help/manuals', 'https://www.1ka.si/d/en/cenik/zasebni-paketi',
+ 'https://www.1ka.si/d/sl/cenik/poslovni-paketi', 'https://www.1ka.si/d/en/news', 'https://www.1ka.si/d/en/about/general-description/new-functionalities'));
+
+ echo '<div class="expanded-tooltip-box big_grid left">';
+ echo '<div class="tooltip_grid">';
+
+ echo '<div class="tooltip_grid_item">';
+ echo ' <div class="title">'.$lang['tooltip_link_grid_help'].'</div>';
+ echo ' <div class="tooltip_row">';
+ echo ' <a class="tooltip_row_item" href="'.$links[$subdomain][0].'" target="_blank">';
+ echo ' <div class="item_title">';
+ echo ' <span class="faicon help2 blue"></span><span class="link_title_text">'.$lang['tooltip_link_grid_faq_title'].'</span>';
+ echo ' </div>';
+ echo ' <div class="description">' . $lang['tooltip_link_grid_faq_text'] . '</div>';
+ echo ' </a>';
+ echo ' <a class="tooltip_row_item" href="'.$links[$subdomain][1].'" target="_blank">';
+ echo ' <div class="item_title">';
+ echo ' <span class="faicon book blue"></span><span class="link_title_text">'.$lang['tooltip_link_grid_manu_title'].'</span>';
+ echo ' </div>';
+ echo ' <div class="description">' . $lang['tooltip_link_grid_manu_text'] . '</div>';
+ echo ' </a>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="separator"></div>';
+
+ echo '<div class="tooltip_grid_item">';
+ echo ' <div class="title">'.$lang['tooltip_link_grid_pricelist'].'</div>';
+ echo ' <div class="tooltip_row">';
+ echo ' <a class="tooltip_row_item" href="'.$links[$subdomain][2].'" target="_blank">';
+ echo ' <div class="item_title">';
+ echo ' <span class="faicon user blue"></span><span class="link_title_text">'.$lang['tooltip_link_grid_ind_title'].'</span>';
+ echo ' </div>';
+ echo ' <div class="description">' . $lang['tooltip_link_grid_ind_text'] . '</div>';
+ echo ' </a>';
+ echo ' <a class="tooltip_row_item" href="'.$links[$subdomain][3].'" target="_blank">';
+ echo ' <div class="item_title">';
+ echo ' <span class="faicon briefcase blue"></span><span class="link_title_text">'.$lang['tooltip_link_grid_group_title'].'</span>';
+ echo ' </div>';
+ echo ' <div class="description">' . $lang['tooltip_link_grid_group_text'] . '</div>';
+ echo ' </a>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '<div class="separator"></div>';
+
+ echo '<div class="tooltip_grid_item">';
+ echo ' <div class="title">'.$lang['tooltip_link_grid_novel'].'</div>';
+ echo ' <div class="tooltip_row">';
+ echo ' <a class="tooltip_row_item" href="'.$links[$subdomain][4].'" target="_blank">';
+ echo ' <div class="item_title">';
+ echo ' <span class="faicon newspaper blue"></span><span class="link_title_text">'.$lang['tooltip_link_grid_news_title'].'</span>';
+ echo ' </div>';
+ echo ' <div class="description">' . $lang['tooltip_link_grid_news_text'] . '</div>';
+ echo ' </a>';
+ echo ' <a class="tooltip_row_item" href="'.$links[$subdomain][5].'" target="_blank">';
+ echo ' <div class="item_title">';
+ echo ' <span class="faicon puzzle-piece blue"></span><span class="link_title_text">'.$lang['tooltip_link_grid_update_title'].'</span>';
+ echo ' </div>';
+ echo ' <div class="description">' . $lang['tooltip_link_grid_update_text'] . '</div>';
+ echo ' </a>';
+ echo ' </div>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+ }
+
+ function displaySecondNavigationLinks($navigation = 0){
global $lang, $site_url;
global $global_user_id;
@@ -3901,23 +4261,9 @@ class SurveyAdmin $userAccess = UserAccess::getInstance($global_user_id);
if ($navigation == 0) {
+
# stran status (reporti) ali urejanje
if ($this->first_action == NAVI_UREJANJE || $_GET['a'] == '' || $_GET['a'] == A_REPORTI) {
-
- if ($_GET['a'] == '' || $_GET['a'] == 'branching') {
-
- if ($row['toolbox'] <= 2) {
- $row['toolbox'] == 1 ? $preklop = 3 : $preklop = 4;
- echo '<a href="#" title="' . $lang['srv_library'] . '" class="srv_ico" onclick="change_mode(\'toolbox\', \'' . $preklop . '\'); return false;">';
- echo '<span class="faicon library"></span>';
- echo '</a>';
- } else {
- $row['toolbox'] == 3 ? $preklop = 1 : $preklop = 2;
- echo '<a href="#" title="' . $lang['srv_library'] . '" class="srv_ico" onclick="if ( $(\'#toolbox_library\').css(\'display\') == \'none\' ) { close_all_editing(); $(\'#toolbox_library\').show(); } else { change_mode(\'toolboxback\', \'' . $preklop . '\'); } return false;">';
- echo '<span class="faicon library"></span>';
- echo '</a>';
- }
- }
$p = new Prevajanje($this->anketa);
global $lang1;
@@ -3964,7 +4310,12 @@ class SurveyAdmin }
# kopiranje
- echo '<a href="#" onclick="anketa_copy_top(\'' . $this->anketa . '\'); return false;" title="' . $lang['srv_anketacopy'] . '" class="srv_ico"><span class="faicon anketa_copy"></span></a>';
+ if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
+ //echo '<a href="#" onclick="anketa_copy_top(\'' . $this->anketa . '\'); return false;" title="' . $lang['srv_anketacopy'] . '" class="srv_ico"><span class="faicon anketa_copy"></span></a>';
+ }
+ else{
+ echo '<a href="#" onclick="anketa_copy_top(\'' . $this->anketa . '\'); return false;" title="' . $lang['srv_anketacopy'] . '" class="srv_ico"><span class="faicon anketa_copy"></span></a>';
+ }
# brisanje
echo '<a href="#" onclick="anketa_delete(\'' . $this->anketa . '\', \'' . $lang['srv_anketadeleteconfirm'] . '\'); return false;" title="' . $lang['srv_anketadelete'] . '" class="srv_ico"><span class="faicon anketa_delete" title="' . $lang['srv_anketadelete'] . '"></span></a>';
@@ -3985,14 +4336,19 @@ class SurveyAdmin global $lang, $site_url, $global_user_id, $admin_type;
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
- $userAccess = UserAccess::getInstance($global_user_id);
+ $userAccess = UserAccess::getInstance($global_user_id);
+ $current_package = $userAccess->getPackage();
+ $dostop_styling = "";
+ if ($current_package != "-1" && $current_package != "")
+ $dostop_styling = "dostop_".$current_package."ka";
$hidden_icon = (in_array($_GET['m'], array(M_ANALYSIS_CROSSTAB, M_ANALYSIS_MULTICROSSTABS, M_ANALYSIS_MEANS, M_ANALYSIS_TTEST, M_ANALYSIS_BREAK))) ? 'hidden' : '';
echo '<a href="#" class="srv_ico '.$hidden_icon.'" id="hover_export_icon" title="' . $lang['srv_export'] . '">';
echo '<span class="faicon export"></span>';
echo '</a>';
- echo '<div id="hover_export">';
+
+ echo '<div id="hover_export" '.(!$userAccess->checkUserAccess('public_link') ? 'class= "user_access_locked"' : '').'>';
if ($navigation == 0) {
@@ -4005,92 +4361,331 @@ class SurveyAdmin $lan_ppt = ' title="' . $lang['PPT_Izpis'] . '"';
if ($_GET['m'] == M_ANALYSIS_DESCRIPTOR) {
+ if($userAccess->checkUserAccess('publik_link') && $current_package != 3 && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_ANALYSIS . '\',\'' . M_ANALYSIS_DESCRIPTOR . '\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ if($userAccess->checkUserAccess('publik_link') && $current_package == 2 && $dostop_styling != ""){
+ echo '</div>';
+ }
echo '<a href="#" onclick="doArchiveAnaliza();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+
+ if($userAccess->checkUserAccess('publik_link') && $current_package == 1 && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Opisne statistike\'); return false;"' . $lan_print . ' class="srv_ico"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics&anketa=' . $this->anketa) . '" target="_blank"' . $lan_pdf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_rtf&anketa=' . $this->anketa) . '" target="_blank"' . $lan_rtf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_xls&anketa=' . $this->anketa) . '" target="_blank"' . $lan_xls . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_FREQUENCY) {
+ if($userAccess->checkUserAccess('publik_link') && $current_package != 3 && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_ANALYSIS . '\',\'' . M_ANALYSIS_FREQUENCY . '\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ if($userAccess->checkUserAccess('publik_link') && $current_package == 2 && $dostop_styling != ""){
+ echo '</div>';
+ }
echo '<a href="#" onclick="doArchiveAnaliza();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('publik_link') && $current_package == 1 && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Frekvence\'); return false;"' . $lan_print . ' class="srv_ico"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency&anketa=' . $this->anketa) . '" target="_blank"' . $lan_pdf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_rtf&anketa=' . $this->anketa) . '" target="_blank"' . $lan_rtf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_xls&anketa=' . $this->anketa) . '" target="_blank"' . $lan_xls . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_SUMMARY) {
- echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_ANALYSIS . '\',\'' . M_ANALYSIS_SUMMARY . '\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ if($userAccess->checkUserAccess('publik_link') && $current_package != 3 && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
+ echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_ANALYSIS . '\',\'' . M_ANALYSIS_SUMMARY . '\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span><div class="hover_export_text">' . $lang['srv_export_hover_public'] . '</div></a>';
+ if($userAccess->checkUserAccess('publik_link') && $current_package == 2 && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($current_package == 2 && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
+
echo '<a href="#" onclick="doArchiveAnaliza();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
+
echo '<a href="#" onclick="createArchiveBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('publik_link') && $current_package == 1 && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $current_package == 1 && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Sumarnik\'); return false;"' . $lan_print . ' class="srv_ico"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $current_package == 1 && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $current_package == 1 && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums&anketa=' . $this->anketa) . '" target="_blank"' . $lan_pdf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_rtf&anketa=' . $this->anketa) . '" target="_blank"' . $lan_rtf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_xls&anketa=' . $this->anketa) . '" target="_blank"' . $lan_xls . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $current_package == 1 && $dostop_styling != ""){
+ echo '</div>';
+ }
+ if($current_package == 2 && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_CROSSTAB) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="doArchiveCrosstab();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveCrosstabBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Crosstab\'); return false;"' . $lan_print . ' class="srv_ico hidden"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" id="crosstabDoPdf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_crosstabs') ? 'user_access_locked' : '').' hidden" user-access="analysis_crosstabs"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="#" id="crosstabDoRtf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_crosstabs') ? 'user_access_locked' : '').' hidden" user-access="analysis_crosstabs"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="#" id="crosstabDoXls" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_crosstabs') ? 'user_access_locked' : '').' hidden" user-access="analysis_crosstabs"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_MULTICROSSTABS) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'MultiCrosstab\'); return false;"' . $lan_print . ' class="srv_ico hidden"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" id="multicrosstabDoPdf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_multicrosstabs') ? 'user_access_locked' : '').' hidden" user-access="analysis_multicrosstabs"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="#" id="multicrosstabDoRtf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_multicrosstabs') ? 'user_access_locked' : '').' hidden" user-access="analysis_multicrosstabs"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="#" id="multicrosstabDoXls" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_multicrosstabs') ? 'user_access_locked' : '').' hidden" user-access="analysis_multicrosstabs"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_CHARTS) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_ANALYSIS . '\',\'' . M_ANALYSIS_CHARTS . '\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
echo '<a href="#" onclick="doArchiveChart();" title="' . $lang['srv_analiza_arhiviraj_ttl'] . '" class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveChartBeforeEmail();" title="' . $lang['srv_analiza_arhiviraj_email_ttl'] . '" class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Grafi\'); return false;"' . $lan_print . ' class="srv_ico"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=charts&anketa=' . $this->anketa) . '" target="_blank"' . $lan_pdf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_charts') ? 'user_access_locked' : '').'" user-access="analysis_charts"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=charts_rtf&anketa=' . $this->anketa) . '" target="_blank"' . $lan_rtf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_charts') ? 'user_access_locked' : '').'" user-access="analysis_charts"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
- echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=charts_ppt&anketa=' . $this->anketa) . '" target="_blank"' . $lan_ppt . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_charts') ? 'user_access_locked' : '').'" user-access="analysis_charts"><span class="hover_export_icon"><span class="sprites ppt_large"></span></span>' . $lang['srv_export_hover_ppt'] . '</a>';
+ echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=charts_ppt&anketa=' . $this->anketa) . '" target="_blank"' . $lan_ppt . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_charts') ? 'user_access_locked' : '').'" user-access="analysis_charts"><span class="hover_export_icon"><span class="faicon ppt black"></span></span>' . $lang['srv_export_hover_ppt'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_MEANS) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="doArchiveMeans();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveMeansBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Means\'); return false;"' . $lan_print . ' class="srv_ico hidden"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" id="meansDoPdf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_means') ? 'user_access_locked' : '').' hidden" user-access="analysis_means"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="#" id="meansDoRtf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_means') ? 'user_access_locked' : '').' hidden" user-access="analysis_means"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="#" id="meansDoXls" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_means') ? 'user_access_locked' : '').' hidden" user-access="analysis_means"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_TTEST) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="doArchiveTTest();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveTTestBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'TTest\'); return false;"' . $lan_print . ' class="srv_ico hidden"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" id="ttestDoPdf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_ttest') ? 'user_access_locked' : '').' hidden" user-access="analysis_ttest"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="#" id="ttestDoRtf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_ttest') ? 'user_access_locked' : '').' hidden" user-access="analysis_ttest"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="#" id="ttestDoXls" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_ttest') ? 'user_access_locked' : '').' hidden" user-access="analysis_ttest"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_BREAK) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="doArchiveBreak();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveBreakBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').' hidden" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'Break\'); return false;"' . $lan_print . ' class="srv_ico hidden"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
- echo '<a href="#" id="breakDoPdf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_break') ? 'user_access_locked' : '').' hidden" user-access="analysis_break"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
- echo '<a href="#" id="breakDoRtf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_break') ? 'user_access_locked' : '').' hidden" user-access="analysis_break"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
+ //echo '<a href="#" id="breakDoPdf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_break') ? 'user_access_locked' : '').' hidden" user-access="analysis_break"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
+ //echo '<a href="#" id="breakDoRtf" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_break') ? 'user_access_locked' : '').' hidden" user-access="analysis_break"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
echo '<a href="#" id="breakDoXls" target="_blank" class="srv_ico '.(!$userAccess->checkUserAccess('analysis_break') ? 'user_access_locked' : '').' hidden" user-access="analysis_break"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['m'] == M_ANALYSIS_CREPORT) {
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_ANALYSIS . '\',\'' . M_ANALYSIS_CREPORT . '\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
echo '<a href="#" onclick="doArchiveCReport();"' . $lan_archive . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv black very_large"></span></span>' . $lang['srv_export_hover_archive'] . '</a>';
echo '<a href="#" onclick="createArchiveCReportBeforeEmail();"' . $lan_archive_send . ' class="srv_ico '.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="hover_export_icon"><span class="faicon arhiv_mail black very_large"></span></span>' . $lang['srv_export_hover_archive_mail'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle_no_lock">';
+ }
echo '<a href="#" onClick="printAnaliza(\'CReport\'); return false;"' . $lan_print . ' class="srv_ico"><span class="hover_export_icon"><span class="faicon print"></span></span>' . $lang['srv_export_hover_print'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
+
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '<div id="hover_export_rectangle">';
+ }
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=creport_pdf&anketa=' . $this->anketa) . '" target="_blank"' . $lan_pdf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?b=export&m=creport_rtf&anketa=' . $this->anketa) . '" target="_blank"' . $lan_rtf . ' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
+ if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
+ echo '</div>';
+ }
}
else if ($_GET['a'] == A_COLLECT_DATA) {
- echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_COLLECT_DATA . '\',\'\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=spss" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_spss'] . '"><span class="hover_export_icon"><span class="basic-icon spss very_large"></span></span>' . $lang['srv_export_hover_spss'] . '</a>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=excel_xls" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_excel'] . '"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=txt" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_txt'] . '"><span class="hover_export_icon"><span class="faicon text_file"></span></span>' . $lang['srv_export_hover_txt'] . '</a>';
+ if($dostop_styling != ""){
+
+ if($current_package == 2){
+ echo '<div id="hover_export_rectangle">';
+ echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_COLLECT_DATA . '\',\'\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ echo '</div>';
+
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=spss" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : 'no_lock').'" user-access="data_export" title="' . $lang['srv_export_spss'] . '"><span class="hover_export_icon"><span class="basic-icon spss very_large"></span></span>' . $lang['srv_export_hover_spss'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=excel_xls" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : 'no_lock').'" user-access="data_export" title="' . $lang['srv_export_excel'] . '"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=txt" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : 'no_lock').'" user-access="data_export" title="' . $lang['srv_export_txt'] . '"><span class="hover_export_icon"><span class="faicon text_file"></span></span>' . $lang['srv_export_hover_txt'] . '</a>';
+
+ }elseif($current_package == 3){
+ echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_COLLECT_DATA . '\',\'\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=spss" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_spss'] . '"><span class="hover_export_icon"><span class="basic-icon spss very_large"></span></span>' . $lang['srv_export_hover_spss'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=excel_xls" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_excel'] . '"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=txt" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_txt'] . '"><span class="hover_export_icon"><span class="faicon text_file"></span></span>' . $lang['srv_export_hover_txt'] . '</a>';
+ }else{
+ echo '<div id="hover_export_rectangle">';
+ echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_COLLECT_DATA . '\',\'\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=spss" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_spss'] . '"><span class="hover_export_icon"><span class="basic-icon spss very_large"></span></span>' . $lang['srv_export_hover_spss'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=excel_xls" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_excel'] . '"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=txt" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_txt'] . '"><span class="hover_export_icon"><span class="faicon text_file"></span></span>' . $lang['srv_export_hover_txt'] . '</a>';
+ echo '</div>';
+ }
+ }else{
+ echo '<a href="#" onclick="showSurveyUrlLinks(\'' . A_COLLECT_DATA . '\',\'\');" class="srv_ico '.(!$userAccess->checkUserAccess('public_link') ? 'user_access_locked' : '').'" user-access="public_link" title="' . $lang['srv_export_hover_public2'] . '"><span class="hover_export_icon"><span class="faicon data_link very_large"></span></span>' . $lang['srv_export_hover_public'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=spss" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_spss'] . '"><span class="hover_export_icon"><span class="basic-icon spss very_large"></span></span>' . $lang['srv_export_hover_spss'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=excel_xls" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_excel'] . '"><span class="hover_export_icon"><span class="faicon xls black very_large"></span></span>' . $lang['srv_export_hover_xls'] . '</a>';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=export&m=txt" class="srv_ico '.(!$userAccess->checkUserAccess('data_export') ? 'user_access_locked' : '').'" user-access="data_export" title="' . $lang['srv_export_txt'] . '"><span class="hover_export_icon"><span class="faicon text_file"></span></span>' . $lang['srv_export_hover_txt'] . '</a>';
+ }
// poseben excel izvoz za mfdps
if(SurveyInfo::getInstance()->checkSurveyModule('mfdps')){
@@ -4125,6 +4720,11 @@ class SurveyAdmin else {
if ($this->first_action == NAVI_UREJANJE || $_GET['a'] == '' || $_GET['a'] == 'reporti') {
if ($_GET['a'] == '' || $_GET['a'] == 'branching') {
+
+ if($userAccess->checkUserAccess('export')){
+ echo '<div id="hover_export_rectangle">';
+ }
+
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_pdf&anketa=' . $this->anketa . '&type=1') . '" target="_blank" title="' . $lang['PDF_Izpis'] . '" class="srv_ico '.(!$userAccess->checkUserAccess('export') ? 'user_access_locked' : '').'"><span class="hover_export_icon"><span class="faicon pdf black very_large"></span></span>' . $lang['srv_export_hover_pdf'] . '</a>';
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_rtf&anketa=' . $this->anketa . '&type=1') . '" target="_blank" title="' . $lang['RTF_Izpis'] . '" class="srv_ico '.(!$userAccess->checkUserAccess('export') ? 'user_access_locked' : '').'"><span class="hover_export_icon"><span class="faicon rtf black very_large"></span></span>' . $lang['srv_export_hover_rtf'] . '</a>';
@@ -4132,9 +4732,9 @@ class SurveyAdmin if($admin_type == 0){
echo '<a href="' . makeEncodedIzvozUrlString('izvoz.php?a=vprasalnik_xml&anketa=' . $this->anketa . '&type=1') . '" target="_blank" title="' . $lang['XML_Izpis'] . '" class="srv_ico '.(!$userAccess->checkUserAccess('export') ? 'user_access_locked' : '').'"><span class="hover_export_icon"><span class="faicon xml black very_large"></span></span>' . $lang['srv_export_hover_xml'] . '</a>';
}
-
- if ($row['multilang'] == 1 && $full_view) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=prevajanje" title="' . $lang['srv_prevajanje'] . '" class="srv_ico '.(!$userAccess->checkUserAccess('export') ? 'user_access_locked' : '').'"><span class="hover_export_icon"><span class="sprites book"></span></span></a>';
+
+ if($userAccess->checkUserAccess('export')){
+ echo '</div>';
}
}
@@ -4162,91 +4762,11 @@ class SurveyAdmin // Javascript s katerim povozimo urlje za izvoze, ki niso na voljo v paketu
- global $app_settings;
- if($app_settings['commercial_packages'] == true){
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
echo '<script> userAccessExport(); </script>';
}
}
- function survey_icon_add_comment(){
- global $lang, $site_url, $admin_type, $global_user_id;
-
- SurveyInfo::getInstance()->SurveyInit($this->anketa);
- $row = SurveyInfo::getInstance()->getSurveyRow();
-
- SurveySetting::getInstance()->Init($this->anketa);
-
- $survey_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment_viewadminonly');
- $survey_comment_viewauthor = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment_viewauthor');
- $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder');
- $view = 1;
-
- $sas = new SurveyAdminSettings();
- $survey_comment = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment');
-
- $userAccess = UserAccess::getInstance($global_user_id);
-
- if (($admin_type <= $survey_comment && $survey_comment != '') or $sas->testiranje_komentarji_komentarji_na_anketo(false) > 0) {
- $show_survey_comment = $_GET['show_survey_comment'];
-
- $comment_count = $sas->testiranje_komentarji_count();
- $comment_count_text = ($comment_count['survey_admin']['unresolved'] + $comment_count['survey_resp']['unresolved']);
-
- if (($row['forum'] == 0 || $row['thread'] == 0) && $comment_count_text == '0') {
-
- if($userAccess->checkUserAccess('komentarji')){
- echo '<a href="#" onclick="return false;" class="surveycomment srv_ico" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
- echo ' <div class="fa-stack"><span class="faicon comments fa-stack-1x icon-blue" title="' . $lang['srv_survey_general_comment'] . '"></div></span>';
- echo '</a>';
- }
- else{
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='. $row['id'].'&a=urejanje" class="surveycomment srv_ico" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
- echo ' <div class="fa-stack"><span class="faicon comments fa-stack-1x icon-blue user_access_locked" title="' . $lang['srv_survey_general_comment'] . '"></div></span>';
- echo '</a>';
- }
- }
- else {
-
- $sqlf = sisplet_query("SELECT COUNT(*) AS count FROM post WHERE tid='$row[thread]'");
- $rowf = mysqli_fetch_array($sqlf);
- $rowf['count']--; //zaradi 1. avtomatskega posta
-
- // Shranimo naslov za js qtip box
- $comment_qip_title = $lang['srv_comments_anketa_ured'] .
- ' (' . $comment_count['survey_admin']['unresolved'] . '/' . $comment_count['survey_admin']['all'] . ')'
- . '<div class=\'comment_qtip_title_secondLine\'>' . $lang['srv_comments_anketa_resp']
- . ' (' . $comment_count['survey_resp']['unresolved'] . '/' . $comment_count['survey_resp']['all'] . ')</div>';
- echo '<input type="hidden" id="comment_qtip_title" value="' . $comment_qip_title . '" />';
-
-
- if($userAccess->checkUserAccess('komentarji')){
- echo '<a href="#" onclick="return false;" class="surveycomment srv_ico" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
-
- echo '<div class="fa-stack"><span class="faicon comments_num icon-blue fa-stack-1x" title="' . $lang['srv_survey_general_comment'] . '"><strong class="fa-stack-1x">' . $comment_count_text . '</strong></span></div>';
-
- // ali prikazemo okno odprto - je dodan tak admin komentar
- $sqlf1 = sisplet_query("SELECT id FROM post p WHERE p.tid='$row[thread]' AND p.ocena='5'");
- while ($rowf1 = mysqli_fetch_array($sqlf1)) {
- $s = sisplet_query("SELECT * FROM views WHERE pid='$rowf1[id]' AND uid='$global_user_id'");
-
- if (mysqli_num_rows($s) == 0)
- $show_survey_comment = 1;
- }
-
- echo '</a>';
- }
- else{
- echo '<a href="' . $site_url . 'admin/survey/index.php?anketa='. $row['id'].'&a=urejanje" class="surveycomment srv_ico" id="surveycomment_0_' . $view . '" type="0" view="' . $view . '" spremenljivka="0">';
- echo ' <div class="fa-stack"><span class="faicon comments_num icon-blue fa-stack-1x user_access_locked" title="' . $lang['srv_survey_general_comment'] . '"><strong class="fa-stack-1x">' . $comment_count_text . '</strong></span></div>';
- echo '</a>';
- }
- }
-
- if($userAccess->checkUserAccess('komentarji'))
- echo '<script> $(function() { load_comment(\'#surveycomment_0_' . $view . '\'' . ($show_survey_comment == '1' ? ', \'2\'' : '') . '); });</script>';
- }
- }
-
/**
* @desc uploada skin
@@ -4383,7 +4903,7 @@ class SurveyAdmin } else {
echo '
<script language="javascript">
- alert(\'' . $lang['srv_filealert'] . '\');
+ genericAlertPopup(\'srv_filealert\');
</script>
';
@@ -4429,11 +4949,9 @@ class SurveyAdmin * @return unknown_type
*
*/
- function anketa_delete_from_db($anketa)
- {
- global $site_path, $global_user_id;
+ public static function anketa_delete_from_db($anketa){
- if (!$anketa) return;
+ if (!$anketa || $anketa < 1) return;
// zbrisemo zakesiran query v seji
if (session_id() == '') {
@@ -4442,35 +4960,46 @@ class SurveyAdmin unset($_SESSION['query']);
unset($_SESSION['result']);
- // pošiljanje obvestil ob izbrisu ankete
- //SurveyAlert::getInstance()->Init($anketa, $global_user_id);
- //SurveyAlert::getInstance()->sendMailDelete();
$sql = sisplet_query("SELECT id FROM srv_grupa WHERE ank_id = '$anketa'");
while ($row = mysqli_fetch_array($sql)) {
+
$sql1 = sisplet_query("SELECT id FROM srv_spremenljivka WHERE gru_id='$row[id]'");
while ($row1 = mysqli_fetch_array($sql1)) {
$sql2 = sisplet_query("DELETE FROM srv_vrednost WHERE spr_id = '$row1[id]'");
}
+
$sql2 = sisplet_query("DELETE FROM srv_spremenljivka WHERE gru_id = '$row[id]'");
- # tabela srv_user_grupa
- $sql2 = sisplet_query("DELETE FROM srv_user_grupa WHERE gru_id = '$row[id]'");
+ # tabela srv_user_grupa_archive1
+ $sql2 = sisplet_query("DELETE FROM srv_user_grupa_archive1 WHERE gru_id = '$row[id]'");
+
+ # tabela srv_user_grupa_archive2
+ $sql2 = sisplet_query("DELETE FROM srv_user_grupa_archive2 WHERE gru_id = '$row[id]'");
+
+ # tabela srv_user_grupa_archive3
+ $sql2 = sisplet_query("DELETE FROM srv_user_grupa_archive3 WHERE gru_id = '$row[id]'");
+
# tabela srv_user_grupa_active
- $sql2 = sisplet_query("DELETE FROM srv_user_grupa" . $this->db_table . " WHERE gru_id = '$row[id]'");
+ $sql2 = sisplet_query("DELETE FROM srv_user_grupa_active WHERE gru_id = '$row[id]'");
}
+
$sql2 = sisplet_query("DELETE FROM srv_grupa WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_alert WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_dostop WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_user WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_anketa WHERE backup = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_anketa WHERE id = '$anketa'");
- $sql2 = sisplet_query("DELETE FROM srv_tracking".$this->db_table." WHERE id = '$anketa'");
+ $sql2 = sisplet_query("DELETE FROM srv_tracking_active WHERE ank_id = '$anketa'");
+ $sql2 = sisplet_query("DELETE FROM srv_tracking_archive1 WHERE ank_id = '$anketa'");
+ $sql2 = sisplet_query("DELETE FROM srv_tracking_archive2 WHERE ank_id = '$anketa'");
+ $sql2 = sisplet_query("DELETE FROM srv_tracking_archive3 WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_library_anketa WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_survey_misc WHERE sid = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_variable_profiles WHERE sid = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_glasovanje WHERE ank_id = '$anketa'");
$sql2 = sisplet_query("DELETE FROM srv_survey_misc WHERE sid = '$anketa'");
+
# Pobrisemo srv_condition_vre
$sql2 = sisplet_query("DELETE FROM srv_condition_vre WHERE cond_id IN (SELECT id FROM srv_condition WHERE if_id IN (SELECT element_if FROM srv_branching WHERE ank_id = '$anketa' AND element_if > 0))");
#Pobrisemo srv_condition_grid
@@ -4485,26 +5014,14 @@ class SurveyAdmin $sql2 = sisplet_query("DELETE FROM srv_branching WHERE ank_id = '$anketa'");
Common::RemoveNiceUrl($anketa);
-
-
- // kaj pa tabele:
- //srv_grid
- // srv_call_....
- // srv_data_.... // vsi podatki
- // srv_userbase_setting
- // srv_user_setting_for_survey
-
}
/**
* @desc popravimo cas in userja popravka
* ta funkcija je skopirana v common. tole pustimo, da ne bojo kaksne napake...
*/
- function updateEditStamp()
- {
-
+ function updateEditStamp() {
Common::updateEditStamp();
-
}
/**
@@ -4543,8 +5060,11 @@ class SurveyAdmin $akronim = $naslov;
}
- $starts = $_POST['starts'] ? "'" . $_POST['starts'] . "'" : "NOW()";
- $expire = $_POST['expire'] ? "'" . $_POST['expire'] . "'" : "NOW() + INTERVAL 3 MONTH ";
+ $naslov = strip_tags($naslov);
+ $akronim = strip_tags($akronim);
+
+ $starts = isset($_POST['starts']) ? "'" . $_POST['starts'] . "'" : "NOW()";
+ $expire = isset($_POST['expire']) ? "'" . $_POST['expire'] . "'" : "NOW() + INTERVAL 3 MONTH ";
// Nastavimo jezik - admin in response jezik je vedno enak nastavitvi, ki jo ima uporabnik a default
$lang_admin = ((int)$lang_admin > 0) ? $lang_admin : 1;
@@ -4572,11 +5092,15 @@ class SurveyAdmin $mobile_skin = 'Mobile'.$skin;
}
- $sql = sisplet_query("INSERT INTO srv_anketa (id, naslov, akronim, db_table, starts, expire, dostop, insert_uid, insert_time, edit_uid, edit_time, cookie, text, url, intro_opomba, show_intro, show_concl, survey_type, lang_admin, lang_resp, active, skin, mobile_skin) " .
- "VALUES ('', '$naslov', '$akronim', '1', $starts, $expire, '0', '$global_user_id', NOW(), '$global_user_id', NOW(), '$SurveyCookie', '$text', '$url', '$intro_opomba', '$showIntro', '$showConcl', '$survey_type', '$lang_admin', '$lang_resp', '$autoActiveSurvey', '$skin', '$mobile_skin')");
+ // Nastavimo se hash
+ $hash = Common::generateSurveyHash();
+
+ $sql = sisplet_query("INSERT INTO srv_anketa (id, hash, naslov, akronim, db_table, starts, expire, dostop, insert_uid, insert_time, edit_uid, edit_time, cookie, text, url, intro_opomba, show_intro, show_concl, survey_type, lang_admin, lang_resp, active, skin, mobile_skin) " .
+ "VALUES ('', '".$hash."', '$naslov', '$akronim', '1', $starts, $expire, '0', '$global_user_id', NOW(), '$global_user_id', NOW(), '$SurveyCookie', '$text', '$url', '$intro_opomba', '$showIntro', '$showConcl', '$survey_type', '$lang_admin', '$lang_resp', '$autoActiveSurvey', '$skin', '$mobile_skin')");
if (!$sql) {
$error = mysqli_error($GLOBALS['connect_db']);
}
+
$anketa = mysqli_insert_id($GLOBALS['connect_db']);
@@ -4585,21 +5109,18 @@ class SurveyAdmin // Updatamo srv_activity, ce je anketa aktivna - drugace se ne zabelezi ok ko se deaktivira
if ($autoActiveSurvey == 1) {
- $activity_insert_string = "INSERT INTO srv_activity (sid, starts, expire, uid) VALUES('" . $anketa . "', $starts, $expire, '" . $global_user_id . "' );";
- $sql_insert = sisplet_query($activity_insert_string);
+ $sql_insert = sisplet_query("INSERT INTO srv_activity (sid, starts, expire) VALUES ('".$anketa."', $starts, $expire)");
}
// vnesemo tudi 1. grupo aka page
- $sql = sisplet_query("INSERT INTO srv_grupa (id, ank_id, naslov, vrstni_red) VALUES ('', '$anketa', '$lang[srv_stran] 1', '1')");
+ $sql = sisplet_query("INSERT INTO srv_grupa (ank_id, naslov, vrstni_red) VALUES ('$anketa', '$lang[srv_stran] 1', '1')");
+
+ $grupa = mysqli_insert_id($GLOBALS['connect_db']);
//ce se nimamo vprasanja v glasovanju ga ustvarimo
if ($survey_type == 0) {
- $sqlGrupe = sisplet_query("SELECT id, naslov FROM srv_grupa g WHERE g.ank_id='$anketa' ORDER BY g.vrstni_red");
- $rowGrupe = mysqli_fetch_assoc($sqlGrupe);
- $grupa = $rowGrupe['id'];
-
- $b = new Branching($this->anketa);
+ $b = new Branching($anketa);
$spr_id = $b->nova_spremenljivka($grupa, 1, 1);
//napolnimo bazo srv_glasovanje
@@ -4617,10 +5138,11 @@ class SurveyAdmin $sql1 = sisplet_query("INSERT INTO srv_vrednost (spr_id, variable, vrstni_red) VALUES $values");
//popravljanje default nastavitev - stat=0, show_intro=0
- $sqlSpr = sisplet_query("UPDATE srv_spremenljivka SET stat = '0' WHERE id = '$spr_id'");
- $sqlAnk = sisplet_query("UPDATE srv_anketa SET show_intro = '0', show_concl = '0', progressbar = '0', countType = '0', akronim = ' ' WHERE id = '$anketa'");
- // vsilimo refresh podatkov
- SurveyInfo:: getInstance()->resetSurveyData();
+ $sqlSpr = sisplet_query("UPDATE srv_spremenljivka SET stat = '0', skala='0' WHERE id = '$spr_id'");
+ $sqlAnk = sisplet_query("UPDATE srv_anketa SET show_intro = '0', show_concl = '0', progressbar = '0', countType = '0' WHERE id = '$anketa'");
+
+ // vsilimo refresh podatkov
+ SurveyInfo::getInstance()->resetSurveyData();
}
//popravljanje default nastavitev pri formi - show_intro=0, show_concl=0, trajanje->neomejeno
@@ -4664,12 +5186,6 @@ class SurveyAdmin // Nastavimo obvescanje pri poteku ankete (default ob kreiranju ankete)
SurveyAlert::setDefaultAlertBeforeExpire();
-
- // uporabniku dodamo anketo se v knjiznico "moje ankete"
- // torej uporabniku ne bomo avtomatsko dodali ankete v knjiznico "moje ankete"
- //$sqlk = sisplet_query("SELECT * FROM srv_library_folder WHERE uid='$uid' AND tip='1' AND parent='0'");
- //$rowk = mysqli_fetch_array($sqlk);
- //sisplet_query("INSERT INTO srv_library_anketa (ank_id, uid, folder) VALUES ('$anketa', '$uid', '$rowk[id]')");
return $anketa;
}
@@ -4718,6 +5234,10 @@ class SurveyAdmin $rowg = Cache::srv_spremenljivka($spremenljivka);
+ // Preden vprasanje zbrisemo po novem ustvarimo kopijo vprasanja med zbrisanimi (knjiznica zbrisanih vprasanj)
+ $vd = new VprasanjeDeleted($this->anketa);
+ $vd->createDeletedVprasanje($spremenljivka);
+
// pri brisanju multiple grid vprasanja, moramo pobrisate tudi vse child spremenljivke (ker kljuci niso nastavljeni)
if ($rowg['tip'] == 24) {
$sqld = sisplet_query("SELECT spr_id FROM srv_grid_multiple WHERE parent='$spremenljivka'");
@@ -4756,7 +5276,8 @@ class SurveyAdmin $b = new Branching($this->anketa);
- $b->repare_branching($row['parent']);
+ if(isset($row['parent']))
+ $b->repare_branching($row['parent']);
$b->repare_vrstni_red();
@@ -5053,957 +5574,6 @@ class SurveyAdmin return $offset + $rowCountPast['cnt'];
}
- /**
- * @desc Če je anketa aktivna, preverimo da ni slučajno potekel čas aktivnosti,
- * če je, jo deaktiviramo
- */
- function checkSurveyActive($anketa = null)
- {
- // pretecena anketa, kontroliramo datum na: starts in expire
- sisplet_query("UPDATE srv_anketa SET active = '0' WHERE id='" . ($anketa ? $anketa : $this->anketa) . "' AND active = '1' AND expire < CURDATE()");
-
- SurveyInfo:: getInstance()->SurveyInit($this->anketa);
- // vsilimo refresh podatkov
- SurveyInfo:: getInstance()->resetSurveyData();
-
- $sqls = sisplet_query("SELECT active FROM srv_anketa WHERE id='" . ($anketa ? $anketa : $this->anketa) . "'");
- $rows = mysqli_fetch_assoc($sqls);
- return $rows['active'];
- }
-
- /**
- * preview
- *
- */
- 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);
-
- // tip 9999 - IF
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9999" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_toolbox_if'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='if')){
- $userAccess->displayNoAccessText($what='if');
- }
- echo '</div>';
-
- // tip 9998 - Block
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9998" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_toolbox_block'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='block')){
- $userAccess->displayNoAccessText($what='block');
- }
- echo '</div>';
-
- // tip 9997 - Loop
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9997" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_toolbox_loop'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='loop')){
- $userAccess->displayNoAccessText($what='loop');
- }
- echo '</div>';
-
-
- // tip 1_1 - radio
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: radio.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
- echo '<div class="tip_sample_option"><input type="radio" checked />' . $lang['srv_tip_sample_t1_o1'] . '</div>';
- echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_tip_sample_t1_o2'] . '</div>';
- echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_tip_sample_t1_o3'] . '</div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1_10 - gdpr
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_10" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: radio.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_gdpr_intro_title'] . '</div><br />';
- echo '<div class="tip_sample_text">' . $lang['srv_gdpr_intro'] . '.<br />'.$lang['srv_gdpr_intro4'].'</div>';
- echo '<div class="tip_sample_option"><input type="radio" checked />' . $lang['srv_gdpr_intro_no'] . '</div>';
- echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_gdpr_intro_yes'] . '</div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1 - radio (horizontalno)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_1" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: radio.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . ' <span style="font-weight: normal;"><input type="radio" checked />' . $lang['srv_tip_sample_t1_o1'] . ' <input type="radio" />' . $lang['srv_tip_sample_t1_o2'] . '</span></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1_2 - radio (horizontalno - nova vrstica)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: radio.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
- echo '<div class="tip_sample_option"><input type="radio" />' . $lang['srv_tip_sample_t1_o1'] . ' <input type="radio" checked />' . $lang['srv_tip_sample_t1_o2'] . ' <input type="radio" />' . $lang['srv_tip_sample_t1_o3'] . '</div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1_5 - radio potrditev
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_5" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: radio.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1_5'] . '</div>';
- echo '<div class="tip_sample_option gray"><input type="button" disabled value="' . $lang['srv_potrdi'] . '"></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1_6 - select box
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_6" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: radio.</div>';
- //echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t3'] . '</div>';
- echo '<div class="tip_sample_option"><select size="3"><option>' . $lang['srv_tip_sample_t3_oc'] . '</option><option>' . $lang['srv_tip_sample_t3_oc'] . '</option><option>' . $lang['srv_tip_sample_t3_oc'] . '</option></select></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1_8 - Drag-drop
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_8" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- //echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
-
- echo '<div style="float: left; width: 150px; height: 110px; border-right: 1px black solid;">';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o1'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o2'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o3'] . '</div></div>';
- echo '</div>';
-
- echo '<div style="float: left; width: 150px; height: 110px; margin-left: 30px;">';
- echo '<div class="tip_sample_option"><div class="dragdrop_preview_frame"></div></div>';
- echo '</div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 1_9 - custom radio picture
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_9" class="tip_preview_sub">';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
- // star
- echo '<div style="clear: both;padding-bottom:10px;">';
- for ($i = 1; $i < 4; $i++) {
- echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio star"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
- }
- echo '</div>';
-
- // thumb
- echo '<div style="clear: both;padding-bottom:10px;">';
- for ($i = 1; $i < 4; $i++) {
- echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio thumb"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
- }
- echo '</div>';
-
- //smiley
- echo '<div style="clear: both;padding-bottom:10px;">';
- for ($i = 1; $i < 4; $i++) {
- echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio smiley"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
- }
- echo '</div>';
-
- // heart
- echo '<div style="clear: both;padding-bottom:10px;">';
- for ($i = 1; $i < 4; $i++) {
- echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio heart"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
- }
- echo '</div>';
-
- // flag
- echo '<div style="clear: both;padding-bottom:10px;">';
- for ($i = 1; $i < 4; $i++) {
- echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio flag"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
- }
- echo '</div>';
-
- // user
- echo '<div style="clear: both;">';
- for ($i = 1; $i < 4; $i++) {
- echo '<div class="variabla custom_radio"><label><input type="radio"><span class="enka-custom-radio user"></span><div class="custom_radio_answer">(' . $i . ')</div></label> </div>';
- }
- echo '</div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 1_10 - Image HotSpot
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_10" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- //echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_hotspot_preview_text_radio'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/hotspot.png" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 1_11 - Vizualna anlaogna skala
- echo '<div name="tip_preview_sub" id="tip_preview_sub_1_11" class="tip_preview_sub">';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
-
- echo '<div style="clear: both;padding-bottom:10px;">';
- for ($i = 1; $i < 7; $i++) {
- echo '<div class="variabla custom_radio visual-radio-scale" style="padding: 0 5px;">
- <label>
- <input type="radio">
- <span class="enka-vizualna-skala siv-7'.$i.'"></span>
- <div class="custom_radio_answer">('.$i.')</div>
- </label>
- </div>';
- }
- echo '</div>';
-
- echo '</div>';
- echo '</div>';
-
-
- // tip 2 - checkbox
- echo '<div name="tip_preview_sub" id="tip_preview_sub_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: checkbox.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t2'] . '</div>';
- echo '<div class="tip_sample_option"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o1'] . '</div>';
- echo '<div class="tip_sample_option"><input type="checkbox" />' . $lang['srv_tip_sample_t2_o2'] . '</div>';
- echo '<div class="tip_sample_option"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o3'] . '</div>';
- echo '</div>';
- echo '</div>';
-
- // tip 2_1 - check(horizontalno)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_2_1" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t2'] . ' <span style="font-weight: normal;"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o2'] . ' <input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o3'] . '</span></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 2_2 - check (horizontalno - nova vrstica)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_2_2" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t2'] . '</div>';
- echo '<div class="tip_sample_option"><input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o1'] . ' <input type="checkbox" />' . $lang['srv_tip_sample_t2_o2'] . ' <input type="checkbox" checked="checked"/>' . $lang['srv_tip_sample_t2_o3'] . '</div>';
- echo '</div>';
- echo '</div>';
-
- // tip 2_8 - Drag-drop
- echo '<div name="tip_preview_sub" id="tip_preview_sub_2_8" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t1'] . '</div>';
-
- echo '<div style="float: left; width: 150px; height: 110px; border-right: 1px black solid;">';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o1'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o2'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t1_o3'] . '</div></div>';
- echo '</div>';
-
- echo '<div style="float: left; width: 150px; height: 110px; margin-left: 30px;">';
- echo '<div class="tip_sample_option"><div class="dragdrop_preview_frame"></div></div>';
- echo '</div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 2_10 - Image HotSpot
- echo '<div name="tip_preview_sub" id="tip_preview_sub_2_10" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- //echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_hotspot_preview_text_checkbox'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/hotspot.png" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 3 - select
- echo '<div name="tip_preview_sub" id="tip_preview_sub_3" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: select.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t3'] . '</div>';
- echo '<div class="tip_sample_option"><select><option>' . $lang['srv_tip_sample_t3_oc'] . '</option></select></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 21 - besedilo*
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21'] . '</div>';
- echo '<div class="tip_sample_option"><textarea style="width:150px; height:12px">abc</textarea></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 21_1 - cpatcha
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_1" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_1_o1'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/captcha.jpg" /></div>';
- echo '<div class="tip_sample_option"><input type="text" value="VZHVP" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 21_2 - email
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_2_o1'] . '</div>';
- echo '<div class="tip_sample_option">(' . $lang['srv_email_example'] . ')</div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<p style="font-size:smaller; color:gray;">' . $lang['srv_email_example_txt'] . '</p>';
- echo '</div>';
- echo '</div>';
-
- // tip 21_3 - url
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_3" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_3_o1'] . '</div>';
- echo '<div class="tip_sample_option">(' . $lang['srv_url_example'] . ')</div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 21_4 - upload
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_4" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_4_o1'] . '</div>';
- echo '<div class="tip_sample_option"><input type="file" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 21_5 - textbox box
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_5" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21'] . '</div>';
- echo '<div class="tip_sample_option"><textarea style="width:250px; height:36px">abc</textarea></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 21_6 - elektronski podpis
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_6" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_6'] . '</div>';
- echo '<div class="tip_sample_option"><div style="width:250px; height:50px; border: 1px grey solid; background-color: white;"></div></div>';
- echo '<div class="clr"></div>';
- echo '<input type="button" value="'.$lang['srv_signature_clear'].'" style="margin: 5px;" />';
- echo '<br />'.$lang['srv_signature_name'].' <input type="text" />';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_signature')){
- $userAccess->displayNoAccessText($what='question_type_signature');
- }
- echo '</div>';
-
- // tip 21_7 - fotografija
- echo '<div name="tip_preview_sub" id="tip_preview_sub_21_7" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t21_7'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/webcam_record.png" height="64"/></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 5 - label
- echo '<div name="tip_preview_sub" id="tip_preview_sub_5" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t5'] . '</div>';
- echo '</div>';
- echo '</div>';
-
- // tip 5_2 - nagovor za aktivacijo chata
- echo '<div name="tip_preview_sub" id="tip_preview_sub_5_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: text.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_chat_question_text'] . '</div>';
- echo '<div class="tip_sample_option"><div class="tawk-chat-activation button" style="padding:6px 0px;">'.$lang['srv_chat_turn_on'].'</div></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 26 - lokacija
- echo '<div name="tip_preview_sub" id="tip_preview_sub_26" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t26_1'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/mojalokacija.png" /></div>';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_location')){
- $userAccess->displayNoAccessText($what='question_type_location');
- }
- echo '</div>';
-
- // tip 26_2 - multi lokacija
- echo '<div name="tip_preview_sub" id="tip_preview_sub_26_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t26_2'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/lokacija.png" /></div>';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_location')){
- $userAccess->displayNoAccessText($what='question_type_location');
- }
- echo '</div>';
-
- // tip 26_1 - moja lokacija
- echo '<div name="tip_preview_sub" id="tip_preview_sub_26_1" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t26_1'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/mojalokacija.png" /></div>';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_location')){
- $userAccess->displayNoAccessText($what='question_type_location');
- }
- echo '</div>';
-
- // tip 6 - multigrid
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
- echo '<div class="tip_sample_option"><div> </div><span>' . $lang['srv_tip_sample_t6_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_o2'] . '</span> <span>' . $lang['srv_tip_sample_t6_o3'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v1'] . '</div><span><input type="radio" name="a" /></span><span><input type="radio" checked name="a" /></span><span><input type="radio" name="a" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v2'] . '</div><span><input type="radio" name="b" /></span><span><input type="radio" /></span><span><input type="radio" name="b" checked /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v3'] . '</div><span><input type="radio" name="c" /></span><span><input type="radio" /></span><span><input type="radio" name="c" checked /></span></div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_1 - multigrid (semanticni diferencial)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_1" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t61'] . ':</div>';
- echo '<div class="tip_sample_option2"><div> </div><span>1</span><span>2</span><span>3</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t61_v1x'] . '</div><span><input type="radio" name="d" /></span><span><input type="radio" name="d" /></span><span><input type="radio"name="d" /></span>' . $lang['srv_tip_sample_t61_v1y'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t61_v2x'] . '</div><span><input type="radio" name="e" /></span><span><input type="radio" name="e" /></span><span><input type="radio" name="e" /></span>' . $lang['srv_tip_sample_t61_v2y'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t61_v3x'] . '</div><span><input type="radio" name="f" /></span><span><input type="radio" name="f" checked /></span><span><input type="radio" /></span>' . $lang['srv_tip_sample_t61_v3y'] . '</div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_2 - multigrid (dropdown)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v1'] . '</div><span><select><option>' . $lang['srv_tip_sample_t6_o1'] . '</option></select></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v2'] . '</div><span><select><option>' . $lang['srv_tip_sample_t6_o1'] . '</option></select></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v3'] . '</div><span><select><option>' . $lang['srv_tip_sample_t6_o1'] . '</option></select></span></div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_3 - multigrid (double grid)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_3" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
- echo '<div class="tip_sample_option2"><div> </div><span></span><span>' . $lang['srv_tip_sample_t6_v1'] . '</span><span style="border-right: 1px black solid;"></span><span></span><span>' . $lang['srv_tip_sample_t6_v3'] . '</span><span></span></div>';
- echo '<div style="clear:left"></div>';
-
- echo '<div class="tip_sample_option2"><div> </div><span>' . $lang['srv_tip_sample_t6_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_o2'] . '</span><span style="border-right: 1px black solid;">' . $lang['srv_tip_sample_t6_o3'] . '</span><span> ' . $lang['srv_tip_sample_t6_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_o2'] . '</span><span>' . $lang['srv_tip_sample_t6_o3'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div>www.xxx.si</div><span><input type="radio" /></span><span><input type="radio" /></span><span style="border-right: 1px black solid;"><input type="radio" name="g" checked /></span><span><input type="radio" name="l" checked /></span><span><input type="radio" /></span><span><input type="radio" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div>www.yyy.si</div><span><input type="radio" /></span><span><input type="radio" name="j" checked /></span><span style="border-right: 1px black solid;"><input type="radio" /></span><span><input type="radio" /></span><span><input type="radio" name="h" checked /></span><span><input type="radio" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div>www.zzz.si</div><span><input type="radio" /></span><span><input type="radio" name="i" checked /></span><span style="border-right: 1px black solid;"><input type="radio" /></span><span><input type="radio" /></span><span><input type="radio" /></span><span><input type="radio" name="k" checked /></span></div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
-
- // tip 6_4 - multigrid (one against another)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_4" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: one against another.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6_4'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t6_4_v1'] . '</div><span><input type="radio" name="l" checked/></span><span>' . $lang['srv_tip_sample_t6_4_vmes'] . '</span><span><input type="radio"name="l" /></span>' . $lang['srv_tip_sample_t6_4_v2'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t6_4_v1'] . '</div><span><input type="radio" name="m" /></span><span>' . $lang['srv_tip_sample_t6_4_vmes'] . '</span><span><input type="radio" name="m" checked/></span>' . $lang['srv_tip_sample_t6_4_v3'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div style="text-align: right;">' . $lang['srv_tip_sample_t6_4_v3'] . '</div><span><input type="radio" name="n" checked/></span><span>' . $lang['srv_tip_sample_t6_4_vmes'] . '</span><span><input type="radio" name="n" /></span>' . $lang['srv_tip_sample_t6_4_v2'] . '</div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_5 - multigrid (max diff)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_5" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: max diff.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6_5'] . '</div>';
- echo '<div class="tip_sample_option2"><div> </div><span>' . $lang['srv_tip_sample_t6_5_c1'] . '</span><div> </div><span>' . $lang['srv_tip_sample_t6_5_c2'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div> </div><span><input type="radio" name="o" checked/></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v1'] . '</div><span><input type="radio" name="p" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div> </div><span><input type="radio" name="o" /></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v2'] . '</div><span><input type="radio" name="p" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div> </div><span><input type="radio" name="o" /></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v3'] . '</div><span><input type="radio" name="p" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option2"><div> </div><span><input type="radio" name="o" /></span><div style="text-align: center;">' . $lang['srv_tip_sample_t6_5_v4'] . '</div><span><input type="radio" name="p" checked/></span></div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_6 - multigrid (select box)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_6" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6_6'] . '</div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v1'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1a'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2a'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3a'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4a'] . '</option></select></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v2'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1b'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2b'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3b'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4b'] . '</option></select></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v3'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1c'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2c'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3c'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4c'] . '</option></select></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_6_v4'] . '</div><span><select multiple=""><option>' . $lang['srv_tip_sample_t6_6_o1d'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o2d'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o3d'] . '</option><option>' . $lang['srv_tip_sample_t6_6_o4d'] . '</option></select></span></div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_8 - multigrid (Tabela Da/Ne)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_8" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
- echo '<div class="tip_sample_option"><div> </div><span>' . $lang['srv_tip_sample_t6_8_o1'] . '</span><span>' . $lang['srv_tip_sample_t6_8_o2'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v1'] . '</div><span><input type="radio" checked name="a" /></span><span><input type="radio" name="a" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v2'] . '</div><span><input type="radio" /></span><span><input type="radio" name="b" checked /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t6_v3'] . '</div><span><input type="radio" /></span><span><input type="radio" name="c" checked /></span></div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_9 - Drag-drop
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_9" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>'; //$lang['srv_new_question_icon']
- echo '<span>' . $lang['srv_new_question'] . '</span>';
-
- echo '<div class="tip_sample">';
-
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t6'] . '</div>';
-
- echo '<div style="float: left; width: 200px; height: 150px; border-right: 1px black solid;">';
- echo '<div class="tip_sample_option"></div><br /><br />';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t6_v1'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t6_v2'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t6_v3'] . '</div></div>';
- echo '</div>';
-
- echo '<div style="float: left; width: 200px; height: 180px; margin-left: 20px;">';
- echo '<div class="tip_sample_option">';
- echo '<ul style="list-style-type: none;">';
- //echo '<div>'.$lang['srv_tip_sample_t6_o1'].'</div><div>tralrarla</div><div>'.$lang['srv_tip_sample_t6_o2'].'</div><div>'.$lang['srv_tip_sample_t6_o3'].'</div><br />';
- echo '<li >
- <div class="dragdrop_preview_frame_grid_title">' . $lang['srv_tip_sample_t6_o1'] . '</div>
- </li>'; //izpis "naslova" okvirja
- echo '<li>
- <div class="dragdrop_preview_frame_grid"></div>
- </li>' . "\n"; //izpis okvirja
- echo '<li >
- <div class="dragdrop_preview_frame_grid_title">' . $lang['srv_tip_sample_t6_o2'] . '</div>
- </li>'; //izpis "naslova" okvirja
- echo '<li>
- <div class="dragdrop_preview_frame_grid"></div>
- </li>' . "\n"; //izpis okvirja
- echo '<li >
- <div class="dragdrop_preview_frame_grid_title">' . $lang['srv_tip_sample_t6_o3'] . '</div>
- </li>'; //izpis "naslova" okvirja
- echo '<li>
- <div class="dragdrop_preview_frame_grid"></div>
- </li>' . "\n"; //izpis okvirja
- echo '</ul>';
- echo '</div>';
- echo '</div>';
-
- echo '<div class="clr"></div>';
-
- echo '</div>';
- echo '</div>';
-
- // tip 6_10 - Image HotSpot
- echo '<div name="tip_preview_sub" id="tip_preview_sub_6_10" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: label.</div>';
- //echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_hotspot_preview_text_radio_grid'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_0/hotspot.png" /></div>';
- echo '</div>';
- echo '</div>';
-
-
- // tip 16 - multicheckbox
- echo '<div name="tip_preview_sub" id="tip_preview_sub_16" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multicheckbox.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t16'] . '</div>';
- echo '<div class="tip_sample_option"><div> </div><span>' . $lang['srv_tip_sample_t16_o1'] . '</span><span>' . $lang['srv_tip_sample_t16_o2'] . '</span> <span>' . $lang['srv_tip_sample_t16_o3'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t16_v1'] . '</div><span><input type="checkbox" checked /></span><span><input type="checkbox" /></span><span><input type="checkbox" checked /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t16_v2'] . '</div><span><input type="checkbox" checked /></span><span><input type="checkbox" /></span><span><input type="checkbox" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t16_v3'] . '</div><span><input type="checkbox" /></span><span><input type="checkbox" checked /></span><span><input type="checkbox" checked /></span></div>';
- echo '<div class="clr"></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 19 - multitext
- echo '<div name="tip_preview_sub" id="tip_preview_sub_19" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multitext.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t19'] . '</div>';
- echo '<div class="tip_sample_option"><div> </div><span>' . $lang['srv_tip_sample_t19_o1'] . '</span><span>' . $lang['srv_tip_sample_t19_o2'] . '</span><span>' . $lang['srv_tip_sample_t19_o3'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t19_v1'] . '</div><span><input type="text" size="10" value="abc" /></span><span><input type="text" size="10" value="abc" /></span><span><input type="text" size="10" value="abc" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t19_v2'] . '</div><span><input type="text" size="10" value="abc" /></span><span><input type="text" size="10" value="abc" /></span><span><input type="text" size="10" value="abc" /></span></div>';
- echo '<div class="clr"></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 20 - multinumber
- echo '<div name="tip_preview_sub" id="tip_preview_sub_20" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multinumber.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t20'] . '</div>';
- echo '<div class="tip_sample_option"><div> </div><span>' . $lang['srv_tip_sample_t20_o1'] . '</span><span>' . $lang['srv_tip_sample_t20_o2'] . '</span><span>' . $lang['srv_tip_sample_t20_o3'] . '</span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t20_v1'] . '</div><span><input type="text" size="10" value="123" /></span><span><input type="text" size="10" value="123" /></span><span><input type="text" size="10" value="123" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t20_v2'] . '</div><span><input type="text" size="10" value="123" /></span><span><input type="text" size="10" value="123" /></span><span><input type="text" size="10" value="123" /></span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><div>' . $lang['srv_tip_sample_t20_v3'] . '</div><span><input type="text" size="10" value="123" /></span><span><input type="text" size="10" value="123" /></span><span><input type="text" size="10" value="123" /></span></div>';
- echo '<div class="clr"></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 7 - number
- echo '<div name="tip_preview_sub" id="tip_preview_sub_7" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: number.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t7'] . '</div>';
- echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t7_o1'] . '<input type="text" value="123" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 7_2 - slider
- echo '<div name="tip_preview_sub" id="tip_preview_sub_7_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: number.</div>';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t7_2'] . '</div>';
- echo '<div class="tip_sample_option"><img src="img_new/slider.png" height="40"/></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 8 - datum
- echo '<div name="tip_preview_sub" id="tip_preview_sub_8" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: datum.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t8'] . '</div>';
- echo '<div class="tip_sample_option"><input type="text" size="20"/><span id="starts_img" class="sprites calendar" style="float:none; margin-bottom:0"></span></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 17 - Razvrščanje prestavljanje (default)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_17" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t17'] . '</div>';
-
- echo '<div style="float: left; width: 150px; height: 110px; border-right: 1px black solid;">';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t17_o1'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t17_o2'] . '</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t17_o3'] . '</div></div>';
- echo '</div>';
-
- echo '<div style="float: left; width: 150px; height: 110px; margin-left: 30px;">';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview_frame">1</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview_frame">2</div></div>';
- echo '<div class="tip_sample_option"><div class="razvrscanje_preview_frame">3</div></div>';
- echo '</div>';
- echo '<div class="clr"></div>';
-
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_ranking')){
- $userAccess->displayNoAccessText($what='question_type_ranking');
- }
- echo '</div>';
-
- // tip 171 - Razvrščanje ostevilcevanje (design = 1)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_17_1" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t171'] . '</div>';
-
- echo '<div class="tip_sample_option" style="margin-top: 5px;"><input type="text" size="1"/>' . $lang['srv_tip_sample_t171_o1'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option" style="margin-top: 5px;"><input type="text" size="1"/>' . $lang['srv_tip_sample_t171_o2'] . '</div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option" style="margin-top: 5px;"><input type="text" size="1"/>' . $lang['srv_tip_sample_t171_o3'] . '</div>';
- echo '<div style="clear:left"></div>';
-
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_ranking')){
- $userAccess->displayNoAccessText($what='question_type_ranking');
- }
- echo '</div>';
-
- // tip 172 - Razvrščanje premikanje (design = 2)
- echo '<div name="tip_preview_sub" id="tip_preview_sub_17_2" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: multigrid.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t172'] . '</div>';
- echo '<div class="tip_sample_option"><span> </span><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t172_o1'] . '</div><span> </span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><span> </span><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t172_o2'] . '</div><span> </span></div>';
- echo '<div style="clear:left"></div>';
- echo '<div class="tip_sample_option"><span> </span><div class="razvrscanje_preview">' . $lang['srv_tip_sample_t172_o3'] . '</div><span> </span></div>';
- echo '<div class="clr"></div>';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_ranking')){
- $userAccess->displayNoAccessText($what='question_type_ranking');
- }
- echo '</div>';
-
- // tip 18 - vsota
- echo '<div name="tip_preview_sub" id="tip_preview_sub_18" class="tip_preview_sub">';
- // echo '<div>Primer tipa vprašanj: vsota.</div>';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample" style="text-align: right;">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t18'] . '</div>';
- echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t18_o1'] . '<input type="text" size="8" style="margin-bottom: 3px;" value="9" /></div>';
- echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t18_o2'] . '<input type="text" size="8" style="margin-bottom: 3px;" value="10" /></div>';
- echo '<div class="tip_sample_option">' . $lang['srv_tip_sample_t18_o3'] . '<input type="text" size="8" style="margin-bottom: 3px;" value="5" /></div>';
- echo '<div class="tip_sample_option" style="border-top: 1px black solid;">' . $lang['srv_tip_sample_t18_o4'] . '<input type="text" size="8" style="margin-top: 3px;" value="24" /></div>';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_sum')){
- $userAccess->displayNoAccessText($what='question_type_sum');
- }
- echo '</div>';
-
- // tip 24 - Kombinirana tabela
- echo '<div name="tip_preview_sub" id="tip_preview_sub_24" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_survey_table_multiple'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_multitable')){
- $userAccess->displayNoAccessText($what='question_type_multitable');
- }
- echo '</div>';
-
- // tip 27 - Heatmap
- echo '<div name="tip_preview_sub" id="tip_preview_sub_27" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_vprasanje_heatmap'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_heatmap')){
- $userAccess->displayNoAccessText($what='question_type_heatmap');
- }
- echo '</div>';
-
- // tip 22 - Kalkulacija
- echo '<div name="tip_preview_sub" id="tip_preview_sub_22" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_vprasanje_tip_long_22'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_calculation')){
- $userAccess->displayNoAccessText($what='question_type_calculation');
- }
- echo '</div>';
-
- // tip 25 - Kvota
- echo '<div name="tip_preview_sub" id="tip_preview_sub_25" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question_icon'] . '</span>';
- echo '<div class="tip_sample">';
- echo $lang['srv_vprasanje_tip_long_25'];
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='question_type_quota')){
- $userAccess->displayNoAccessText($what='question_type_quota');
- }
- echo '</div>';
-
- // tip 9 - SN-imena
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div><span class="faicon add small icon-blue"></span>' . $lang['srv_add_field'] . '</div>';
- echo '</div>';
- if(!$userAccess->checkUserAccess($what='social_network')){
- $userAccess->displayNoAccessText($what='social_network');
- }
- echo '</div>';
-
- // tip 9_1 - SN-imena - fiksno st. polj
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9_1" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 9_2 - SN-imena - 1 textbox
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9_2" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
- echo '<div class="tip_sample_option"><textarea rows="10"></textarea></div>';
- echo '</div>';
- echo '</div>';
-
- // tip 9_3 - SN-imena - vnos stevila polj
- echo '<div name="tip_preview_sub" id="tip_preview_sub_9_3" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
- echo '<div class="tip_sample_text">' . $lang['srv_tip_sample_t9'] . ':</div>';
- echo '<div class="tip_sample_option">' . $lang['srv_design_count'] . ': <input type="text" size="4" style="margin-bottom: 3px;" value="3" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '<div class="tip_sample_option"><input type="text" /></div>';
- echo '</div>';
- echo '</div>';
-
- // demografska vprasanja
- include_once('../../main/survey/app/global_function.php');
- $Survey = new \App\Controllers\SurveyController(true);
- save('forceShowSpremenljivka', true);
-
- $dem = Array('XSPOL', 'XSTAR2a4', 'XZST1surs4', 'XDS2a4', 'XIZ1a2', 'XLOKACREGk', 'XPODJPRIH');
-
- foreach ($dem AS $key) {
-
- $id = Demografija::getInstance()->getSpremenljivkaID($key);
-
- if ($id > 0) {
- echo '<div name="tip_preview_sub" id="tip_preview_sub_' . $id . '" class="tip_preview_sub">';
- echo '<span>' . $lang['srv_new_question'] . '</span>';
- echo '<div class="tip_sample">';
-
- \App\Controllers\Vprasanja\VprasanjaController::getInstance()->displaySpremenljivka($id);
-
- echo '</div>';
- echo '</div>';
- }
- }
-
-
- echo '</div><div class="bottom-left"></div><div class="bottom-right"></div>';
-
- echo '</div>'; // tip_preview
- }
/**
* porihtana funkcija, da poklice SurveyRespondents::checkSystemVariables(), ki je zadolzena za dodajanje sistemskih spremenljivk
@@ -6633,17 +6203,6 @@ class SurveyAdmin }
}
-
- /** prikaze div da so nastavitve shranjene in ga nato skrije
- *
- */
- function displaySuccessSave()
- {
- global $lang;
- echo $lang['srv_success_save'];
- }
-
-
/** pravilno redirekta admin url ankete
* če je anketa aktivna gre na dashboard
* če anketa ni aktivna gre na:
@@ -6703,7 +6262,7 @@ class SurveyAdmin die();
}
}
-
+
# ugotovimo status ankete
SurveyInfo::getInstance()->SurveyInit($this->anketa);
if (SurveyInfo::getSurveyColumn('active') == 1) {
@@ -6729,9 +6288,8 @@ class SurveyAdmin die();
}
- function displayAktivnost()
- {
- global $lang, $site_url, $admin_type;
+ function displayAktivnost(){
+ global $lang, $site_url, $admin_type, $global_user_id;
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
@@ -6739,8 +6297,8 @@ class SurveyAdmin $row = SurveyInfo::getInstance()->getSurveyRow();
SurveySetting::getInstance()->Init($this->anketa);
- if ($row['active'] == 1) // preverimo če je čas aktivacije potekel potem anketo deaktiviramo
- $row['active'] = $this->checkSurveyActive();
+ // preverimo če je čas aktivacije potekel potem anketo deaktiviramo oz, ce bi se morala sama aktivirati
+ $row['active'] = SurveyInfo::getInstance()->checkSurveyActive();
$link = SurveyInfo::getSurveyLink();
@@ -6753,157 +6311,146 @@ class SurveyAdmin $preview_displayvariables = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayvariables');
$preview_hidecomment = SurveySetting::getInstance()->getSurveyMiscSetting('preview_hidecomment');
$preview_options = '' . ($preview_disableif == 1 ? '&disableif=1' : '') . ($preview_disablealert == 1 ? '&disablealert=1' : '') . ($preview_displayifs == 1 ? '&displayifs=1' : '') . ($preview_displayvariables == 1 ? '&displayvariables=1' : '') . ($preview_hidecomment == 1 ? '&hidecomment=1' : '') . '';
+
+ // URL ankete
+ echo '<div class="anketa_header_url setting_box tooltip">';
- // Predogled in testiranje (ikona monitor)
- echo '<span class="tooltip borderLeft monitor" style="padding-left:7px;">';
- echo ' <a href="' . $link . '&preview=on' . $preview_options . '" target="_blank"><span class="faicon monitor" style="margin-right:7px;"></span></a> ';
- echo '<span id="tooltip_preview_content" class="expanded-tooltip bottom light">';
-
- echo '<b>' . $lang['srv_monitor_toolbox_title'] . '</b>';
-
- echo '<p>';
-
- // Ce imamo izklopljene mobilne prilagoditve ne pustimo preview-ja na mobile, ker itak ne prikaze scalano
- $mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly');
- if($mobile_friendly != '0'){
- echo '<b><a href="' . $link . '&preview=on' . $preview_options . '" target="_blank">' . $lang['srv_preview'] . ' PC</a>';
- echo ' (<a href="' . $link . '&preview=on&mobile=1' . $preview_options . '" target="_blank">' . $lang['srv_preview_mobile'] . '</a>, ';
- echo '<a href="' . $link . '&preview=on&mobile=2' . $preview_options . '" target="_blank">' . $lang['srv_preview_tablet'] . '</a>)</b>';
- }
- else{
- echo '<b><a href="' . $link . '&preview=on' . $preview_options . '" target="_blank">' . $lang['srv_preview'] . ' PC</a></b>';
- }
-
- echo '<br />(' . $lang['srv_monitor_toolbox_preview'] . ')';
-
- echo '</p>';
-
- // V formi in glasovanju nimamo testnih vnosov
- if ($this->survey_type != 0 && $this->survey_type != 1) {
- echo '<a href="' . $link . '&preview=on&testdata=on' . $preview_options . '" title="" target="_blank">';
- echo '<b>' . $lang['srv_survey_testdata'] . '</b>';
- echo '</a>';
-
- echo '<br />(' . $lang['srv_monitor_toolbox_test'] . ')';
+ if ($row['active'] == 1 && !SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
+ echo '<a href="' . $link . '" target="_blank">'.$link.'</a>';
+ }
+ elseif (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
+ echo '<a href="'.$site_url.'sa" target="_blank">'.$site_url.'sa</a>';
+ }
+ else {
+ echo '<span>'.$link.'</span>';
}
- echo '<br /><br />';
-
- echo '<span class="arrow"></span>';
- echo '</span>'; // expanded-tooltip bottom
- echo '</span>'; // request-help
+ echo '<div class="expanded-tooltip bottom" id="survey_activity_content">';
+ $this->tooltip_survey_activity();
+ echo '</div>';
- # url ankete
- echo '<span id="anketa_url" class="anketa_url borderLeft">';
- if ($row['active'] == 1 && !SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
- echo '<a href="' . $link . '" title="' . $lang['srv_urlankete'] . '" target="_blank">';
- //echo '<span class="sprites anketa_link"></span>
- echo $link;
- echo '</a>';
+ echo '</div>';
- } elseif (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
- echo '<a href="'.$site_url.'sa" target="_blank">'.$site_url.'sa</a>';
- } else {
- echo $link;
- }
- echo '</span> ';
+ // Aktivacija ankete
$d = new Dostop();
if ($d->checkDostopAktiven()) {
- echo '<span class="borderLeft">';
+ echo '<div class="anketa_header_activate setting_box tooltip">';
if (SurveyInfo::getSurveyColumn('active') == 1) {
+
# anketa je aktivna
# V kolikor gre za hierarhijo in uporabnik ni administrator hierarhije
if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){
if ($hierarhija_type == 1) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
- } else{
- echo '<a href="#" class="srv_ico" title="' . $lang['srv_anketa_active'] . '" style="cursor:text !important;">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico">';
+ }
+ else{
+ echo '<a href="#" class="srv_ico" style="cursor:text !important;">';
}
- }else {
- echo '<a href="#" class="srv_ico" onclick="anketa_active(\'' . $this->anketa . '\',\'' . $row['active'] . '\'); return false;" title="' . $lang['srv_anketa_active'] . '">';
+ }
+ else {
+ echo '<a href="#" class="srv_ico" onclick="anketa_active(\'' . $this->anketa . '\',\'' . $row['active'] . '\'); return false;">';
}
- echo '<div id="srv_active" class="switch_anketa anketa_on"><span class="switch_anketa_content">ON</span></div>';
+ echo '<div id="srv_active" class="switch_anketa anketa_on"></div>';
echo '</a>';
- } else {
+ }
+ // Preklop domene na oneclicksurvey.com - ne pustimo aktivacije
+ elseif(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
+ echo '<a href="#" class="srv_ico">';
+ echo ' <div id="srv_inactive" class="switch_anketa anketa_off"></div>';
+ echo '</a>';
+ }
+ else {
$anketa_active = "anketa_active('" . $this->anketa . "','" . $row['active'] . "'); ";
//Preden anketo aktiviramo preverimo, če gre tudi za izgradnjo hierarhije in če anketa še ni bila aktivirana
if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){
if ($hierarhija_type == 1) {
- echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico">';
} else{
- echo '<a href="#" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ echo '<a href="#" class="srv_ico">';
}
- }else {
- echo '<a href="#" class="srv_ico" onclick="' . $anketa_active . ' return false;" title="' . $lang['srv_anketa_noactive'] . '">';
}
-
- if ((int)$_last_active > 0) {
- # anketa je zaključena
- echo '<div id="srv_inactive" class="switch_anketa anketa_off"><span class="switch_anketa_content">OFF</span></div>';
- } else {
- # anketa je neaktivna
- echo '<div id="srv_inactive" class="switch_anketa anketa_off"><span class="switch_anketa_content">OFF</span></div>';
+ else {
+ echo '<a href="#" class="srv_ico" onclick="' . $anketa_active . ' return false;">';
}
+ echo '<div id="srv_inactive" class="switch_anketa anketa_off"></div>';
+
echo '</a>';
}
+ echo '<div class="expanded-tooltip bottom" id="survey_activity2_content">';
+ $this->tooltip_survey_activity();
+ echo '</div>';
+
+ echo '</div>';
+
+
+ // Ikona kljucavnice
+ echo '<div class="anketa_header_lock setting_box tooltip">';
+
// Ce ima uporabnik prepreceno moznost odklepanja ankete, anketo ima vedno zaklenjeno če je vklopljena hierarhija
- $prevent_unlock = (SurveyInfo::getSurveyModules('hierarhija') == 2 || $d->checkDostopSub('lock') && $row['locked'] == 1 && ($admin_type != 0 && $admin_type != 1)) ? 1 : 0;
+ $prevent_unlock = 0;
+ if(SurveyInfo::getSurveyModules('hierarhija') == 2 || (!$d->checkDostopSub('lock') && $row['locked'] == 1 && $admin_type != 0 && $admin_type != 1))
+ $prevent_unlock = 1;
+
if ($prevent_unlock == 1) {
echo '<input type="hidden" name="prevent_unlock" id="prevent_unlock" value="1">';
- echo '<a class="anketa_img_nav" title="' . $lang['srv_anketa_locked_close'] . '">';
+ echo '<a class="anketa_img_nav">';
echo '<span class="faicon lock_close"></span>';
echo '</a>';
- } else {
+ }
+ else {
# zaklepanje
- //echo '<a class="anketa_img_nav" href="javascript:anketa_lock(\''.$this->anketa.'\', \''.($row['locked']==0?'1':'0').'\');" title="'.$lang['srv_anketa_locked_'.$row['locked']].'"><img style="margin-left: 5px;" src="img_0/lock'.($row['locked']==0?'_open':'').'.png" /></a>';
if ($hierarhija_type == 10) {
- echo '<a href="#" class="anketa_img_nav" title="' . $lang['srv_anketa_locked_' . $row['locked']] . '" style="cursor:text !important;">';
- } else {
- echo '<a class="anketa_img_nav" href="javascript:anketa_lock(\'' . $this->anketa . '\', \'' . ($row['locked'] == 0 ? '1' : '0') . '\', \''.$row['mobile_created'].'\');" title="' . $lang['srv_anketa_locked_' . $row['locked']] . '">';
+ echo '<a href="#" class="anketa_img_nav" style="cursor:text !important;">';
+ }
+ else {
+ echo '<a class="anketa_img_nav" href="javascript:anketa_lock(\'' . $this->anketa . '\', \'' . ($row['locked'] == 0 ? '1' : '0') . '\', \''.$row['mobile_created'].'\');" >';
}
echo '<span class="faicon lock' . ($row['locked'] == 0 ? '_open' : '_close') . '"></span>';
echo '</a>';
}
- echo '</span>';
- }
-
-
- # Objava na FB, twitter, .... share pac
- if ($row['active'] == 1 && false) {
- # NE PRIKAZUJEMO IKONIC
- $sqlu = sisplet_query("SELECT email FROM users WHERE id='" . $this->uid() . "'");
- $rowu = mysqli_fetch_array($sqlu);
- if ($rowu['email'] == '') {
- $sqlm = sisplet_query("SELECT value FROM misc WHERE what = 'AlertFrom'");
- $rowm = mysqli_fetch_array($sqlm);
- $rowu['email'] = $rowm['value'];
- }
- ?><span style="display: inline-block; margin-left:25px;">
- <span class="anketa_img_icons" style="margin-top: 3px;">
- <a href="mailto:<?= $rowu['email'] ?>?body=<?= urlencode(SurveyInfo::getSurveyLink()) ?>?subject=<?= $row['naslov'] ?>"
- target="_blank" title="<?= $lang['srv_add_to_mail'] ?>"><span class="sprites email"></span></a>
- </span>
- <span class="anketa_img_icons">
- <a href="http://www.facebook.com/share.php?u=<?= urlencode(SurveyInfo::getSurveyLink()) ?>" target="_blank"
- title="<?= $lang['srv_add_to_fb'] ?>"><span class="sprites facebook"></span></a>
- </span>
- <span class="anketa_img_icons">
- <a href="http://twitter.com/share?url=<?= urlencode(SurveyInfo::getSurveyLink()) ?>?text=<?= $row['naslov'] ?>"
- target="_blank" title="<?= $lang['srv_add_to_tw'] ?>"><span class="sprites twitter"></span></a>
- </span>
- </span>
- <?php
+ echo '<div class="expanded-tooltip bottom" id="survey_locked_content">';
+ $this->tooltip_survey_locked();
+ echo '</div>';
+
+ echo '</div>';
}
+
+
+ // Testiranje (ikona monitor s "T") - v formi in glasovanju nimamo testnih vnosov
+ if ($this->survey_type != 0 && $this->survey_type != 1) {
+
+ echo '<div class="anketa_header_test setting_box tooltip">';
+
+ echo ' <a href="' . $link . '&preview=on&testdata=on' . $preview_options . '" target="_blank"><span class="faicon monitor"></span></a> ';
+
+ echo ' <div class="expanded-tooltip bottom" id="test_data_content">';
+ $this->tooltip_test_data();
+ echo ' </div>';
+
+ echo '</div>';
+ }
+
+
+ // Predogled in testiranje (ikona monitor)
+ echo '<div class="anketa_header_preview setting_box tooltip">';
+
+ echo ' <a href="' . $link . '&preview=on' . $preview_options . '" target="_blank"><span class="faicon monitor"></span><span class="text">'.$lang['srv_poglejanketo2'].'</span></a> ';
+
+ echo ' <div class="expanded-tooltip bottom" id="preview_data_content">';
+ $this->tooltip_preview_data();
+ echo ' </div>';
+
+ echo '</div>';
}
function surveyAutoActivate()
@@ -6922,7 +6469,7 @@ class SurveyAdmin if (!$s) echo mysqli_error($GLOBALS['connect_db']);
#updejtamo še stv_activity
- $uString = "INSERT INTO srv_activity (sid, starts, expire, uid) VALUES ('" . $this->anketa . "', NOW(), date_add(NOW(), INTERVAL 3 MONTH), '" . $global_user_id . "')";
+ $uString = "INSERT INTO srv_activity (sid, starts, expire) VALUES ('" . $this->anketa . "', NOW(), date_add(NOW(), INTERVAL 3 MONTH))";
$s = sisplet_query($uString);
if (!$s) echo mysqli_error($GLOBALS['connect_db']);
|