From a4805a1cb08d256ed92827d9d07bdd0a7f93acc0 Mon Sep 17 00:00:00 2001 From: pero1203 Date: Mon, 7 Feb 2022 15:52:28 +0100 Subject: [PATCH] Redesign - status dashboard - V DELU --- .../survey/classes/class.SurveyStatistic.php | 1032 ++++++++--------- .../surveyAnalysis/class.SurveyAnalysis.php | 2 +- .../surveyAnalysis/class.SurveyBreak.php | 249 ++-- frontend/api/api_test.php | 3 +- lang/1.php | 3 +- lang/2.php | 3 +- public/css/admin_new.css | 162 +++ resources/sass/admin_new/pages/pages.scss | 1 + .../pages/survey_analysis/page_break.scss | 25 + .../pages/survey_status/summary.scss | 224 ++++ .../pages/survey_status/survey_status.scss | 1 + 11 files changed, 1073 insertions(+), 632 deletions(-) create mode 100644 resources/sass/admin_new/pages/survey_status/summary.scss create mode 100644 resources/sass/admin_new/pages/survey_status/survey_status.scss diff --git a/admin/survey/classes/class.SurveyStatistic.php b/admin/survey/classes/class.SurveyStatistic.php index 71fc59805..63adaa268 100644 --- a/admin/survey/classes/class.SurveyStatistic.php +++ b/admin/survey/classes/class.SurveyStatistic.php @@ -727,34 +727,39 @@ class SurveyStatistic { $_sql_string = "SELECT DATE_FORMAT(dashboard_update_time,'%d.%m.%Y %H:%i:%s') FROM srv_data_files WHERE sid = '".$this->surveyId."'"; $_sql_qry = sisplet_query($_sql_string); list($dashboard_update_time) = mysqli_fetch_row($_sql_qry); - echo ''.$lang['srv_dashboard_updated'].$dashboard_update_time.''; - - #preberemo podatke o datoteki - echo $SDF->getDataFileInfo(); - + + echo '
'; + echo ' '.$lang['srv_dashboard_updated'].$dashboard_update_time.''; + echo $SDF->getDataFileInfo(); + echo '
'; + # preberemo cache file in ga zehamo echo $this->ReadCacheFile(); } else { $dashboard_update_time = date("d.m.Y, H:i:s"); - echo ''.$lang['srv_dashboard_updated'].$dashboard_update_time.''; + + echo '
'; + echo ' '.$lang['srv_dashboard_updated'].$dashboard_update_time.''; #preberemo podatke o datoteki echo $SDF->getDataFileInfo(); // Ce ne zbiramo parapodatkov casov resevanja izpisemo opozorilo if($paradata_date == 1) - echo '

'.$lang['srv_dashboard_paradata_date_warning'].''; + echo ''.$lang['srv_dashboard_paradata_date_warning'].''; // Prikazemo filter na datum ce je vklopljen if (SurveyTimeProfiles::getCurentProfileId() != STP_DEFAULT_PROFILE){ - echo '

'; echo '
'; SurveyTimeProfiles :: printIsDefaultProfile(); echo '
'; } + echo '
'; + + # Cache file ne obstaja. Če imamo privzete nastavitve vseh filtrov, shranimo prikazan html v datoteko # spodnje ehote shranimo v spremenljivko ki jo popotrebi keširanja shranimo v datoteko. @@ -774,19 +779,15 @@ class SurveyStatistic { $row_all_users = mysqli_fetch_assoc($qry_all_users); $allUserCount = $row_all_users['user_count']; + + echo '
'; + // nimamo še vnosov if ($allUserCount == 0 || $paradata_date == 1) { - // zgornji boxi - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; - echo '
'."\n"; - $this -> DisplayInfoView(); + echo '
'; + $this->DisplayInfoView(); echo '
'; - echo '
'; } // imamo vnose, prikažemo statistiko else { @@ -794,57 +795,45 @@ class SurveyStatistic { $this->PrepareDateView(); $this->PrepareStatusView(); - echo ''; - echo ''; - - // zgornji boxi - echo ''; - - echo ''; - - echo ''; - echo ''; - - // spodnji boxi - echo ''; - echo ''; - - echo ''; - - echo ''; - echo ''; - echo '
'; - echo '
'."\n"; - $this -> DisplayInfoView(); - echo '
'; - echo '
'; - echo '
'."\n"; - $this -> DisplayStatusView(); - echo '
'; - echo '
'; - echo '
'."\n"; - $this -> DisplayAnswerStateView(); - echo '
'; - echo '
'; - echo '
'; - $this -> DisplayReferalsView(); - echo '
'; - echo '
'; - echo '
'; - echo ''.$lang['srv_statistic_timeline_title'].''.Help :: display('srv_statistic_timeline_title'); - $this -> DisplayFilters(); - echo '
'; - echo '
'."\n"; - $this -> DisplayDateView(); - echo '
'; - echo '
'; - echo '
'; - echo '
'; - $this -> DisplayPagesStateView(); - echo '
'; - echo '
'; + echo '
'; + $this->DisplayInfoView(); + echo '
'; + + + echo '
'; + $this->DisplayStatusView(); + echo '
'; + + + echo '
'; + $this->DisplayAnswerStateView(); + echo '
'; + + + echo '
'; + $this->DisplayReferalsView(); + echo '
'; + + + echo '
'; + echo '
'.$lang['srv_statistic_timeline_title'].' '.Help :: display('srv_statistic_timeline_title').'
'; + $this->DisplayFilters(); + + echo '
'; + $this->DisplayDateView(); + echo '
'; + + echo '
'; + + + echo '
'; + $this->DisplayPagesStateView(); + echo '
'; } + + echo '
'; + # HTML zapišemo v spremenljivko @@ -865,16 +854,13 @@ class SurveyStatistic { $timestamp = (int)$time1 + (int)$time2; - $this->WriteToCacheFile($dashboardHtml,$timestamp); + $this->WriteToCacheFile($dashboardHtml, $timestamp); } + # izpišemo HTML v browser echo $dashboardHtml; } - - echo '
'; - echo ''; - echo ''; - + $dashboardHtml = null; } @@ -885,20 +871,24 @@ class SurveyStatistic { global $lang; global $site_url; - echo '
'.$lang['srv_statistic_info_title'].Help :: display('srv_statistic_info_title').'

'; + echo '
'.$lang['srv_statistic_info_title'].Help :: display('srv_statistic_info_title').'
'; - echo ''; + echo '
'; echo ''; # ime ankete - echo ''; + echo ''; echo ''; + + + #opomba if (SurveyInfo::getSurveyInfo()) { - #opomba + // prikažemo 30 znakov na mouseover pa kompletno echo ''; - # vprašanj, variabel + + # vprašanj, variabel echo ''; - # stevilo strani + + # stevilo strani echo ''; - # uporabnikov, odgovorov + + # uporabnikov, odgovorov echo ''; - # jezik izpolnjevanja + + # jezik izpolnjevanja echo ''; - # autor + + # autor echo ''; - # spreminjal + + # spreminjal echo ''; } - # aktivnost + + # aktivnost $activity = SurveyInfo:: getSurveyActivity(); $_last_active = end($activity); echo ''; + # trajanje: datumi aktivnosti if ( count($activity) > 0 ) { echo ''; } - # predviceni cas trajanja enkete $sas = new SurveyAdminSettings(); $skupni_cas = $sas->testiranje_cas(1); @@ -1072,7 +1070,6 @@ class SurveyStatistic { echo ''; - //VNOSI - pvi / zadnji vnos $prvi_vnos_date = SurveyInfo::getSurveyFirstEntryDate(); $prvi_vnos_time = SurveyInfo::getSurveyFirstEntryTime(); @@ -1081,33 +1078,20 @@ class SurveyStatistic { if ($prvi_vnos_date != null) { echo ''; + echo ''; } if ($zadnji_vnos_date != null) { - echo ''; } -/* - #linki - urejanje - echo ''; - - #linki - povezave - - */ - list($commentsAll,$commentsUnresolved,$commentsQuestionAll,$commentsQuestionUnresolved,$commentsUser,$commentsUserFinished,$commentsUserSurveyAll,$commentsUserSurveyUnresolved) = $this->comments; @@ -1152,22 +1136,171 @@ class SurveyStatistic { echo '
'; + echo '
'; echo $lang['srv_info_name'].':'; echo ''; echo htmlentities(SurveyInfo::getSurveyTitle(), ENT_QUOTES, "UTF-8"); echo '
'; echo $lang['srv_info_note'].':'; @@ -944,7 +934,8 @@ class SurveyStatistic { echo ''; echo $lang['srv_vrsta_survey_type_'.(SurveyInfo::getSurveyType()>2 ? 2 : SurveyInfo::getSurveyType())] . ($enabled_advanced != null ? ' ('.$enabled_advanced.')' : '' ); echo '
'; echo $lang['srv_info_questions']. ':'; echo ''; @@ -954,13 +945,15 @@ class SurveyStatistic { echo ''; echo SurveyInfo::getSurveyVariableCount(); echo '
'; echo $lang['srv_info_pages']. ':'; echo ''; echo SurveyInfo::getSurveyGroupCount(); echo '
'; echo $lang['srv_analiza_stUporabnikov']. ':'; echo ''; @@ -970,13 +963,15 @@ class SurveyStatistic { echo ''; echo SurveyInfo::getSurveyApropriateAnswersCount(); echo '
'; echo $lang['srv_info_language']. ':'; echo ''; echo SurveyInfo::getRespondentLanguage(); echo '
'; echo $lang['srv_info_creator']. ':'; echo ''; @@ -986,7 +981,8 @@ class SurveyStatistic { if (SurveyInfo::getSurveyInsertTime() && SurveyInfo::getSurveyInsertTime() != "00:00:00") echo SurveyInfo::getDateTimeSeperator() . $this->dateFormat(SurveyInfo::getSurveyInsertTime(),TIME_FORMAT_SHORT); echo '
'; echo $lang['srv_info_modify']. ':'; echo ''; @@ -1012,26 +1008,29 @@ class SurveyStatistic { echo '
'; echo $lang['srv_displaydata_status']. ':'; echo ''; if (SurveyInfo::getSurveyColumn('active') == 1) { - echo ''.$lang['srv_anketa_active2'].''; - } else { + echo ''.$lang['srv_anketa_active2'].''; + } + else { # preverimo ali je bila anketa že aktivirana if (!isset($_last_active['starts'])) { # anketa še sploh ni bila aktivirana - echo ''.$lang['srv_survey_non_active_notActivated'].''; - } else { + echo ''.$lang['srv_survey_non_active_notActivated'].''; + } + else { # anketa je že bila aktivirna ampak je sedaj neaktivna - echo ''.$lang['srv_survey_non_active'].''; + echo ''.$lang['srv_survey_non_active'].''; } } - echo '
'; @@ -1050,7 +1049,6 @@ class SurveyStatistic { echo '
'; echo $lang['srv_info_first_entry']. ':'; - echo ''; + echo ''; echo $this->dateFormat($prvi_vnos_date,DATE_FORMAT_SHORT); echo $prvi_vnos_time != null ? (SurveyInfo::$dateTimeSeperator .$this->dateFormat($prvi_vnos_time,TIME_FORMAT_SHORT)) : ''; - echo '
'; + echo '
'; echo $lang['srv_info_last_entry']. ':'; - echo ''; + echo ''; echo $this->dateFormat($zadnji_vnos_date,DATE_FORMAT_SHORT); echo $zadnji_vnos_time != null ? (SurveyInfo::$dateTimeSeperator .$this->dateFormat($zadnji_vnos_time,TIME_FORMAT_SHORT)) : ''; echo'
'; - echo $lang['srv_stat_edit'] . ':'; - echo ''; - echo '' . $lang['srv_stat_edit_survey'] . ','; - echo ' '.$lang['comments'].''; - echo '
'; } + /** Funkcija prikaže statuse + * KONČNI STATUSI + */ + function DisplayStatusView() { + global $lang; + + echo '
'; + echo $lang['srv_statistic_status_title'].' '.Help :: display('srv_statistic_status_title'); + echo '
'; + + echo '
'; + echo ' hideNullValues_status ? ' checked="checked"' : '').' autocomplete="off">'; + echo ' '; + echo '
'; + + + $cntValid = 0; // da vemo ali izpisemo skupne + $cntNonValid = 0; // da vemo ali izpisemo skupne + $cntInvitation = 0; // da vemo ali izpisemo skupne + + + echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; + + + foreach ($this->appropriateStatus as $status) { + if (!($this->hideNullValues_status && $this->userByStatus['valid'][$status] == 0)) {// da ne delamo po neporebnem + echo ''; + echo ''; + echo ''; + echo ''; + + $cntValid++; + } + } + // vsota vlejavnih + if ($cntValid > 0 || !$this->hideNullValues_status) { + echo ''; + echo ''; + echo ''; + echo ''; + } + + // izpišemo še neveljavne + foreach ($this->unAppropriateStatus as $status) { + if (!($this->hideNullValues_status && $this->userByStatus['nonvalid'][$status] == 0)) {// da ne delamo po neporebnem + + echo ''; + + echo ''; + echo ''; + + echo ''; + + $cntNonValid++; + } + } + + // vsota nevlejavnih + if ($cntNonValid > 0 || !$this->hideNullValues_status) { + echo ''; + echo ''; + echo ''; + echo ''; + } + + // Klikov na povezavo + SurveySetting::getInstance()->setSID($this->surveyId); + $view_count = SurveySetting::getInstance()->getSurveyMiscSetting('view_count'); + if ($view_count == "") $view_count = 0; + if ($view_count > 0 || !$this->hideNullValues_status){ + echo ''; + echo ''; + echo ''; + echo ''; + } + + // Vsota anketiranih + echo ''; + echo ''; + echo ''; + echo ''; + + // Testni + if ((int)$this->testDataCount > 0) { + echo ''; + echo ''; + echo ''; + echo ''; + } + + + # preštejemo še neposlana vabila + $str = "SELECT count(*) FROM srv_invitations_recipients WHERE ank_id='".$this->getSurveyId()."' AND sent='0' AND deleted='0'"; + + $qry = sisplet_query($str); + list($cntUnsent) = mysqli_fetch_row($qry); + $this->userByStatus['invitation'][0] = (int)$cntUnsent; + + # še email vabila + // ker izpade čudno, statusov email neposlan + if (count(array_filter($this->userByStatus['invitation'])) > 0 || !$this->hideNullValues_status){ + + echo ''; + echo ''; + echo ''; + + foreach ($this->invitationStatus as $status){ + + if (!($this->hideNullValues_status && $this->userByStatus['invitation'][$status] == 0)) {// da ne delamo po neporebnem + echo ''; + echo ''; + echo ''; + echo ''; + + $cntInvitation++; + } + } + } + + // vsota emaili + if ($cntInvitation > 0 || !$this->hideNullValues_status) { + echo ''; + echo ''; + echo ''; + echo ''; + } + + + // Vsota vseh + echo ''; + echo ''; + echo ''; + echo ''; + + echo '
'.$lang['srv_statistic_metric'].''.$lang['srv_statistic_answer_state_frequency'].'
'. $lang['srv_userstatus_'.$status] . ' ('.$status.')'. $this->userByStatus['valid'][$status].'
'.$lang['srv_statistic_redirection_sum_valid'].''.($this->cntUserByStatus['valid']).'
' . $lang['srv_userstatus_'.$status] . ' ('.$status.')' . $this->userByStatus['nonvalid'][$status] + . ( ( $index <= 2 && $this->userByStatus['valid'][$status] > 0 ) + ? ' '.$lang['srv_statistic_detail'].'' + : '').'
'.$lang['srv_statistic_redirection_sum_nonvalid'].''.($this->cntUserByStatus['nonvalid']).'
'.$lang['srv_statistic_redirection_sum_view'].''.($view_count).'
'.$lang['srv_statistic_redirection_sum_surveyed'].''.($this->cntUserByStatus['valid']+$this->cntUserByStatus['nonvalid']).'
('.$lang['srv_statistic_redirection_test'].')'.((int)$this->testDataCount).'
'.$lang['srv_statistic_nonsurveyed_title'].'
'.$lang['srv_statistic_email_status_'.$status].' ('.$status.')'.$this->userByStatus['invitation'][$status].'
'.$lang['srv_statistic_sum2'].''.($this->cntUserByStatus['invitation']).'
'.$lang['srv_statistic_sum_all'].''.($this->cntUserByStatus['valid']+$this->cntUserByStatus['nonvalid']+$this->cntUserByStatus['invitation']).'
'; + } + /** Funkcija prikaže statuse odgovorov * */ - function DisplayAnswerStateView() { + function DisplayAnswerStateView() { global $lang; if ($this->emailInvitation == 1) { $order = array('email','3ll','4ll','5ll',5,6); - } else { + } + else { $order = array('3ll','4ll','5ll',5,6); } + if(true) { $this->realUsersByStatus[0]['cnt'] = $this->cntUserByStatus['invitation']; } - echo '
'.$lang['srv_statistic_answer_state_title'].''.Help :: display('srv_statistic_answer_state_title'); - echo '
'; + + + echo '
'.$lang['srv_statistic_answer_state_title'].' '.Help :: display('srv_statistic_answer_state_title').'
'; + echo '
'.$lang['srv_statistic_answer_state_base'].': '; echo ''; echo '
'; - echo '
'; - echo '
'; - echo ''; - echo ''; - foreach ($order as $key) { + + echo '
'.$lang['srv_statistic_answer_state_status'].''.$lang['srv_statistic_answer_state_frequency'].''.$lang['srv_statistic_answer_state_percent'].'
'; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + foreach ($order as $key) { + if ($this->realUsersByStatus_base == $key) { $base_found = true; } - echo ''; + + echo ''; + + echo ''; + #frekvenca echo ''; - #procenti - ; + + #procenti echo ''; - echo ''; + + echo ''; } + echo '
'.$lang['srv_statistic_answer_state_status'].''.$lang['srv_statistic_answer_state_frequency'].''.$lang['srv_statistic_answer_state_percent'].'
'.$lang['srv_userstatus_'.$key].'
'.$lang['srv_userstatus_'.$key].''.($this->realUsersByStatus[$key]['cnt'] > 0 ? $this->realUsersByStatus[$key]['cnt'] : '0').''; - #echo ( (float)$this->realUsersByStatus[$key]['percent'] > 1.0) echo ( $base_found == false) ? '--' : $this->formatNumber($this->realUsersByStatus[$key]['percent']*100,NUM_DIGIT_PERCENT,'%'); echo '
'; - - - echo '
'; - + // Uporabnost respondentov $sur = new SurveyUsableResp($this->surveyId, $generateDatafile=false); - if(!$sur->hasDataFile()) - echo '
'; -// echo $lang['srv_dashboard_no_file'].'

'; - else{ + if($sur->hasDataFile()){ $usability = $sur->calculateData(); echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; echo ''; if($usability['all'] > 0) echo ''; @@ -1223,7 +1366,8 @@ class SurveyStatistic { echo ''; echo ''; - echo ''; + echo ''; + echo ''; echo ''; if($usability['all'] > 0) echo ''; @@ -1231,7 +1375,7 @@ class SurveyStatistic { echo ''; echo ''; - echo ''; + echo ''; echo ''; if($usability['all'] > 0) echo ''; @@ -1240,10 +1384,9 @@ class SurveyStatistic { echo ''; echo '
'.$lang['srv_statistic_answer_state_usability'].' ('.$sur->bottom_usable_limit.'%/'.$sur->top_usable_limit.'%)'./*$lang['srv_statistic_answer_state_frequency'].*/''./*$lang['srv_statistic_answer_state_percent'].*/'
'.$lang['srv_usableResp_usable_unit'].'
'.$lang['srv_statistic_answer_state_usability'].' ('.$sur->bottom_usable_limit.'%/'.$sur->top_usable_limit.'%)
'.$lang['srv_usableResp_usable_unit'].''.$usability['usable'].''.$this->formatNumber($usability['usable']/$usability['all']*100, NUM_DIGIT_PERCENT, '%').''.$this->formatNumber(0, NUM_DIGIT_PERCENT, '%').'
'.$lang['srv_usableResp_partusable_unit'].'
'.$lang['srv_usableResp_partusable_unit'].''.$usability['partusable'].''.$this->formatNumber($usability['partusable']/$usability['all']*100, NUM_DIGIT_PERCENT, '%').''.$this->formatNumber(0, NUM_DIGIT_PERCENT, '%').'
'.$lang['srv_usableResp_unusable_unit'].'
'.$lang['srv_usableResp_unusable_unit'].''.$usability['unusable'].''.$this->formatNumber($usability['unusable']/$usability['all']*100, NUM_DIGIT_PERCENT, '%').'
'; - - echo '
'; } + // Breakoffi $status3 = (isset($this->userByStatus['nonvalid']['3'])) ? $this->userByStatus['nonvalid']['3'] : 0; $status4 = (isset($this->userByStatus['nonvalid']['4'])) ? $this->userByStatus['nonvalid']['4'] : 0; @@ -1251,13 +1394,20 @@ class SurveyStatistic { $status5l = (isset($this->userByStatus['nonvalid']['5l'])) ? $this->userByStatus['nonvalid']['5l'] : 0; $status6 = (isset($this->userByStatus['valid']['6'])) ? $this->userByStatus['valid']['6'] : 0; $all = (isset($this->realUsersByStatus['3ll']['cnt'])) ? $this->realUsersByStatus['3ll']['cnt'] : 0; - if($all > 0){ + + if($all > 0){ + echo ''; - echo ''; + + echo ''; + echo ''; + echo ''; + echo ''; $introBreakoff = $status3 + $status4; $introBreakoffPercent = $introBreakoff / $all; - echo ''; + echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -1266,14 +1416,16 @@ class SurveyStatistic { $qBreakoffPercent = $qBreakoff / $all; if(($all - $status3 - $status4) > 0) $qBreakoffNeto = $qBreakoff / ($all - $status3 - $status4); - echo ''; + echo ''; + echo ''; echo ''; echo ''; echo ''; $totalBreakoff = $status3 + $status4 + $status5 + $status5l; $totalBreakoffPercent = $totalBreakoff / $all; - echo ''; + echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -1368,233 +1520,131 @@ class SurveyStatistic { } return $json_array; - } - - /** Funkcija prikaže statuse - * KONČNI STATUSI - */ - function DisplayStatusView() { - global $lang; - - echo ''.$lang['srv_statistic_status_title'].Help :: display('srv_statistic_status_title'); - echo ''; - - echo ''; - echo $lang['srv_statistic_hide_null']; - echo 'hideNullValues_status ? ' checked="checked"' : '').' autocomplete="off">'; - echo ''; - - echo '

'; - - $cntValid = 0; // da vemo ali izpisemo skupne - $cntNonValid = 0; // da vemo ali izpisemo skupne - $cntInvitation = 0; // da vemo ali izpisemo skupne - foreach ($this->appropriateStatus as $status) { - if (!($this->hideNullValues_status && $this->userByStatus['valid'][$status] == 0)) {// da ne delamo po neporebnem - echo '' . $lang['srv_userstatus_'.$status] . ' ('.$status.') :' . $this->userByStatus['valid'][$status].'
'; - $cntValid++; - } - } - // vsota vlejavnih - if ($cntValid > 0 || !$this->hideNullValues_status) { - echo '
'.$lang['srv_statistic_redirection_sum_valid'].''.($this->cntUserByStatus['valid']).'

'; - } - - // izpišemo še neveljavne - foreach ($this->unAppropriateStatus as $status) { - if (!($this->hideNullValues_status && $this->userByStatus['nonvalid'][$status] == 0)) {// da ne delamo po neporebnem - echo '' . $lang['srv_userstatus_'.$status] . ' ('.$status.') :' . $this->userByStatus['nonvalid'][$status] - . ( ( $index <= 2 && $this->userByStatus['valid'][$status] > 0 ) - ? ' '.$lang['srv_statistic_detail'].'' - : '') - . '
'; - $cntNonValid++; - } - } - // se status null (neznan status) - /*if (!($this->hideNullValues_status && $this->userByStatus['nonvalid'][-1] == 0)) {// da ne delamo po neporebnem - echo '' . $lang['srv_userstatus_null'] . ' (null) :' . (isset($this->userByStatus['nonvalid'][-1]) ? $this->userByStatus['nonvalid'][-1] : '0') . '
'; - $cntNonValid++; - }*/ - - // vsota nevlejavnih - if ($cntNonValid > 0 || !$this->hideNullValues_status) { - echo '
'.$lang['srv_statistic_redirection_sum_nonvalid'].''.($this->cntUserByStatus['nonvalid']).'

'; - } - - // Klikov na povezavo - SurveySetting::getInstance()->setSID($this->surveyId); - $view_count = SurveySetting::getInstance()->getSurveyMiscSetting('view_count'); - if ($view_count == "") $view_count = 0; - if ($view_count > 0 || !$this->hideNullValues_status) - echo '
'.$lang['srv_statistic_redirection_sum_view'].''.($view_count).'

'; - - // Vsota anketiranih - echo '
'.$lang['srv_statistic_redirection_sum_surveyed'].''.($this->cntUserByStatus['valid']+$this->cntUserByStatus['nonvalid']).'
'; - // Testni - if ((int)$this->testDataCount > 0) { - echo '
('.$lang['srv_statistic_redirection_test'].')'.((int)$this->testDataCount).'
'; - } - - echo '
'; - - - # preštejemo še neposlana vabila - $str = "SELECT count(*) FROM srv_invitations_recipients WHERE ank_id='".$this->getSurveyId()."' AND sent='0' AND deleted='0'"; - - $qry = sisplet_query($str); - list($cntUnsent) = mysqli_fetch_row($qry); - $this->userByStatus['invitation'][0] = (int)$cntUnsent; - - # še email vabila - // ker izpade čudno, statusov email neposlan - if (count(array_filter($this->userByStatus['invitation'])) > 0 || !$this->hideNullValues_status){ - - echo ''.$lang['srv_statistic_nonsurveyed_title']; - echo ''; - echo '
'; - - foreach ($this->invitationStatus as $status) - { - if (!($this->hideNullValues_status && $this->userByStatus['invitation'][$status] == 0)) {// da ne delamo po neporebnem - echo '' . $lang['srv_statistic_email_status_'.$status] . ' ('.$status.') :' . $this->userByStatus['invitation'][$status] - #. ( ( $status <= 2 && $this->userByStatus['invitation'][$status] > 0 ) - # ? ' '.$lang['srv_statistic_detail'].'' - # : '') - . '
'; - $cntInvitation++; - } - } - } - - // vsota emaili - if ($cntInvitation > 0 || !$this->hideNullValues_status) { - echo '
'.$lang['srv_statistic_sum2'].''.($this->cntUserByStatus['invitation']).'

'; - } - - - // Vsota vseh - echo '
'.$lang['srv_statistic_sum_all'].''.($this->cntUserByStatus['valid']+$this->cntUserByStatus['nonvalid']+$this->cntUserByStatus['invitation']).'
'; - } - + } + /** Funkcija za prikaz referalov * #KLIK NA ANKETO# * #PREUSMERITVE# */ - function DisplayReferalsView() { + function DisplayReferalsView() { global $lang; global $admin_type; - echo '
'.$lang['srv_statistic_redirection_title'].''.Help :: display('srv_statistic_redirection_title').'
'; + echo '
'.$lang['srv_statistic_redirection_title'].' '.Help :: display('srv_statistic_redirection_title').'
'; // izrisemo graf if ( ( $this->cntValidRedirections + $this->cntNonValidRedirections ) > 0) { $maxValue = $this->maxRedirection * GRAPH_REDUCE; $value_sum = 0; - echo '
'.$lang['srv_statistic_answer_state_breakoff'].''./*$lang['srv_statistic_answer_state_frequency'].*/''./*$lang['srv_statistic_answer_state_percent'].*/'
'.$lang['srv_statistic_answer_state_breakoff'].'
'.$lang['srv_statistic_answer_state_breakoff_1'].'
'.$lang['srv_statistic_answer_state_breakoff_1'].''.$introBreakoff.''.$this->formatNumber($introBreakoffPercent*100, NUM_DIGIT_PERCENT, '%').'
'.$lang['srv_statistic_answer_state_breakoff_2'].'
'.$lang['srv_statistic_answer_state_breakoff_2'].''.$qBreakoff.''.$this->formatNumber($qBreakoffPercent*100, NUM_DIGIT_PERCENT, '%').' (neto '.$this->formatNumber($qBreakoffNeto*100, NUM_DIGIT_PERCENT, '%').')
'.$lang['srv_statistic_answer_state_breakoff_3'].'
'.$lang['srv_statistic_answer_state_breakoff_3'].''.$totalBreakoff.''.$this->formatNumber($totalBreakoffPercent*100, NUM_DIGIT_PERCENT, '%').'
'."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo '
' . $lang['srv_statistic_redirection_site'] . ''.$lang['srv_statistic_redirection_click'].'
'; + + echo ''; + echo ''; + echo ''; + echo ''; if (count($this->userRedirections["valid"])) { foreach ($this->userRedirections["valid"] as $key => $value) { if ($key == 'email') { - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; + $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; } else { - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; + $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; } $value_sum += $value; } } + // dodamo še direktni link if ($this->userRedirections["direct"] > 0) { $value = $this->userRedirections["direct"]; - echo ''."\n"; - echo ''."\n"; + + echo ''; + + echo ''; + $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; + $value_sum += $value; - } + } + // dodamo še email klik - // @Uros to je identicno, kot zgoraj v foreach, na koncu se gleda rezultat iz valid...se to sploh rabi? + // @Uros to je identicno, kot zgoraj v foreach, na koncu se gleda rezultat iz valid...se to sploh rabi? if ($this->userRedirections["email"] > 0) { $value = $this->userRedirections["email"]; - echo ''."\n"; - echo ''."\n"; + + echo ''; + + echo ''; + $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; + $value_sum += $value; } + // dodamo sumo - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + echo ''; - /* - // dodamo se neveljavne - $value_sum_nonvalid = 0; - for ($key = 2; $key >= 0; $key--) { - $value = $this->userRedirections["$key"]; - if ($value > 0) { - echo ''."\n"; - echo ''."\n"; - $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; - $value_sum_nonvalid += $value; - } - } - // dodamo sumo - if ($value_sum_nonvalid > 0 ) { - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - } - */ if (!($value_sum_nonvalid == 0 || $value_sum == 0 )) { - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; } - echo '
'.$lang['srv_statistic_redirection_site'].''.$lang['srv_statistic_redirection_click'].'
' . $lang['srv_statistic_redirection_email'] . '
' . $lang['srv_statistic_redirection_email'] . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $key . '
' . $key . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang['srv_statistic_redirection_direct'] . '
' . $lang['srv_statistic_redirection_direct'] . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang['srv_statistic_redirection_email'] . '
' . $lang['srv_statistic_redirection_email'] . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang['srv_statistic_redirection_sum_clicked'] . ''.$value_sum.'
 
'.$lang['srv_statistic_redirection_sum_clicked'].''.$value_sum.'
 
' . $lang['srv_statistic_redirection_email_'.$key] . '
 
'.$value.'
' . $lang['srv_statistic_redirection_sum_nonvalid'] . ''.$value_sum_nonvalid.'
 
' . $lang['srv_statistic_redirection_sum'] . ''.($value_sum+$value_sum_nonvalid).'
' . $lang['srv_statistic_redirection_sum'] . ''.($value_sum+$value_sum_nonvalid).'
'."\n"; + echo ''; - echo '
'.$lang['srv_statistic_details'].'
'; + + echo '
'; + echo ''.$lang['srv_statistic_details'].'
'; + if ($this->cntValidRedirections > 0) { echo '
'.$lang['srv_statistic_detail_referal'].'
'; - } else { + } + else { echo '
'.$lang['srv_statistic_show_no_referals'].'
'; } + echo '
'.$lang['srv_statistic_detail_IP'].'
'; } -/* - #echo '

'.$lang['srv_count_ip_list'].': '.count($this->ip_list).'

'; - echo '

'.$lang['srv_detail_ip_list'].':

'; - echo '

 '.$lang['srv_statistic_detail'].'

'; -*/ + # skrita div aza podrobnosti echo '
'; echo '
'; @@ -1603,13 +1653,13 @@ class SurveyStatistic { /** Funkcija za prikaz klikov po straneh * */ - function DisplayPagesStateView() { + function DisplayPagesStateView() { global $lang; # ali lovimo samo strani ki niso bile preskočene $grupa_jump = "AND ug.preskocena = 0 "; - echo ''.$lang['srv_statistic_pages_state_title'].''.Help :: display('srv_statistic_pages_state_title'); + echo '
'.$lang['srv_statistic_pages_state_title'].' '.Help :: display('srv_statistic_pages_state_title').'
'; // Filter po osnovi if ($this->emailInvitation == 1) { @@ -1679,66 +1729,77 @@ class SurveyStatistic { $maxValue = max($maxValue, $this->realUsersByStatus['3ll']['cnt']); $maxValue = $maxValue * GRAPH_REDUCE; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + + echo '
' . $lang['srv_statistic_answer_state_status'] . ''.$lang['srv_statistic_redirection_click'].'
'; + + echo ''; + echo ''; + echo ''; + echo ''; # status 3 - "Klik na anketo" $value = $this->realUsersByStatus['3ll']['cnt']; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; # status 4 - "Klik na prvo stran" $value = $this->realUsersByStatus['4ll']['cnt']; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; # status 5 - "Začel izpolnjevati", $value = $this->realUsersByStatus[5]['cnt']; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; #strani - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; foreach ($pages as $key => $page) { $value = $page['cnt']; - echo ''."\n"; - //echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $value) ? (round($value / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; } #strani - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; # status 6 - "Koncal", $value6 = $this->realUsersByStatus[6]['cnt']; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $value6) ? (round($value6/ $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; #če imamo lurkerje 6l dodamo skupaj konačal anketo (to je 6 + 6l) in nato še koliko jih je samo s statusom 6 (končal anketo) # status 6l - "Koncal - lurker", izpišemo samo če obstajajo 6l @@ -1747,28 +1808,32 @@ class SurveyStatistic { $valueall = $this->realUsersByStatus['6ll']['cnt'] ; # končal s tem da je lurker (6l) - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $lurkerjev) ? (round($lurkerjev / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; #črta - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; # končal ne glede na to ali je lurker - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; $width = ($maxValue && $valueall) ? (round($valueall / $maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; } - echo '
'.$lang['srv_statistic_answer_state_status'].''.$lang['srv_statistic_redirection_click'].'
' . $lang['srv_userstatus_3'] . '
' . $lang['srv_userstatus_3'] . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang['srv_userstatus_4'] . '
' . $lang['srv_userstatus_4'] . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang['srv_userstatus_5'] . '
' . $lang['srv_userstatus_5'] . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang[''] . ''.$lang[' '].'
' . $page['naslov'] . '' . $lang['srv_stran'].' '.$page['vrstni_red']. '
' . $lang['srv_stran'].' '.$page['vrstni_red']. '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang[''] . ''.$lang[' '].'
' . $lang['srv_userstatus_6'] . '
' . $lang['srv_userstatus_6'] . '
 
'.$value6.'
 
'; + echo ''.$value6.''; + echo '
' . $lang['srv_userstatus_6l'].'' . '
' . $lang['srv_userstatus_6l'].'' . '
 
'.$lurkerjev.'
 
'; + echo ''.$lurkerjev.''; + echo '
' . $lang[''] . ''.$lang[' '].'
' . $lang['srv_userstatus_all'] . '
' . $lang['srv_userstatus_all'] . '
 
'.$valueall.'
 
'; + echo ''.$valueall.''; + echo '
'."\n"; + echo ''; } /** Funkcija za prikaz seznam referalov @@ -1785,7 +1850,7 @@ class SurveyStatistic { } } - echo '
'.$lang['srv_statistic_referals_list'].Help :: display('srv_statistic_referals_list').'
'; + echo '
'.$lang['srv_statistic_referals_list'].' '.Help :: display('srv_statistic_referals_list').'
'; // še podatke o uporabniku $sql_userInfo = sisplet_query("SELECT referer, COUNT(*) as cnt FROM srv_user WHERE ank_id = '".$this->getSurveyId()."' AND preview = '0' AND deleted='0' AND time_insert BETWEEN '".$this->startDate."' AND '".$this->endDate."' + INTERVAL 1 ".$email_filter_string ." DAY GROUP BY referer"); @@ -1801,7 +1866,8 @@ class SurveyStatistic { } } echo ''; - } else { + } + else { echo $lang['srv_statistic_show_no_referals']; } } @@ -1824,9 +1890,9 @@ class SurveyStatistic { $string_sql = "SELECT COUNT(id) AS count, ip FROM srv_user WHERE ank_id='".$this->getSurveyId()."' AND preview = '0' AND deleted='0' AND (time_insert BETWEEN '".$this->startDate."' AND '".$this->endDate."' + INTERVAL 1 DAY) ".$email_filter_string." GROUP BY ip ORDER BY count DESC, ip ASC"; $sql = sisplet_query($string_sql); - echo '
'.$lang['srv_statistic_IP_list'].Help :: display('srv_statistic_IP_list').'
'; - if (mysqli_num_rows($sql) > 0) { - #echo '
'.$lang[''].'
'; + echo '
'.$lang['srv_statistic_IP_list'].' '.Help :: display('srv_statistic_IP_list').'
'; + + if (mysqli_num_rows($sql) > 0) { echo ''; while ($row = mysqli_fetch_array($sql)) { @@ -1902,12 +1968,12 @@ class SurveyStatistic { // Oblika echo ''; - echo ':'."\n"; - echo ''; foreach ( $this->periods as $key => $_period) { - echo ''."\n"; + echo ''; } - echo ''."\n"; + echo ''; echo ''; } @@ -1917,25 +1983,25 @@ class SurveyStatistic { echo $lang['srv_statistic_answer_state_base'].': '; if ($this->timelineDropDownType == 0) { - echo ''; echo ''; echo ''; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; echo ''; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; - echo ''."\n"; + echo ''; } else { $order = array( @@ -1944,7 +2010,7 @@ class SurveyStatistic { '5ll'=>TYPE_STATUS_KUMULATIVE_5ll, 5=>TYPE_STATUS_KUMULATIVE_5, 6=>TYPE_STATUS_KUMULATIVE_6,); - echo ''; foreach ($order as $key => $value) { echo ''; } @@ -1961,34 +2027,39 @@ class SurveyStatistic { $this->maxValue *= GRAPH_REDUCE; $cnt=0; - echo '
'."\n"; + echo '
'; if ($this->arrayRange) { foreach ($this->arrayRange as $key => $value) { $label = $this->formatStatsString($key, $this->period); - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; + $width = ($this->maxValue && $value) ? (round($value / $this->maxValue * 100, 0)) : "0"; - echo ''."\n"; - echo ''."\n"; + echo ''; + + echo ''; $cnt+=$value; } // dodamo sumo - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''; } else { - echo ''."\n"; + echo ''; } - echo '
' . $label . '
' . $label . '
 
'.$value.'
 
'; + echo ''.$value.''; + echo '
' . $lang['srv_statistic_redirection_sum'] . ''.$cnt.'
'.$lang['srv_statistic_redirection_sum'].''.$cnt.'
'.$lang['srv_no_data'].'
'.$lang['srv_no_data'].'
'."\n"; + echo ''; } // pomozne funkcije @@ -2207,14 +2278,18 @@ class SurveyStatistic { * * @param HTML $data */ - function WriteToCacheFile($data,$timestamp) { + function WriteToCacheFile($data, $timestamp) { global $site_path; + if ($this->surveyId !== null && $data !== null && $data !== '') { + # če imamo default filtre zapišemo v datoteko; Prav tako mora bit izbran osnovni profil intervala z id = 0 if ( $this->isDefaultFilters == true) { + # nastavimo folder $folder = $site_path . EXPORT_FOLDER.'/'; $fileToUse = $folder . 'export_dashboard_'.$this->surveyId.'.html'; + # pobrišemo morebitne predhodne header datoteke ankete if (file_exists($fileToUse)) { unlink($fileToUse); @@ -2236,10 +2311,13 @@ class SurveyStatistic { */ function ReadCacheFile() { global $site_path; + if ($this->surveyId !== null) { + # nastavimo folder $folder = $site_path . EXPORT_FOLDER.'/'; $dashboardFile = null; + # prebermo fajl: foreach (glob($folder . 'export_dashboard_'.$this->surveyId.'.html') as $filesToUse) { if ( $dashboardFile == null) { @@ -2252,123 +2330,13 @@ class SurveyStatistic { $data = fread($df, filesize($dashboardFile)); fclose($df); + return $data; } + return null; } - - - /** Funkcija klice funkcije za prikaz statistike - * DisplayInfoView - prikaze panelo z osnovnimi informacijami - * DisplayStatusView - prikaze panelo z kliki po statusih - * DisplayReferalsView - prikaze panelo z redirekcijami in referali - * DisplayDataView - prikate panelo z kliki po datumih - */ - function WriteDashboardToFile($sid,$timestamp) { - - global $lang, $site_url; - if ((int)$sid > 0) { - - # spodnje ehote shranimo v spremenljivko ki jo popotrebi keširanja shranimo v datoteko. - - // preverimo ali ima anketa kakšne vnose - $str_qry_all_users = "SELECT count(u.id) AS user_count FROM srv_user AS u " . "WHERE u.ank_id = '".$this->getSurveyId()."' AND preview = '0' AND deleted='0' "; - $qry_all_users = sisplet_query($str_qry_all_users); - $row_all_users = mysqli_fetch_assoc($qry_all_users); - $allUserCount = $row_all_users['user_count']; - - ob_start(); - - #echo '
'.$lang['srv_dashboard_updated'].date("d.m.Y, H:i").'
'; - - if ($allUserCount == 0) { // nimamo še vnosov - - // zgornji boxi - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; - echo '
'."\n"; - $this -> DisplayInfoView(); - echo '
'; - echo '
'; - - // 1) če ankete še nima nobenega klika, naj se pri poročilu ne prikaže nobena od šestih analiza, - // ampak naj pise: Anketa nima še nobenega vnosa« zreaven naj bo v SIVEM zavihka UREJANJE - // 2) Če nima anketa nobenega klika in ni niti aktivirana, pa napisite: - // Anketa še ni aktivvirajna. Zraven naj bo sta siva zavihkja Urejanje vprašalnika in Objave&vabila - - - } else { - - // imamo vnose, prikažemo statistiko - $this->PrepareDateView(); - $this->PrepareStatusView(); - - echo ''; - echo ''; - - // zgornji boxi - echo ''; - - echo ''; - - echo ''; - echo ''; - - // spodnji boxi - echo ''; - echo ''; - - echo ''; - - echo ''; - - echo ''; - echo '
'; - echo '
'."\n"; - $this -> DisplayInfoView(); - echo '
'; - echo '
'; - echo '
'."\n"; - $this -> DisplayStatusView(); - echo '
'; - echo '
'; - echo '
'."\n"; - $this -> DisplayAnswerStateView(); - echo '
'; - echo '
'; - echo '
'; - $this -> DisplayReferalsView(); - echo '
'; - echo '
'; - echo '
'; - echo ''.$lang['srv_statistic_timeline_title'].''.Help :: display('srv_statistic_timeline_title'); - echo '
'."\n"; - // echo '
'."\n"; - $this -> DisplayFilters(); - // echo '
'; - echo '
'; - echo '
'; - - echo '
'."\n"; - $this -> DisplayDateView(); - echo '
'; - echo '
'; - echo '
'; - echo '
'; - $this -> DisplayPagesStateView(); - echo '
'; - echo '
'; - } - - # HTML zapišemo v spremenljivko - $dashboardHtml = ob_get_clean(); - $this->WriteToCacheFile($dashboardHtml,$timestamp); - } - } - + function changeInvitationFilter() { $this->emailInvitationFilter($_POST['filter_email_status']); } @@ -2427,7 +2395,7 @@ class SurveyStatistic { // zgornji boxi echo ''; - echo '
'."\n"; + echo '
'; { $lang_array = array(); @@ -2438,13 +2406,20 @@ class SurveyStatistic { $lang_array[$rowl['lang_id']] = $rowl['language']; } - echo ''.$lang['srv_statistic_lang_title'].''; - echo '
'; + echo '
'.$lang['srv_statistic_lang_title'].'
'; + + echo ''; - echo ''; - foreach ($this->respondentLangArray as $key => $cnt) { + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + foreach ($this->respondentLangArray as $key => $cnt) { $allCnt+=$cnt; - echo ''; + echo ''; #frekvenca echo ''; #procenti @@ -2456,10 +2431,13 @@ class SurveyStatistic { echo ''; echo ''; } - echo ''; - #frekvenca + + echo ''; + + #frekvenca echo ''; - #procenti + + #procenti echo ''; echo ''; + echo '
'.$lang['srv_statistic_lang'].''.$lang['srv_statistic_answer_state_frequency'].''.$lang['srv_statistic_answer_state_percent'].'
'.$lang['srv_statistic_lang'].''.$lang['srv_statistic_answer_state_frequency'].''.$lang['srv_statistic_answer_state_percent'].'
'.$lang_array[$key].'
'.$lang_array[$key].''.(int)$cnt.'
'.$lang['srv_statistic_sum'].'
'.$lang['srv_statistic_sum'].''.(int)$allCnt.''; $percent = 100; echo $this->formatNumber((int)$percent,NUM_DIGIT_PERCENT,'%'); @@ -2471,8 +2449,8 @@ class SurveyStatistic { echo ''; echo '
'; - } } ?> \ No newline at end of file diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php index a045c348f..141781e5b 100644 --- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php +++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php @@ -7556,7 +7556,7 @@ class SurveyAnalysis { if($page == 'sums'){ echo ''; //echo ''; diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php b/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php index f2913caaf..0be6e14c6 100644 --- a/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php +++ b/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php @@ -776,19 +776,21 @@ class SurveyBreak # če ni multicheck in multi grid - echo ''; + echo '
'; - echo ''; - echo ''; + + echo ''; + + echo ''; + + echo ''; + echo ''; - echo ''; + + echo ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) { foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; } } } + echo ''; - echo ''; + + + echo ''; foreach ($spremenljivka['grids'] AS $gkey => $grid) { if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) { foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; - echo ''; + echo ''; + echo ''; } } } echo ''; + + $cnt=0; foreach ($frequencys AS $fkey => $fkeyFrequency) { $cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cnt]['naslov']; $cnt++; foreach ($options AS $oKey => $option) { if ($means[$fkey][$oKey] != null || $displayAll) { - echo ''; - echo ''; + + echo ''; + + echo ''; - $css = ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) { foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; if ($variable['other'] != 1) { + #povprečja - echo ''; + echo ''; + # enote - echo ''; $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']); @@ -861,39 +874,45 @@ class SurveyBreak } } } + echo ''; } } } + + #dodamo še skupno sumo in povprečje echo ''; - echo ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) { foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; if ($variable['other'] != 1) { + #povprečja - echo ''; + # enote - echo ''; } - } } } echo ''; - echo '
'; echo ''; echo ''; echo $forSpremenljivka['naslov']; echo '('.$forSpremenljivka['variable'].')'; echo ''; echo ''; - - echo ''; - echo ''; + echo ''; echo ''; echo ''; echo $spremenljivka['naslov']; @@ -798,60 +800,71 @@ class SurveyBreak echo ' - '.$doubleGridTitle['subtitle']; } echo ''; - echo ''; + echo '
'; + echo ''; echo $variable['naslov']; echo '('.$variable['variable'].')'; - echo ''; + echo '
Povprečje'.$lang['']; - echo 'Št. enot'.$lang['']; - echo 'PovprečjeŠt. enot
'; if ($forSpremenljivka['tip'] == 2) { echo $cbxLabel; - } else { + } + else { echo $forSpremenljivka['options'][$oKey]; } echo ''; echo $this->formatNumber($means[$fkey][$oKey][$sequence],$this->num_digit_average,''); echo ''; + echo ''; echo (int)$frequencys[$fkey][$oKey][$sequence]['validCnt']; echo '
'; + + echo ''; echo 'Skupaj'; echo ''; + echo ''; $totalMean = $totalFreq[$sequence] > 0 ? $totalMeans[$sequence] / $totalFreq[$sequence] : 0; echo $this->formatNumber($totalMean ,$this->num_digit_average,''); echo ''; + echo ''; echo (int)$totalFreq[$sequence]; echo '
';//$forSpremenljivka['grids'][0]['variables'] + echo ''; echo '
'; } @@ -993,51 +1012,55 @@ class SurveyBreak # če ni multicheck in multi grid - echo ''; + echo '
'; - echo ''; - echo ''; + + echo ''; + + echo ''; + + echo ''; echo ''; - echo ''; + echo ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; } } + echo ''; - echo ''; + echo ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; - echo ''; + echo ''; + echo ''; } } + echo ''; @@ -1048,28 +1071,26 @@ class SurveyBreak echo ''; - echo ''; + echo ''; - $css = ''; foreach ($spremenljivka['grids'] AS $gkey => $grid) { foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; if ($variable['other'] != 1) { + #povprečja - echo ''; + echo ''; + # enote - echo ''; - #$totalMeans[$sequence] += ($this->getMeansFromKey($fkeyFrequency[$sequence])*(int)$frequencys[$fkey][$sequence]['validCnt']); - #$totalFreq[$sequence]+= (int)$frequencys[$fkey][$sequence]['validCnt']; - $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']); + + $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']); $totalFreq[$sequence]+= (int)$frequencys[$fkey][$oKey][$sequence]['validCnt']; } @@ -1083,12 +1104,14 @@ class SurveyBreak if ((int)$this->break_percent) { echo ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { foreach ($grid['variables'] AS $vkey => $variable) { if ($variable['other'] != 1) { + $sequence = $variable['sequence']; - echo ''; - echo ''; + foreach ($spremenljivka['grids'] AS $gkey => $grid) { foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; if ($variable['other'] != 1) { + #povprečja - echo ''; + # enote - echo ''; } @@ -1144,7 +1170,6 @@ class SurveyBreak $rowspan = ' rowspan="3"'; $colspan = ' colspan="'.(2*count($spremenljivka['grids'][0]['variables'])).'"'; - foreach ($spremenljivka['grids'] AS $gkey => $grid) { // Ce smo v porocilu po meri in ni prava tabela jo preskocimo @@ -1178,21 +1203,22 @@ class SurveyBreak echo ''; - echo '
'; echo ''; echo ''; echo $forSpremenljivka['naslov']; echo '('.$forSpremenljivka['variable'].')'; echo ''; echo ''; - - echo ''; - echo ''; + echo ''; echo ''; echo ''; echo $spremenljivka['naslov']; echo '('.$spremenljivka['variable'].')'; echo ''; echo ''; - echo ''; + echo '
'; + echo ''; echo $variable['naslov']; echo '('.$variable['variable'].')'; - echo ''; + echo '
Povprečje'.$lang['']; - echo 'Št. enot'.$lang['']; - echo 'PovprečjeŠt. enot
'; echo $forSpremenljivka['options'][$oKey]; echo ''; echo $this->formatNumber($means[$fkey][$oKey][$sequence],$this->num_digit_average,''); - #echo $this->formatNumber($means[$fkey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),''); echo ''; + echo ''; echo (int)$frequencys[$fkey][$oKey][$sequence]['validCnt']; - #echo (int)$frequencys[$fkey][$sequence]['validCnt']; echo '
'; - #echo (int)$frequencys[$fkey][$sequence]['validCnt']; + + echo ''; $percent = 0; if ($frequencys[$fkey][$sequence]['validCnt'] > 0 ) { $percent = 100; @@ -1110,21 +1133,24 @@ class SurveyBreak #dodamo še skupno sumo in povprečje echo '
'; - echo $lang[''].'Skupaj'; + echo ''; + echo 'Skupaj'; echo ''; + echo ''; $totalMean = $totalFreq[$sequence] > 0 ? $totalMeans[$sequence] / $totalFreq[$sequence] : 0; echo $this->formatNumber($totalMean ,$this->num_digit_average,''); echo ''; + echo ''; echo (int)$totalFreq[$sequence]; echo '
'; + echo '
'; + #labele - echo ''; + echo ''; - echo ''; + echo ''; - echo ''; + echo ''; echo''; #labele - echo ''; + echo ''; foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; } echo ''; - echo ''; + echo ''; foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; - echo ''; + echo ''; + echo ''; } echo ''; @@ -1233,30 +1257,38 @@ class SurveyBreak foreach ($frequencys AS $fkey => $fkeyFrequency) { $cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cnt]['naslov']; $cnt++; + foreach ($forSpremenljivka['options'] AS $oKey => $option) { if ($displayAll || $means[$fkey][$oKey] != null) { + # če je osnova checkbox vzamemo samo tam ko je 1 if(($forSpremenljivka['tip'] == 2 && $option == 1) || $forSpremenljivka['tip'] != 2 ) { - echo ''; - echo ''; + + echo ''; + + echo ''; + foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; + #povprečje - echo ''; + # enote - echo ''; + $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']); $totalFreq[$sequence]+= (int)$frequencys[$fkey][$oKey][$sequence]['validCnt']; @@ -1271,19 +1303,22 @@ class SurveyBreak #dodamo še skupno sumo in povprečje echo ''; - echo ''; + foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; if ($variable['other'] != 1) { + #povprečja - echo ''; + # enote - echo ''; } @@ -1372,20 +1407,22 @@ class SurveyBreak echo ''; - echo '
'; echo ''; echo ''; echo $forSpremenljivka['naslov']; echo '('.$forSpremenljivka['variable'].')'; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo $spremenljivka['naslov']. ' - '; @@ -1200,30 +1226,28 @@ class SurveyBreak echo '('.$grid['variable'].')'; echo ''; echo ''; - echo ''; + echo '
'; + echo ''; echo $variable['naslov']; echo '('.$variable['variable'].')'; - echo ''; + echo '
Povprečje'.$lang['']; - echo 'Št. enot'.$lang['']; - echo 'PovprečjeŠt. enot
'; if ($forSpremenljivka['tip'] == 2) { echo $cbxLabel; - } else { + } + else { echo $forSpremenljivka['options'][$oKey]; } - #echo ' ('.$oKey.')'; echo ''; + echo ''; echo $this->formatNumber($means[$fkey][$oKey][$sequence],$this->num_digit_average,''); echo ''; + echo ''; echo (int)$frequencys[$fkey][$oKey][$sequence]['validCnt']; echo '
'; + echo ''; echo 'Skupaj'; echo ''; + echo ''; $totalMean = $totalFreq[$sequence] > 0 ? $totalMeans[$sequence] / $totalFreq[$sequence] : 0; echo $this->formatNumber($totalMean ,$this->num_digit_average,''); echo ''; + echo ''; echo (int)$totalFreq[$sequence]; echo '
'; + echo '
'; + #labele - echo ''; - echo ''; + echo ''; + + echo ''; - echo ''; + echo ''; + echo''; + + #labele - echo ''; + echo ''; + foreach ($grid['variables'] AS $vkey => $variable) { - echo ''; } + echo ''; + + $cntCbx= 0; foreach ($forSequences AS $fKey => $forSequence) { $cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cntCbx]['naslov']; $cntCbx++; + foreach ($forSpremenljivka['options'] AS $oKey => $option) { if ($displayAll || $texts[$forSequence][$oKey] != null) { if(($forSpremenljivka['tip'] == 2 && $option == 1) || $forSpremenljivka['tip'] != 2 ) { + echo ''; - echo ''; + + echo ''; + foreach ($grid['variables'] AS $vkey => $variable) { $sequence = $variable['sequence']; #povprečje - echo ''; - + echo ''; } + echo ''; } } @@ -1606,16 +1653,16 @@ class SurveyBreak echo '
'; echo ''; //echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; - echo ''; + echo ''; echo '
'; diff --git a/frontend/api/api_test.php b/frontend/api/api_test.php index c86bab347..f57d01cfc 100644 --- a/frontend/api/api_test.php +++ b/frontend/api/api_test.php @@ -7,6 +7,7 @@ // Nastavimo url api-ja $api_url = 'http://localhost/FDV/frontend/api/api.php'; +$api_url = 'https://www.1ka.si/frontend/api/api.php'; // Nastavimo identifier in key userja $identifier = ''; @@ -19,7 +20,7 @@ $action = 'logout'; // Izvedemo klic (GET ali POST) -//$result = executeGET(); +$result = executeGET(); //$result = executePOST(); diff --git a/lang/1.php b/lang/1.php index b9848644a..34a76c160 100644 --- a/lang/1.php +++ b/lang/1.php @@ -3685,7 +3685,7 @@ $lang = array ( "srv_statistic_period_day_month" => "Dnevi v mesecu", "srv_statistic_period_day_week" => "Dnevi v tednu", "srv_statistic_period_hour_day" => "Ure v dnevu", - "srv_statistic_hide_null" => "Skrij 0: ", + "srv_statistic_hide_null" => "Skrij vrednosti 0", "srv_statistic_show_referals" => "Referali:", "srv_statistic_show_no_referals"=> "V bazi ni zapisov o referalih.", "srv_statistic_detail" => "(podrobnost)", @@ -3711,6 +3711,7 @@ $lang = array ( "srv_statistic_redirection_sum_view" => "Skupaj ogledov povezave", "srv_statistic_redirection_sum_invitation" => "Skupaj emaili-neodgovori", "srv_statistic_redirection_test" => "od tega testnih", + "srv_statistic_metric" => "Metrika", "srv_statistic_lang_title" => "Jezikovna različica vprašalnika", "srv_statistic_lang" => "Jezik", "srv_statistic_sum" => "Skupaj enot", diff --git a/lang/2.php b/lang/2.php index fd3ae1ef0..82d74c2f2 100644 --- a/lang/2.php +++ b/lang/2.php @@ -3657,7 +3657,7 @@ $lang = array ( "srv_statistic_period_day_month" => "by days of month", "srv_statistic_period_day_week" => "by days of the week", "srv_statistic_period_hour_day" => "by hours of the day", - "srv_statistic_hide_null" => "Hide 0:", + "srv_statistic_hide_null" => "Hide values 0", "srv_statistic_show_referals" => "Referrers:", "srv_statistic_show_no_referals"=> "The database has no records for referrers.", "srv_statistic_detail" => "(detail)", @@ -3683,6 +3683,7 @@ $lang = array ( "srv_statistic_redirection_sum_view" => "Sum views of link", "srv_statistic_redirection_sum_invitation" => "Sum email-invalid", "srv_statistic_redirection_test" => "from this test", + "srv_statistic_metric" => "Metric", "srv_statistic_lang_title" => "Questionnaire language", "srv_statistic_lang" => "Language", "srv_statistic_sum" => "All units", diff --git a/public/css/admin_new.css b/public/css/admin_new.css index 1d597cde5..16b534cf6 100644 --- a/public/css/admin_new.css +++ b/public/css/admin_new.css @@ -12038,6 +12038,154 @@ table#standard_words_table th div.standardna-beseda-th { align-items: center; } +.dashboard_top_info { + font-size: 14px; +} +.dashboard_top_info span { + font-size: 14px; +} + +.dashboard_boxes { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + margin-top: 32px; +} +.dashboard_boxes .dashboard_box { + position: relative; + box-sizing: border-box; + width: 430px; + max-width: 100%; + padding: 32px 16px; + margin: 0 32px 32px 0; + font-size: 14px; + border: 1px #E5E5E5 solid; +} +.dashboard_boxes .dashboard_box:nth-child(3), .dashboard_boxes .dashboard_box:nth-child(6) { + margin-right: 0; +} +.dashboard_boxes .dashboard_box .box_title { + position: absolute; + top: -10px; + left: 16px; + padding: 0 16px; + font-size: 14px; + font-weight: bold; + color: #1E88E5; + text-transform: uppercase; + line-height: 18px; + background-color: #FFFFFF; +} +.dashboard_boxes .dashboard_box .box_top_settings { + display: flex; + margin-bottom: 8px; +} +.dashboard_boxes .dashboard_box .box_top_settings span, +.dashboard_boxes .dashboard_box .box_top_settings label { + font-size: 14px; +} +.dashboard_boxes .dashboard_box table { + width: 100%; + margin: 0 0 16px 0; +} +.dashboard_boxes .dashboard_box table:last-of-type { + margin-bottom: 0; +} +.dashboard_boxes .dashboard_box table tr { + height: auto; +} +.dashboard_boxes .dashboard_box table tr.row1 td { + padding: 8px 16px 8px 8px; + font-weight: 600; + background-color: #F8F8F8; +} +.dashboard_boxes .dashboard_box table tr td { + padding: 4px 16px 4px 8px; + font-size: 14px; + border-top: 1px #E5E5E5 solid; + border-bottom: 1px #E5E5E5 solid; +} +.dashboard_boxes .dashboard_box table tr td strong { + font-weight: 600; +} +.dashboard_boxes .dashboard_box table tr td span { + font-size: 14px; +} +.dashboard_boxes .dashboard_box table tr td .graph_db { + float: left; + height: 16px; + margin-top: 2px; + background-color: #1E88E5; +} +.dashboard_boxes .dashboard_box table tr td .graph_text { + margin-left: 8px; + font-size: 14px; +} +.dashboard_boxes .dashboard_box#div_statistic_info table tr td { + padding: 0 0 8px 0; + border: 0; +} +.dashboard_boxes .dashboard_box#div_statistic_info table tr td:first-child { + width: 100px; + font-weight: 600; +} +.dashboard_boxes .dashboard_box#div_statistic_info table tr td:nth-child(3) { + font-weight: 600; +} +.dashboard_boxes .dashboard_box#div_statistic_status table tr td:nth-child(2), .dashboard_boxes .dashboard_box#div_statistic_status table tr td:nth-child(3) { + text-align: right; +} +.dashboard_boxes .dashboard_box#div_statistic_answer_state table tr td:nth-child(2), .dashboard_boxes .dashboard_box#div_statistic_answer_state table tr td:nth-child(3) { + text-align: right; +} +.survey_referals_tbl { + width: 100%; + border-spacing: 0px; + padding: 0px; + margin: 0px; + border-collapse: collapse; + margin-top: 8px; +} +.survey_referals_tbl td { + padding: 3px 0px; +} +.survey_referals_tbl th { + text-align: left; + white-space: nowrap; + font-weight: normal; + padding-right: 5px; +} + +#div_statistic_float_div { + position: fixed; + width: 620px; + max-height: 600px; + z-index: 90; + padding: 10px; + border: 1px solid #FF0000; + background-color: white; + margin: auto auto; +} +#div_statistic_float_div .list { + margin-left: 20px; + padding-top: 3px; +} + +.dashboard_status_span { + display: inline-block; + width: 200px; + padding: 2px 0px; +} + +#div_statistic_status span { + display: inline-block; + padding: 2px 0px; +} + +.opt_bold { + font-weight: 600; +} + /* Branching ikone, radio, checkboxi... */ @@ -17166,6 +17314,20 @@ iframe#ifmcontentstoprint { #breakResults .table_holder { margin-bottom: 64px; } +#breakResults .table_holder table tr.row2 td.cell_grid { + background-color: #F2F2F2; +} +#breakResults .table_holder table td.cell_var { + width: 260px; + text-align: left; +} +#breakResults .table_holder table td.cell_question a { + text-decoration: none; + color: #333333; +} +#breakResults .table_holder table td.cell_value { + text-align: center; +} #breakResults .tableChart { margin: 0 auto 16px auto; } diff --git a/resources/sass/admin_new/pages/pages.scss b/resources/sass/admin_new/pages/pages.scss index 94a2abe3f..7fb3fa844 100644 --- a/resources/sass/admin_new/pages/pages.scss +++ b/resources/sass/admin_new/pages/pages.scss @@ -7,6 +7,7 @@ @import "my_surveys/my_surveys"; // Survey pages +@import "survey_status/survey_status"; @import "survey_edit/survey_edit"; @import "survey_data/survey_data"; @import "survey_analysis/survey_analysis"; diff --git a/resources/sass/admin_new/pages/survey_analysis/page_break.scss b/resources/sass/admin_new/pages/survey_analysis/page_break.scss index 8edd2aab9..9fe2958aa 100644 --- a/resources/sass/admin_new/pages/survey_analysis/page_break.scss +++ b/resources/sass/admin_new/pages/survey_analysis/page_break.scss @@ -39,6 +39,31 @@ .table_holder{ margin-bottom: 64px; + + table{ + + tr.row2 td.cell_grid{ + background-color: $light-gray2; + } + + td.cell_var{ + width: 260px; + text-align: left; + } + + td.cell_question{ + a{ + text-decoration: none; + color: $black; + } + } + + td.cell_value{ + text-align: center; + //padding: 4px 8px; + } + + } } .tableChart{ diff --git a/resources/sass/admin_new/pages/survey_status/summary.scss b/resources/sass/admin_new/pages/survey_status/summary.scss new file mode 100644 index 000000000..699b9376e --- /dev/null +++ b/resources/sass/admin_new/pages/survey_status/summary.scss @@ -0,0 +1,224 @@ + +.dashboard_top_info{ + font-size: 14px; + + span{ + font-size: 14px; + } +} + +.dashboard_boxes{ + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + + margin-top: 32px; + + .dashboard_box{ + position: relative; + box-sizing: border-box; + width: 430px; + max-width: 100%; + + padding: 32px 16px; + margin: 0 32px 32px 0; + + font-size: 14px; + + border: 1px $gray solid; + + &:nth-child(3), + &:nth-child(6){ + margin-right: 0; + } + + .box_title{ + position: absolute; + top: -10px; + left: 16px; + + padding: 0 16px; + + font-size: 14px; + font-weight: bold; + color: $blue; + text-transform: uppercase; + line-height: 18px; + + background-color: $white; + } + + .box_top_settings{ + display: flex; + margin-bottom: 8px; + + span, + label{ + font-size: 14px; + } + } + + table{ + width: 100%; + margin: 0 0 16px 0; + + &:last-of-type{ + margin-bottom: 0; + } + + tr{ + height: auto; + + &.row1{ + + td{ + padding: 8px 16px 8px 8px; + + font-weight: 600; + + background-color: $light-gray; + } + } + + td{ + padding: 4px 16px 4px 8px; + + font-size: 14px; + + border-top: 1px $gray solid; + border-bottom: 1px $gray solid; + + strong{ + font-weight: 600; + } + + span{ + font-size: 14px; + } + + .graph_db { + float: left; + height: 16px; + margin-top: 2px; + + background-color: $blue; + } + .graph_text { + margin-left: 8px; + font-size: 14px; + } + } + } + } + + // Box 1 + &#div_statistic_info{ + + table tr td{ + padding: 0 0 8px 0; + border: 0; + + &:first-child{ + width: 100px; + font-weight: 600; + } + + &:nth-child(3){ + font-weight: 600; + } + } + } + + // Box 2 + &#div_statistic_status{ + + table tr td{ + + &:nth-child(2), + &:nth-child(3){ + text-align: right; + } + } + } + + // Box 3 + &#div_statistic_answer_state{ + + table tr td{ + + &:nth-child(2), + &:nth-child(3){ + text-align: right; + } + } + } + + // Box 4 + &#div_statistic_referals{ + + } + + // Box 5 + &#div_statistic_visit{ + + } + + // Box 6 + &#div_statistic_pages_state{ + + } + } +} + + +.survey_referals_tbl { + width: 100%; + border-spacing: 0px; + padding: 0px; + margin: 0px; + border-collapse: collapse; + margin-top: 8px; + td { + padding: 3px 0px; + } + th { + text-align: left; + white-space: nowrap; + font-weight: normal; + padding-right: 5px; + } +} +#div_statistic_float_div { + position: fixed; + width: 620px; + max-height: 600px; + z-index: 90; + padding: 10px; + border: 1px solid $red; + background-color: white; + margin: auto auto; + .list { + margin-left: 20px; + padding-top: 3px; + } +} + + + + + + +.dashboard_status_span { + display: inline-block; + width: 200px; + padding: 2px 0px; +} +#div_statistic_status { + span { + display: inline-block; + padding: 2px 0px; + } +} +.opt_bold { + font-weight: 600; +} \ No newline at end of file diff --git a/resources/sass/admin_new/pages/survey_status/survey_status.scss b/resources/sass/admin_new/pages/survey_status/survey_status.scss new file mode 100644 index 000000000..a92078d90 --- /dev/null +++ b/resources/sass/admin_new/pages/survey_status/survey_status.scss @@ -0,0 +1 @@ +@import "summary"; \ No newline at end of file
'; echo ''; echo ''; echo $forSpremenljivka['naslov']; echo '('.$forSpremenljivka['variable'].')'; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo $spremenljivka['naslov']. ' - '; @@ -1393,37 +1430,49 @@ class SurveyBreak echo '('.$grid['variable'].')'; echo ''; echo ''; - echo ''; + echo '
'; + echo ''; echo $variable['naslov']; echo '('.$variable['variable'].')'; echo '('.$variable['sequence'].')'; - echo ''; + echo '
'; if ($forSpremenljivka['tip'] == 2) { echo $cbxLabel; - } else { + } + else { echo $forSpremenljivka['options'][$oKey]; } echo ''; + echo ''; if (count($texts[$forSequence][$oKey][$sequence]) > 0) { $cnt=1; $count = count($texts[$forSequence][$oKey][$sequence]); @@ -1435,11 +1484,9 @@ class SurveyBreak } } - - #echo $this->formatNumber($texts[$oKey][$sequence],$this->num_digit_average,''); - echo '