'; # id="surveyNavigation"
}
// Prikazemo drugi nivo navigacije
private function secondNavigation(){
global $lang, $site_url, $admin_type;
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
# 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 = isset($_GET['a']) ? $_GET['a'] : '';
if (isset ($_GET['ajaxa']))
$get = $_GET['ajaxa'];
if (trim($get) == '')
$get = A_BRANCHING;
//*** druga vrstica navigacije ***//
echo '
}
}
// Prikazemo dodaten tretji nivo navigacije po potrebi
private function thirdNavigation(){
global $global_user_id;
$podstran = '';
if($_GET['a'] == 'theme-editor'){
$podstran = 'theme-editor';
}
elseif($_GET['a'] == A_COLLECT_DATA_EXPORT){
$podstran = 'export';
}
elseif($_GET['a'] == A_HIERARHIJA && ($_GET['m'] == M_ANALIZE)){
$podstran = 'means';
}
// Zavihki TESTIRANJE
elseif($_GET['a'] == 'testiranje' && $_GET['m'] == 'predvidenicas'){
$podstran = 'ocena_trajanja';
}
elseif($_GET['a'] == 'testiranje' && $_GET['m'] == 'cas'){
$podstran = 'dejanski_casi';
}
elseif($_GET['a'] == 'komentarji_anketa'){
$podstran = 'komentarji_anketa';
}
elseif($_GET['a'] == 'komentarji'){
$podstran = 'komentarji';
}
// Zavihki PODATKI
elseif($_GET['a'] == 'data'){
if(!isset($_GET['m']) || $_GET['m'] == 'view'){
$podstran = 'data';
}
elseif($_GET['m'] == 'quick_edit'){
$podstran = 'quick_edit';
}
elseif($_GET['m'] == 'variables'){
$podstran = 'variables';
}
}
// Zavihki ANALIZA
elseif($_GET['a'] == 'analysis' && $_GET['m'] != 'anal_arch' && $_GET['m'] != 'vizualizacija'){
if (isset($_GET['podstran'])) {
$podstran = $_GET['podstran'];
}
else if (isset($_POST['podstran'])) {
$podstran = $_POST['podstran'];
}
else if (isset($_GET['m'])) {
$podstran = $_GET['m'];
}
else {
$podstran = M_ANALYSIS_SUMMARY;
}
}
elseif($_GET['a'] == 'usable_resp'){
$podstran = 'usable_resp';
}
elseif($_GET['a'] == 'AAPOR'){
$podstran = 'aapor';
}
elseif($_GET['a'] == 'reminder_tracking'){
$podstran = 'reminder_tracking';
}
elseif($_GET['a'] == 'para_graph'){
$podstran = 'para_graph';
}
elseif($_GET['a'] == 'nonresponse_graph'){
$podstran = 'para_analysis_graph';
}
// Izrisemo ustrezen meni, ce je prisoten
if($podstran != ''){
SurveyStatusProfiles::Init($this->anketa, $global_user_id);
$SSH = new SurveyStaticHtml($this->anketa);
$SSH->displayTopSettings($podstran);
}
}
// Priakz footerja
private function displayFooter(){
global $lang;
global $site_frontend;
global $mysql_database_name;
global $admin_type;
echo '';
}
// Pohendla prikazovanje vsebine ankete
private function displayAnketa(){
global $global_user_id;
// Preverimo, ce ima uporabnik dostop do te podstrani
$d = new Dostop();
if(!$d->checkDostopSubFromNavigation($this->first_action)){
$d->displayDostopNoAccess();
return;
}
// 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 '
';
$this->displayLeftMenu();
echo '
';
// 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 '
';
$this->displayAnketaMain();
echo '
';
}
// 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(){
// Ustrezno redirectamo anketo na ustrezno stran
if ($_GET['a'] == 'redirectLink') {
// Preverimo, če gre za anketo, ki vsebuje hierarhijo
unset($_SESSION['hierarhija'][$this->anketa]);
if(SurveyInfo::checkSurveyModule('hierarhija', $this->anketa))
$_SESSION['hierarhija'][$this->anketa]['type'] = \Hierarhija\HierarhijaHelper::preveriTipHierarhije($this->anketa);
$this->redirectLink();
}
// Kreira arhiv
elseif ($_GET['a'] == 'backup_create') {
$sas = new SurveyAdminSettings();
$sas->backup_create();
}
// Skopira anketo na drugo stran
elseif ($_GET['a'] == 'anketa_copy') {
$sas = new SurveyAdminSettings();
$sas->anketa_copy();
}
// Restore ankete
elseif ($_GET['a'] == 'backup_restore') {
$sas = new SurveyAdminSettings();
$sas->backup_restore();
}
// Prikazemo arhive
elseif(in_array($_GET['a'], ['arhivi', 'tracking', 'tracking-hierarhija'])){
$this->displayAnketaTabArhiv();
}
// Prikazemo vsebino glede na zavihek
else{
switch($this->first_action){
// Zavihek status
case NAVI_STATUS:
$this->displayAnketaTabStatus();
break;
// Zavihek urejanje
case NAVI_UREJANJE:
$this->displayAnketaTabUrejanje();
break;
// Zavihek testiranje
case NAVI_TESTIRANJE:
$this->displayAnketaTabTestiranje();
break;
// Zavihek objava
case NAVI_OBJAVA:
$this->displayAnketaTabObjava();
break;
// Zavihek podatki
case NAVI_RESULTS:
$this->displayAnketaTabPodatki();
break;
// Zavihek analize
case NAVI_ANALYSIS:
$this->displayAnketaTabAnalize();
break;
// Zavihek hierarhija
case NAVI_HIERARHIJA:
$this->displayAnketaTabHierarhija();
break;
default:
break;
}
}
}
// 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
if ($_GET['a'] == 'nastavitve'
|| $_GET['a'] == 'urejanje'
|| $_GET['a'] == 'alert'
|| $_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'] == 'table_settings'
|| $_GET['a'] == A_PRIKAZ
|| $_GET['a'] == A_MISSING
|| $_GET['a'] == A_SKUPINE
|| $_GET['a'] == A_EXPORTSETTINGS
|| $_GET['a'] == A_GDPR
|| $_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_EMAIL_ACCESS
|| $_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'] == 'advanced_timestamps'
|| $_GET['a'] == 'json_survey_export'
){
if ($this->isAnketar) {
return;
}
$this->showGlobalSettingsLinks();
if ($this->survey_type > 1) {
$this->showAdvancedModulesLinks();
}
$this->showAdditionalSettingsLinks();
}
// Uvoz podatkov levi meni
elseif ($_GET['a'] == A_COLLECT_DATA && in_array($_GET['m'], ['append', 'merge', 'upload_xls', 'append_xls', 'merge_xls'])) {
echo '
';
echo '
';
$this->showImportLinks();
echo '
';
echo '
';
}
// Kalkulacija podatkov levi meni
elseif ($_GET['a'] == A_COLLECT_DATA && in_array($_GET['m'], ['calculation', 'coding_auto', 'coding', M_COLLECT_DATA_RECODING])) {
echo '
';
echo '
';
$this->showcalculationsLinks();
echo '
';
echo '
';
}
// Izvoz podatkov levi meni
elseif ($_GET['a'] == A_COLLECT_DATA_EXPORT) {
echo '
';
echo '
';
$this->showExportLinks();
echo '
';
echo '
';
}
// Arhiv levi meni
elseif(in_array($_GET['a'], ['arhivi', 'tracking', 'tracking-hierarhija']) || in_array($_GET['m'], ['anal_arch', 'view_archive'])){
//echo '';
echo '
';
$SSH = new SurveyStaticHtml($this->anketa);
$SSH->displayArchiveNavigation();
echo '
';
}
}
private function displayAnketaTabStatus(){
global $lang;
global $admin_type;
// Osnovni statusi
if ($_GET['a'] == A_REPORTI) {
Common::deletePreviewData($this->anketa);
$ss = new SurveyStatistic();
$ss->Init($this->anketa);
echo '
';
$ss->Display();
echo '
';
}
// prikaze reporte
elseif ($_GET['a'] == 'AAPOR') {
$ss = new SurveyStatistic();
$ss->Init($this->anketa);
echo '
';
$ss->DisplayAaporCalculations();
echo '
';
}
// prikaze grafe neodgovorov
elseif ($_GET['a'] == A_NONRESPONSE_GRAPH) {
echo '
';
$SPA = new SurveyParaAnalysis($this->anketa);
$SPA->DisplayGraph();
echo '
';
}
// prikaze stevilo neodgovorov za posamezne respondente
elseif ($_GET['a'] == A_USABLE_RESP) {
echo '
';
$SUR = new SurveyUporabnost($this->anketa);
$SUR->displayUporabnost();
echo '
';
}
// prikaze modul kakovost
elseif ($_GET['a'] == A_KAKOVOST_RESP) {
echo '
';
$SUR = new SurveyKakovost($this->anketa);
$SUR->displayKakovost();
echo '
';
}
// Prikaze analizo hitrosti respondenta
elseif ($_GET['a'] == A_SPEEDER_INDEX) {
echo '
';
$SUR = new SurveySpeedIndex($this->anketa);
$SUR->displaySpeedIndex();
echo '
';
}
// prikaze stevilo znakov v anketi, stevilo besed...
elseif ($_GET['a'] == A_TEXT_ANALYSIS) {
echo '
';
$STA = new SurveyTextAnalysis($this->anketa);
$STA->displayTable();
echo '
';
}
// analize editiranja
elseif ($_GET['a'] == A_EDITS_ANALYSIS) {
$sea = new SurveyEditsAnalysis($this->anketa);
echo '
';
$sea->displayTable();
echo '
';
}
// prikaze analizo lokacij na podlagi ip stevilk
elseif ($_GET['a'] == A_GEOIP_LOCATION) {
echo '
';
$STA = new SurveyGeoIP($this->anketa);
$STA->displayData();
echo '
';
}
// prikaze analizo opozoril
elseif ($_GET['a'] == A_REMINDER_TRACKING) {
echo '
';
$SRT = new SurveyReminderTracking($this->anketa);
$SRT->displayTable();
echo '
';
}
// prikaze analizo anket za evalvacijo (ul)
elseif ($_GET['a'] == A_UL_EVALVATION) {
$EVAL = new Evalvacija($this->anketa);
$EVAL->displayStats();
}
// prikaze grafe parapodatkov (js, device type, browser...)
elseif ($_GET['a'] == A_PARA_GRAPH) {
echo '
';
$SPG = new SurveyParaGraph($this->anketa, $skipInit = true);
$SPG->DisplayParaGraph($this->anketa);
echo '
';
}
// prikaze reporte
elseif ($_GET['a'] == 'langStatistic') {
$ss = new SurveyStatistic();
$ss->Init($this->anketa);
echo '
';
$ss->DisplayLangStatistic();
echo '
';
}
//prikaze napredne statuse
elseif ($_GET['a'] == A_STATUS_ADVANCED) {
echo '
';
}
}
private function displayAnketaTabUrejanje(){
$a = isset($_GET['a']) ? $_GET['a'] : '';
// Prikaze branching
if ($a == 'branching' || $a == '') {
$bn = new Branching($this->anketa);
$bn->display_new();
return;
}
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
echo '
';
// Prikaze nastavitve
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 ($a == 'prevajanje' || $a == 'prevajanje2') {
$p = new Prevajanje($this->anketa);
$p->prevajaj();
}
elseif ($a == 'tema') {
$st = new SurveyTheme($this->anketa);
$st->displayGroup();
}
elseif ($a == 'theme-editor') {
$ste = new SurveyTheme($this->anketa);
$ste->displayEditing();
}
// nastavitve manjkajočih vrednosti za anketos
elseif ($a == A_MISSING) {
$smv = new SurveyMissingValues($this->anketa);
$smv->displayMissingForSurvey();
}
// skupine respondentov
elseif ($a == A_SKUPINE) {
$ss = new SurveySkupine($this->anketa);
$ss->displayEdit();
}
// prikaze nastavitve za obvescanje
elseif ($a == 'alert') {
$sas = new SurveyAdminSettings();
$sas->alert_nastavitve();
}
// Prikaze urejanje teme
elseif ($a == 'edit_css') {
$sas = new SurveyAdminSettings();
$sas->anketa_editcss();
}
// Napredni moduli
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();
}
echo '
';
echo '
';
}
private function displayAnketaTabTestiranje(){
$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($m) == '' || $m == 'diagnostika') {
$sd = new SurveyDiagnostics($this->anketa);
$sd->doDiagnostics();
$sd->displayDiagnostic();
}
elseif ($m == 'predvidenicas' || $m == 'cas') {
$sas = new SurveyAdminSettings();
$sas->tabTestiranje();
}
elseif($a == A_TESTIRANJE) {
$sas = new SurveyAdminSettings();
$sas->tabTestiranje();
}
}
private function displayAnketaTabObjava(){
if ($_GET['a'] == A_VABILA) {
echo '
';
$sas = new SurveyAdminSettings();
$sas->anketa_vabila();
echo '
';
}
elseif ($_GET['a'] == A_OTHER_INV) {
echo '
';
$sas = new SurveyAdminSettings();
$sas->anketa_vabila_drugo();
echo '
';
}
elseif ($_GET['a'] == A_INVITATIONS) {
$SI = new SurveyInvitationsNew($this->anketa);
$SI->action($_GET['m']);
}
}
private function displayAnketaTabPodatki(){
// Izvoz podatkov
if ($_GET['a'] == A_COLLECT_DATA_EXPORT) {
if ($_GET['m'] == 'excel_xls_mfdps') {
$mfdps = new SurveyMFDPS($this->anketa);
if (isset($_GET['n']) && $_GET['n'] == 'izv')
$mfdps->executeExportIzvajalci();
else
$mfdps->executeExportPredmeti();
}
elseif ($_GET['m'] == 'excel_xls_mju') {
$mju = new SurveyMJU($this->anketa);
$mju->executeExport();
}
else {
echo '
';
Common::deletePreviewData($this->anketa);
$sas = new SurveyAdminSettings();
$sas->displayIzvozi();
echo '
';
echo '
';
}
}
elseif ($_GET['m'] == '' || $_GET['m'] == 'view' || $_GET['m'] == 'edit' || $_GET['m'] == 'print' || $_GET['m'] == 'monitoring') {
Common::deletePreviewData($this->anketa);
echo '
';
$SDS = new SurveyDataDisplay($this->anketa);
$SDS->displayFilters();
$SDS->displayVnosiHTML();
echo '
'; // div_analiza_data
}
elseif ($_GET['m'] == M_COLLECT_DATA_VARIABLE_VIEW) {
$vv = VariableView::instance();
$vv->init($this->anketa);
$vv->displayVariables();
}
elseif ($_GET['m'] == 'calculation') {
$spp = new SurveyPostProcess($this->anketa);
$spp->displayTab();
}
elseif ($_GET['m'] == 'coding_auto') {
$spp = new SurveyPostProcess($this->anketa);
$spp->displayCodingAuto();
}
elseif ($_GET['m'] == 'coding') {
$spp = new SurveyPostProcess($this->anketa);
$spp->displayCoding();
}
elseif ($_GET['m'] == M_COLLECT_DATA_RECODING) {
$SR = new SurveyRecoding($this->anketa);
$SR->DisplaySettings();
}
elseif ($_GET['m'] == 'quick_edit') {
Common::deletePreviewData($this->anketa);
echo '
';
$SDS = new SurveyDataDisplay($this->anketa);
$SDS->displayQuickEditFilters();
$SDS->displayQuickEdit();
echo '
'; // div_analiza_data
}
elseif ($_GET['m'] == 'append' || $_GET['m'] == 'merge') {
$spp = new SurveyAppendMerge($this->anketa);
$spp->display($_GET['m'] == 'merge' ? true : false);
}
elseif ($_GET['m'] == 'upload_xls') {
$spp = new SurveyAppendMerge($this->anketa);
$spp->upload_xls();
}
elseif ($_GET['m'] == 'append_xls') {
$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
// Dobimo usr_id za katerega pripravljamo porocilo
$usr_id = (isset($_GET['usr_id']) && $_GET['usr_id'] > 0) ? $_GET['usr_id'] : 0;
$evoli = new SurveyEvoli($this->anketa);
$evoli->executeExport($usr_id);
}
elseif ($_GET['m'] == 'evoli_employmeter') {
// Posebno PDF porocilo za Evoli
// Dobimo usr_id za katerega pripravljamo porocilo
$usr_id = (isset($_GET['usr_id']) && $_GET['usr_id'] > 0) ? $_GET['usr_id'] : 0;
$em = new SurveyEmployMeter($this->anketa);
$em->executeExport($usr_id);
}
elseif ($_GET['m'] == 'mfdps') {
// Posebno PDF porocilo za MFDPS
// Dobimo usr_id za katerega pripravljamo porocilo
$usr_id = (isset($_GET['usr_id']) && $_GET['usr_id'] > 0) ? $_GET['usr_id'] : 0;
$mfdps = new SurveyMFDPS($this->anketa);
$mfdps->executePDFExport($usr_id);
}
elseif ($_GET['m'] == 'borza') {
// Posebni grafi za BORZA
// Dobimo usr_id za katerega pripravljamo porocilo
$usr_id = (isset($_GET['usr_id']) && $_GET['usr_id'] > 0) ? $_GET['usr_id'] : 0;
$borza = new SurveyBORZA($this->anketa);
$borza->executeChartExport($usr_id);
}
}
private function displayAnketaTabAnalize(){
$this->podstran = isset($_GET['m']) ? $_GET['m'] : M_ANALYSIS_STATISTICS;
// Povprečje pri hierarhiji in onemogočene ostale možnosti
if ($this->podstran == M_ANALYSIS_MEANS_HIERARHY || SurveyInfo::getInstance()->checkSurveyModule('hierarhija')) {
SurveyAnalysis::Init($this->anketa);
$HA = new HierarhijaAnalysis($this->anketa);
$HA->Display();
}
// V kolikor gre za običajno analizo potem prikažemo vse opcije
else {
switch ($this->podstran) {
case M_ANALYSIS_LINKS : // linki za vprašalnik
SurveyAnalysis::Init($this->anketa);
SurveyAnalysis::DisplayReportsLinks();
break;
case M_ANALYSIS_CREPORT : // porocilo po meri
SurveyAnalysis::Init($this->anketa);
SurveyAnalysis::DisplayFilters();
echo '
';
$SCM = new SurveyCustomReport($this->anketa);
$SCM->displayReport();
echo '
';
break;
case M_ANALYSIS_MEANS:
SurveyAnalysis::Init($this->anketa);
$SM = new SurveyMeans($this->anketa);
$SM->Display();
break;
case M_ANALYSIS_TTEST :
SurveyAnalysis::Init($this->anketa);
$STT = new SurveyTTest($this->anketa);
$STT->Display();
break;
case M_ANALYSIS_BREAK :
$SB = new SurveyBreak($this->anketa);
$SB->Display();
break;
case M_ANALYSIS_PARA :
$SPA = new SurveyParaAnalysis($this->anketa);
$SPA->Display();
break;
case M_ANALYSIS_CHARTS :
SurveyChart::Init($this->anketa);
SurveyChart::display();
break;
case M_ANALYSIS_MULTICROSSTABS :
$SMC = new SurveyMultiCrosstabs($this->anketa);
$SMC->display();
break;
// Vizualizacija (R modul)
case M_ANALYSIS_VIZUALIZACIJA :
$sv = new SurveyVizualizacija($this->anketa);
$sv->display();
break;
// 360 stopinjske analize (adecco)
case M_ANALYSIS_360 :
$S360 = new Survey360($this->anketa);
$S360->displayReports();
break;
// 360 stopinjske analize (1ka)
case M_ANALYSIS_360_1KA :
$S360 = new Survey3601ka($this->anketa);
$S360->displayReports();
break;
// HEATMAP
case M_ANALYSIS_HEATMAP :
SurveyHeatMap::Init($this->anketa);
SurveyHeatMap::display($this->spremenljivka);
break;
default:
if (isset($_GET['podstran'])) {
$podstran = $_GET['podstran'];
} else if (isset($_POST['podstran'])) {
$podstran = $_POST['podstran'];
} else if (isset($_GET['m'])) {
$podstran = $_GET['m'];
} else {
$podstran = M_ANALYSIS_SUMMARY;
}
SurveyAnalysis::Init($this->anketa);
SurveyAnalysis::DisplayFilters();
echo '
';
SurveyAnalysis::Display();
echo '
'; // div_analiza_data
break;
}
}
}
private function displayAnketaTabArhiv(){
$a = isset($_GET['a']) ? $_GET['a'] : '';
$m = isset($_GET['m']) ? $_GET['m'] : '';
$d = isset($_GET['d']) ? $_GET['d'] : '';
echo '
';
$sas = new SurveyAdminSettings();
if ($m == 'data') {
$sas->arhivi_data();
}
else if ($m == 'testdata') {
$sas->arhivi_testdata();
}
else if ($m == 'survey' || $m == 'survey_data') {
$sas->arhivi_survey();
}
else if ($a == 'tracking') {
if($d == 'download')
return TrackingClass::init()->filter([20,21,22])->csvExport();
TrackingClass::init()->filter([20,21,22])->trackingDisplay();
}
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 ($d == 'download')
return TrackingClass::init()->filter([20,21], true)->csvExport();
return TrackingClass::init()->filter([20,21], true)->trackingDisplay();
}
else {
$sas->arhivi();
}
echo '
';
echo '
';
}
private function displayAnketaTabHierarhija(){
echo '
';
$hir_nav = new \Hierarhija\Hierarhija($this->anketa);
$hir_nav->displayHierarhijaNavigation();
echo '
';
echo '
';
$hierarhija = new \Hierarhija\Hierarhija($this->anketa);
// m=uredi-sifrante
if ($_GET['m'] == M_ADMIN_UREDI_SIFRANTE) {
$hierarhija->hierarhijaSuperadminSifranti();
}
elseif ($_GET['m'] == M_ADMIN_UVOZ_SIFRANTOV) {
$hierarhija->hierarhijaSuperadminUvoz();
}
elseif ($_GET['m'] == M_ANALIZE) {
// V kolikor gre za poročila po meri
if($_GET['r'] == 'custom'){
$HC = new \Hierarhija\HierarhijaPorocilaClass($this->anketa);
$HC->izvoz();
}
else{
$HA = new HierarhijaAnalysis($this->anketa);
$HA->Display();
}
}
elseif ($_GET['m'] == M_ADMIN_AKTIVACIJA) {
$hierarhija->aktivacijaHierarhijeInAnkete();
}
elseif ($_GET['m'] == M_HIERARHIJA_STATUS) {
$hierarhija->statistikaHierjearhije();
}
elseif($_GET['m'] == M_UREDI_UPORABNIKE && $_GET['izvoz'] == 1) {
// za vse ostalo je uredi uporabnike - M_UREDI_UPORABNIKE
\Hierarhija\HierarhijaIzvoz::getInstance($this->anketa)->csvIzvozVsehUporabnikov();
}
else {
// za vse ostalo je ure uredi uporabnike - M_UREDI_UPORABNIKE
$hierarhija->izberiDodajanjeUporabnikovNaHierarhijo();
}
echo '
';
echo '
';
}
function showExportLinks()
{
global $lang;
global $site_url;
global $site_path;
global $admin_type;
global $global_user_id;
$userAccess = UserAccess::getInstance($global_user_id);
if(!$userAccess->checkUserAccess('data_export')){
echo '
';
}
if (!isset($_GET['m']) || trim($_GET['m']) == '') {
$_GET['m'] = M_EXPORT_EXCEL_XLS;
}
echo '';
echo '';
if(!$userAccess->checkUserAccess('data_export')){
echo '
';
}
}
function showcalculationsLinks(){
global $lang;
global $site_url;
global $site_path;
global $admin_type;
global $global_user_id;
$userAccess = UserAccess::getInstance($global_user_id);
if(!$userAccess->checkUserAccess('data_calculation')){
echo '
';
}
echo '';
echo '';
if(!$userAccess->checkUserAccess('data_calculation')){
echo '
';
}
}
function showImportLinks(){
global $lang;
global $site_url;
global $site_path;
global $admin_type;
global $global_user_id;
$userAccess = UserAccess::getInstance($global_user_id);
if(!$userAccess->checkUserAccess('data_append')){
echo '
';
}
echo '';
echo '';
if(!$userAccess->checkUserAccess('data_append')){
echo '
';
}
}
function showGlobalSettingsLinks(){
global $lang;
global $site_url;
global $site_path;
global $admin_type;
global $global_user_id;
$userAccess = UserAccess::getInstance($global_user_id);
$get = $_GET['a'];
$d = new Dostop();
//echo '';
echo '';
echo '';
}
function showAdditionalSettingsLinks()
{
global $lang;
global $site_url;
global $site_path;
global $admin_type;
global $global_user_id;
$userAccess = UserAccess::getInstance($global_user_id);
$get = $_GET['a'];
$d = new Dostop();
echo '';
echo '';
}
// Linki za napredne module
private function showAdvancedModulesLinks()
{
global $lang;
global $site_url;
global $site_path;
global $admin_type;
global $global_user_id;
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
$get = $_GET['a'];
$row = SurveyInfo::getInstance()->getSurveyRow();
$d = new Dostop();
if ($d->checkDostopAktiven()) {
$userAccess = UserAccess::getInstance($global_user_id);
$user_package = $userAccess->getPackage(); // paket, ki ga ima uporabnik (1, 2 , 3)
$dostop_styling = "";
if ($user_package != "-1" && $user_package != "" && !$userAccess->isAnketaOld())
$dostop_styling = "dostop_".$user_package."ka";
if(/*!$userAccess->checkUserAccess('kviz') &&*/ $user_package==1 && $dostop_styling != ""){
echo '
'; #zacetek napredni moduli
}
if($user_package != 3 && $dostop_styling != ""){
echo '
'; #zacetek lock
}
echo '';
if ($dostop_styling != "") {
//echo '';
}
echo '';
if($user_package != 3 && $dostop_styling != ""){
echo '
'; #konec lock
}
if($user_package==1 && $dostop_styling != ""){
echo '
'; #konec napredni moduli
}
}
}
/**
* prikaze admin vmesnik izven specificne ankete (seznam anket in polje za dodajanje na prvi strani, nastavitve uporabnika, uporabnike...)
*
*/
private function displaySeznamAnket(){
global $lang, $site_url, $global_user_id, $admin_type, $site_domain;
# naložimo razred z seznamom anket
$SL = ($has_folders = SurveyList::hasFolders()) ? new SurveyListFolders() : new SurveyList();
$SLCount = $SL->countSurveys();
$SLCountPhone = $SL->countPhoneSurveys();
// VSEBINA POSAMEZNEGA TABA PRI MOJIH ANKETAH
echo '';
}
/**
* vrne kodo ankete, ki se jo uporabi za embed
*
*/
static function getEmbed($js = true)
{
global $site_url;
$iframe = '
';
$javascript = '';
if ($js)
return htmlentities($iframe . $javascript, ENT_QUOTES);
else
return htmlentities($iframe, ENT_QUOTES);
}
function check_online_users(){
global $global_user_id;
global $lang;
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
$sqlx = sisplet_query("SELECT uid FROM srv_dostop WHERE ank_id = '$this->anketa'");
if (mysqli_num_rows($sqlx) <= 1) return;
$sql = sisplet_query("SELECT DISTINCT user FROM srv_tracking".$this->db_table." WHERE ank_id='$this->anketa' AND user != '$global_user_id' AND datetime > NOW() - INTERVAL 15 MINUTE");
if (!$sql) return;
if (mysqli_num_rows($sql) > 0 && $hierarhija_type < 5) {
echo '
';
echo '
';
echo '
'.$lang['srv_users_viewing3'].': ' . (mysqli_num_rows($sql) + 1) . '';
/*
if(is_null($hierarhija_type) || $hierarhija_type == 1){
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 '
' . $row1['email'] . ' (' . $row1['name'] . ' ' . $row1['surname'] . ')';
}
}
}
*/
echo '
';
}
}
function request_help(){
global $lang;
$hierarhija_type = (!empty($_SESSION['hierarhija'][$this->anketa]['type']) ? $_SESSION['hierarhija'][$this->anketa]['type'] : null);
if ($hierarhija_type == 10) {
echo '
';
return '';
}
echo '
';
echo '';
echo ' ';
echo '';
echo '';
$this->tooltip_request_help();
echo '
'; // expanded-tooltip bottom
echo ''; // request-help
}
// Tooltip "prosi za pomoc"
public function tooltip_request_help(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
echo '
';
}
// Tooltip "aktivnost ankete"
public function tooltip_survey_activity(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
echo '
';
}
// Tooltip "zaklenjena/odklenjena anketa"
public function tooltip_survey_locked(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
echo '
';
}
// Tooltip "testni vnos"
public function tooltip_test_data(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
echo '
';
}
// Tooltip "predogled anekte"
public function tooltip_preview_data(){
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
$link = SurveyInfo::getSurveyLink();
echo '
';
}
// 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 '
';
}
function displaySecondNavigationLinks($navigation = 0){
global $lang, $site_url;
global $global_user_id;
$row = SurveyInfo::getInstance()->getSurveyRow();
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$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) {
$p = new Prevajanje($this->anketa);
global $lang1;
$lang_more = '';
$sqll = sisplet_query("SELECT dostop FROM srv_dostop WHERE ank_id='$this->anketa' AND uid='$global_user_id'");
$rowl = mysqli_fetch_array($sqll);
$dostop = explode(',', $rowl['dostop']);
if (!in_array('edit', $dostop)) {
$sqll = sisplet_query("SELECT lang_id FROM srv_dostop_language WHERE ank_id='$this->anketa' AND uid='$global_user_id'");
if (mysqli_num_rows($sqll) == 1) {
$rowl = mysqli_fetch_array($sqll);
$p->include_lang($rowl['lang_id']);
$lang_more = ' | ' . $lang['lang_short'];
$p->include_base_lang();
}
}
if ($lang_more == '' && isset($_GET['lang_id'])) {
$p->include_lang((int)$_GET['lang_id']);
$lang_more = ' | ' . $lang['lang_short'];
$p->include_base_lang();
}
}
if (($_GET['a'] == A_COLLECT_DATA || $_GET['a'] == A_USABLE_RESP || $_GET['a'] == A_KAKOVOST_RESP || $_GET['a'] == A_SPEEDER_INDEX || $_GET['a'] == A_REMINDER_TRACKING || $_GET['a'] == A_TEXT_ANALYSIS || $_GET['a'] == A_EDITS_ANALYSIS || $_GET['a'] == A_ANALYSIS) && $_GET['m'] != 'analysis_links' && $_GET['m'] != 'anal_arch')
$this->displayExportHover($navigation);
} else if ($navigation == 1) {
# stran status (reporti) ali urejanje
if ($this->first_action == NAVI_UREJANJE || $_GET['a'] == '' || $_GET['a'] == 'reporti') {
// V kolikor imamo hierarhijo potem je tudi možnost kopiranja ankete in hierarhije
if($_GET['a'] == A_HIERARHIJA_SUPERADMIN)
echo '
';
// Uvoz iz besedila
if($this->second_action == NAVI_UREJANJE_BRANCHING || $_GET['a'] == ''){
if($userAccess->checkUserAccess($what='ustvari_anketo_from_text'))
echo '
';
else
echo '
';
}
# kopiranje
if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
//echo '
';
}
else{
echo '
';
}
# brisanje
echo '
';
if ($this->second_action == NAVI_UREJANJE_BRANCHING || $_GET['a'] == 'reporti' || ($_GET['a'] == A_HIERARHIJA_SUPERADMIN && $_GET['m'] == 'analize'))
$this->displayExportHover($navigation);
}
// Pri komentarjih imamo izvoz pdf/rtf
if ($_GET['a'] == 'komentarji') {
$this->displayExportHover($navigation);
}
}
}
// Ikona in hover div za izvoz
function displayExportHover($navigation){
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);
$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 '
';
echo '';
echo '';
echo '
checkUserAccess('public_link') ? 'class= "user_access_locked"' : '').'>';
if ($navigation == 0) {
$lan_archive = ' title="' . $lang['srv_analiza_arhiviraj_ttl'] . '"';
$lan_archive_send = ' title="' . $lang['srv_analiza_arhiviraj_email_ttl'] . '"';
$lan_print = ' title="' . $lang['PRN_Izpis'] . '"';
$lan_pdf = ' title="' . $lang['PDF_Izpis'] . '"';
$lan_rtf = ' title="' . $lang['RTF_Izpis'] . '"';
$lan_xls = ' title="' . $lang['XLS_Izpis'] . '"';
$lan_ppt = ' title="' . $lang['PPT_Izpis'] . '"';
if ($_GET['m'] == M_ANALYSIS_DESCRIPTOR) {
if($userAccess->checkUserAccess('publik_link') && $current_package != 3 && $dostop_styling != ""){
echo '
';
}
echo '
' . $lang['srv_export_hover_archive'] . '';
echo '
' . $lang['srv_export_hover_archive_mail'] . '';
if($userAccess->checkUserAccess('publik_link') && $current_package == 1 && $dostop_styling != ""){
echo '
';
}
if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
echo '
';
}
if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
echo '
';
}
}
else if ($_GET['m'] == M_ANALYSIS_FREQUENCY) {
if($userAccess->checkUserAccess('publik_link') && $current_package != 3 && $dostop_styling != ""){
echo '
';
}
echo '
' . $lang['srv_export_hover_archive'] . '';
echo '
' . $lang['srv_export_hover_archive_mail'] . '';
if($userAccess->checkUserAccess('publik_link') && $current_package == 1 && $dostop_styling != ""){
echo '
';
}
if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
echo '
';
}
if($userAccess->checkUserAccess('export') && $dostop_styling != ""){
echo '
';
}
}
else if ($_GET['m'] == M_ANALYSIS_SUMMARY) {
if($userAccess->checkUserAccess('publik_link') && $current_package != 3 && $dostop_styling != ""){
echo '
';
}
if($current_package == 2 && $dostop_styling != ""){
echo '
';
}
if($userAccess->checkUserAccess('export') && $current_package == 1 && $dostop_styling != ""){
echo '
';
}
if($userAccess->checkUserAccess('export') && $current_package == 1 && $dostop_styling != ""){
echo '
';
}
if($current_package == 2 && $dostop_styling != ""){
echo '