summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php')
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php6443
1 files changed, 3399 insertions, 3044 deletions
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
index 16e8eea..870e4a9 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php
@@ -9,24 +9,27 @@
* " -> \x22
*/
-define("EXPORT_FOLDER", "admin/survey/SurveyData");
+ if (!defined('EXPORT_FOLDER')) define("EXPORT_FOLDER", "admin/survey/SurveyData");
-define('DATE_FORMAT', 'Y-m-d');
-define("ALLOW_HIDE_ZERRO_REGULAR", false); # omogočimo delovanje prikazovanja/skrivanja ničelnih vrednosti za navadne odgovore
-define("ALLOW_HIDE_ZERRO_MISSING", true); # omogočimo delovanje prikazovanja/skrivanja ničelnih vrednosti za missinge
-define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti
+ if(!defined("DATE_FORMAT")) define('DATE_FORMAT', 'Y-m-d');
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR")) define("ALLOW_HIDE_ZERRO_REGULAR", false); # omogočimo delovanje prikazovanja/skrivanja ničelnih vrednosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING")) define("ALLOW_HIDE_ZERRO_MISSING", true); # omogočimo delovanje prikazovanja/skrivanja ničelnih vrednosti za missinge
+ if(!defined("AUTO_HIDE_ZERRO_VALUE")) define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti
# mejne vrednosti za barvanje residualov
-define("RESIDUAL_COLOR_LIMIT1", 1.00);
-define("RESIDUAL_COLOR_LIMIT2", 2.00);
-define("RESIDUAL_COLOR_LIMIT3", 3.00);
-
-
-DEFINE (STR_DLMT, '|');
-DEFINE (NEW_LINE, "\n");
-DEFINE (TMP_EXT, '.tmp');
-DEFINE (DAT_EXT, '.dat');
+if(!defined("RESIDUAL_COLOR_LIMIT1")) define("RESIDUAL_COLOR_LIMIT1", 1.00);
+if(!defined("RESIDUAL_COLOR_LIMIT2")) define("RESIDUAL_COLOR_LIMIT2", 2.00);
+if(!defined("RESIDUAL_COLOR_LIMIT3")) define("RESIDUAL_COLOR_LIMIT3", 3.00);
+
+if (!defined('STR_DLMT'))
+ define(STR_DLMT, '|');
+if (!defined('NEW_LINE'))
+ define (NEW_LINE, "\n");
+if (!defined('TMP_EXT'))
+ define (TMP_EXT, '.tmp');
+if (!defined('DAT_EXT'))
+ define (DAT_EXT, '.dat');
class SurveyAnalysis {
@@ -187,7 +190,6 @@ class SurveyAnalysis {
if ( self::$dataFileStatus == FILE_STATUS_NO_DATA || self::$dataFileStatus == FILE_STATUS_SRV_DELETED) {
if (self::$podstran != M_ANALYSIS_ARCHIVE)
Common::noDataAlert();
-
return false;
}
@@ -196,9 +198,7 @@ class SurveyAnalysis {
UserSetting :: getInstance()->Init($global_user_id);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- self::$db_table = '_active';
- }
+ self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
# nastavimo vse filtre
self::setUpFilter();
@@ -267,13 +267,14 @@ class SurveyAnalysis {
$_zoom_condition = SurveyZoom::generateAwkCondition();
# ali imamo filter na testne podatke
- #$filter_testdata = isset($_SESSION['testData'][self::$sid]['includeTestData']) && $_SESSION['testData'][self::$sid]['includeTestData'] == 'false';
+ $filter_testdata = '';
if (isset(self::$_HEADERS['testdata']['grids'][0]['variables'][0]['sequence']) && (int)self::$_HEADERS['testdata']['grids'][0]['variables'][0]['sequence'] > 0) {
$test_data_sequence = self::$_HEADERS['testdata']['grids'][0]['variables'][0]['sequence'];
$filter_testdata = SurveyStatusProfiles :: getStatusTestAsAWKString($test_data_sequence);
}
# ali imamo filter na uporabnost
+ $filter_usability = '';
if (isset(self::$_HEADERS['usability']['variables'][0]['sequence']) && (int)self::$_HEADERS['usability']['variables'][0]['sequence'] > 0) {
$usability_data_sequence = self::$_HEADERS['usability']['variables'][0]['sequence'];
$filter_usability = SurveyStatusProfiles :: getStatusUsableAsAWKString($usability_data_sequence);
@@ -283,8 +284,9 @@ class SurveyAnalysis {
|| ($_inspect_condition_awk != "" && $_inspect_condition_awk != null)
|| ($_time_profile_awk != "" && $_time_profile_awk != null)
|| ($_zoom_condition != "" && $_zoom_condition != null)
- || ($filter_testdata != null)
- || ($filter_usability != null)) {
+ || ($filter_testdata != '')
+ || ($filter_usability != '')) {
+
self::$_CURRENT_STATUS_FILTER = '('.self::$_CURRENT_STATUS_FILTER;
if ($_condition_profile_AWK != "" && $_condition_profile_AWK != null ) {
@@ -305,12 +307,6 @@ class SurveyAnalysis {
if ($filter_testdata != null ) {
self::$_CURRENT_STATUS_FILTER .= '&&('.$filter_testdata.')';
- /*
- $test_data_sequence = self::$_HEADERS['testdata']['grids'][0]['variables'][0]['sequence'];
- if ((int)$test_data_sequence > 0) {
- self::$_CURRENT_STATUS_FILTER .= '&&($'.$filter_testdata.')';
- }
- */
}
if ($filter_usability != null ) {
@@ -446,19 +442,18 @@ class SurveyAnalysis {
}
- if (self::$dataFileStatus == FILE_STATUS_OLD && self::$podstran != M_ANALYSIS_ARCHIVE) {
- echo "Posodobljeno: ".date("d.m.Y, H:i:s", strtotime(self::$dataFileUpdated));
- }
-
# krostabe naredimo
if(self::$podstran == M_ANALYSIS_CROSSTAB ) {
self::$crossTabClass->Display();
- } else {
+ }
+ else {
# polovimo nastavtve missing profila
self::$missingProfileData = SurveyMissingProfiles::getProfile(self::$currentMissingProfile);
+
if (self::$podstran != M_ANALYSIS_ARCHIVE) {
self::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
}
+
if (!is_countable(self::$_LOOPS) || count(self::$_LOOPS) == 0) {
# če nimamo zank
@@ -480,18 +475,21 @@ class SurveyAnalysis {
self::$podstran = M_ANALYSIS_SUMMARY;
self::Display();
break;
+ }
}
- } else {
+ else {
$loop_cnt = 0;
+
# če mamo zanke
- foreach ( self::$_LOOPS AS $loop)
- {
+ foreach ( self::$_LOOPS AS $loop){
+
$loop_cnt++;
$loop['cnt'] = $loop_cnt;
self::$_CURRENT_LOOP = $loop;
- echo '<h2 data-loopId="'.self::$_CURRENT_LOOP['cnt'].'">'.$lang['srv_zanka_note'].$loop['text'].'</h2>';
- switch (self::$podstran)
- {
+
+ echo '<h2 class="filter_box" data-loopId="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'">'.$lang['srv_zanka_note'].$loop['text'].'</h2>';
+
+ switch (self::$podstran){
case M_ANALYSIS_SUMMARY :
self::displaySums();
break;
@@ -508,8 +506,7 @@ class SurveyAnalysis {
self::$podstran = M_ANALYSIS_SUMMARY;
self::Display();
break;
- }
-
+ }
}
}
@@ -536,107 +533,122 @@ class SurveyAnalysis {
#preberemo HEADERS iz datoteke
self::$_HEADERS = unserialize(file_get_contents(self::$headFileName));
- # odstranimo sistemske variable tipa email, ime, priimek, geslo
- self::removeSystemVariables();
+ # odstranimo sistemske variable tipa email, ime, priimek, geslo
+ self::removeSystemVariables();
- # polovimo frekvence
- self::getDescriptives();
+ # polovimo frekvence
+ self::getDescriptives();
- # izpišemo opisne statistike
- $vars_count = count(self::$_FILTRED_VARIABLES);
- $line_break = '';
+ # izpišemo opisne statistike
+ $vars_count = count(self::$_FILTRED_VARIABLES);
+ $line_break = '';
- # dodamo še kontrolo če kličemo iz displaySingleVar
- if (isset($_spid) && $_spid !== null) {
- self::$_HEADERS = array($_spid => self::$_HEADERS[$_spid]);
- }
-
- # ali prikazujemo spremenljivke brez veljavnih odgovorov
- $show_spid = array();
- foreach (self::$_HEADERS AS $spid => $spremenljivka) {
- # preverjamo ali je meta
- if ($spremenljivka['tip'] != 'm'
- && ( count(self::$_FILTRED_VARIABLES) == 0 || (count(self::$_FILTRED_VARIABLES) > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ))
- && in_array($spremenljivka['tip'], self::$_FILTRED_TYPES) ){
- $only_valid = 0;
+ # dodamo še kontrolo če kličemo iz displaySingleVar
+ if (isset(self::$_HEADERS[$_spid]) && isset($_spid) && $_spid !== null) {
+ self::$_HEADERS = array($_spid => self::$_HEADERS[$_spid]);
+ }
+
+ # ali prikazujemo spremenljivke brez veljavnih odgovorov
+ $show_spid = array();
+ foreach (self::$_HEADERS AS $spid => $spremenljivka) {
+ # preverjamo ali je meta
+ if (isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
+ && ( count(self::$_FILTRED_VARIABLES) == 0 || (count(self::$_FILTRED_VARIABLES) > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ))
+ && in_array($spremenljivka['tip'], self::$_FILTRED_TYPES) ){
+ $only_valid = 0;
+
+ $show_enota = false;
+ # preverimo ali imamo samo eno variablo in če iammo enoto
+ if (isset($spremenljivka['enota']) && (int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
+ $show_enota = true;
+ }
- $show_enota = false;
- # preverimo ali imamo samo eno variablo in če iammo enoto
- if ((int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
- $show_enota = true;
- }
+ # izpišemo glavno vrstico z podatki
+ $_sequence = null;
+ # za enodimenzijske tipe izpišemo podatke kar v osnovni vrstici
+ if (!$show_enota) {
+ $variable = $spremenljivka['grids'][0]['variables'][0];
+ $_sequence = $variable['sequence']; # id kolone z podatki
+ $only_valid += (int)(isset(self::$_DESCRIPTIVES[$_sequence]['validCnt'])?self::$_DESCRIPTIVES[$_sequence]['validCnt']:0);
+ } else {
+ if ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3) {
+ $variable = $spremenljivka['grids'][0]['variables'][0];
+ $_sequence = $variable['sequence']; # id kolone z podatki
+ $show_enota = false;
+ }
+ #zloopamo skozi variable
+ $_sequence = null;
+ $grd_cnt=0;
+ if (count($spremenljivka['grids']) > 0)
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+
+ # dodamo dodatne vrstice z albelami grida
+ if (count ($grid['variables']) > 0)
+ foreach ($grid['variables'] AS $vid => $variable ){
+ # dodamo ostale vrstice
+ $do_show = ($variable['other'] !=1 && ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3 || $spremenljivka['tip'] == 5 || $spremenljivka['tip'] == 8 ))
+ ? false
+ : true;
+ if ($do_show) {
+ $only_valid += (int)(isset(self::$_DESCRIPTIVES[$variable['sequence']]['validCnt'])?self::$_DESCRIPTIVES[$variable['sequence']]['validCnt']:0);
+ }
+ }
+ }
+ } //else: if (!$show_enota)
+
+ if (SurveyDataSettingProfiles :: getSetting('hideEmpty') == 1 && $only_valid == 0 && self::$_forceShowEmpty == false) {
+ $show_spid[$spid] = false;
+ } else {
+ $show_spid[$spid] = true;
+ }
- # izpišemo glavno vrstico z podatki
- $_sequence = null;
- # za enodimenzijske tipe izpišemo podatke kar v osnovni vrstici
- if (!$show_enota) {
- $variable = $spremenljivka['grids'][0]['variables'][0];
- $_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_DESCRIPTIVES[$_sequence]['validCnt'];
- } else {
- if ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3) {
- $variable = $spremenljivka['grids'][0]['variables'][0];
- $_sequence = $variable['sequence']; # id kolone z podatki
- $show_enota = false;
- }
- #zloopamo skozi variable
- $_sequence = null;
- $grd_cnt=0;
- if (count($spremenljivka['grids']) > 0)
- foreach ($spremenljivka['grids'] AS $gid => $grid) {
-
- # dodamo dodatne vrstice z albelami grida
- if (count ($grid['variables']) > 0)
- foreach ($grid['variables'] AS $vid => $variable ){
- # dodamo ostale vrstice
- $do_show = ($variable['other'] !=1 && ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3 || $spremenljivka['tip'] == 5 || $spremenljivka['tip'] == 8 ))
- ? false
- : true;
- if ($do_show) {
- $only_valid += (int)self::$_DESCRIPTIVES[$variable['sequence']]['validCnt'];
- }
- }
- }
- } //else: if (!$show_enota)
+ }
+ }
- if (SurveyDataSettingProfiles :: getSetting('hideEmpty') == 1 && $only_valid == 0 && self::$_forceShowEmpty == false) {
- $show_spid[$spid] = false;
- } else {
- $show_spid[$spid] = true;
- }
+ if (self :: $show_spid_div == true) {
+ echo '<div id="desc_'.$_spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_desc_variable div_analiza_holder">';
+
+ // Ce kličemo iz displaySingleVar za samo eno spremenljivko
+ if (isset($_spid) && $_spid !== null) {
+ self::displaySpremenljivkaIcons($_spid);
+ }
}
- }
- echo '<table class="anl_tbl anl_ba" >';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb anl_w90">&nbsp;<span>'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb anl_w110">' . $lang['srv_analiza_opisne_variable'] .'<span>'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_variable_text'] .'<span>'.'</span></td>';
+
+ echo '<table class="table_desc" >';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_icons"></td>';
+ echo '<td class="cell_var">' . $lang['srv_analiza_opisne_variable'] .'<span>'.'</span></td>';
+ echo '<td class="cell_question">' . $lang['srv_analiza_opisne_variable_text'] .'<span>'.'</span></td>';
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_variable_type'] .'<span >'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_variable_expression'] .'<span >'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_variable_skala'] .'<span >'.'</span></td>';
- }
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_m'] .'<span >'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_num_units'] .'<span >'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_povprecje_odstotek'] .'<span >'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb">' . $lang['srv_analiza_opisne_odklon'] .'<span >'.'</span></td>';
- echo '<td class="anl_br anl_ac anl_bck anl_variabla_line anl_bb" >' . $lang['srv_analiza_opisne_min'] .'<span >'.'</span></td>';
- echo '<td class=" anl_ac anl_bck anl_variabla_line anl_bb" >' . $lang['srv_analiza_opisne_max'] .'<span >'.'</span></td>';
+ echo '<td class="cell_info">' . $lang['srv_analiza_opisne_variable_type'] .'<span >'.'</span></td>';
+ echo '<td class="cell_info">' . $lang['srv_analiza_opisne_variable_expression'] .'<span >'.'</span></td>';
+ echo '<td class="cell_info">' . $lang['srv_analiza_opisne_variable_skala'] .'<span >'.'</span></td>';
+ }
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_m'] .'<span >'.'</span></td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_num_units'] .'<span >'.'</span></td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_povprecje_odstotek'] .'<span >'.'</span></td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_odklon'] .'<span >'.'</span></td>';
+ echo '<td class="cell_value" >' . $lang['srv_analiza_opisne_min'] .'<span >'.'</span></td>';
+ echo '<td class="cell_value" >' . $lang['srv_analiza_opisne_max'] .'<span >'.'</span></td>';
+
echo '</tr>';
+
foreach (self::$_HEADERS AS $spid => $spremenljivka) {
# dajemo v bufer, da da ne prikazujemo vprašanj brez veljavnih odgovorov če imamo tako nastavljeno
# preverjamo ali je meta
- if ($show_spid[$spid] && $spremenljivka['tip'] != 'm'
+ if (isset($show_spid[$spid]) && $spremenljivka['tip'] != 'm'
&& ( count(self::$_FILTRED_VARIABLES) == 0 || (count(self::$_FILTRED_VARIABLES) > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ))
&& in_array($spremenljivka['tip'], self::$_FILTRED_TYPES) ){
$show_enota = false;
# preverimo ali imamo samo eno variablo in če iammo enoto
- if ((int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
+ if (isset($spremenljivka['enota']) && (int)$spremenljivka['enota'] != 0 || $spremenljivka['cnt_all'] > 1 ) {
$show_enota = true;
}
@@ -677,7 +689,7 @@ class SurveyAnalysis {
: true;
if ($do_show) {
$variable['var_cnt'] = $var_cnt;
- self::displayDescriptivesVariablaRow($spremenljivka,$grid,$variable,$_css);
+ self::displayDescriptivesVariablaRow($spremenljivka,$grid,$variable,null);
}
$grid['new_grid'] = false;
@@ -687,10 +699,16 @@ class SurveyAnalysis {
} //else: if (!$show_enota)
} // end if $spremenljivka['tip'] != 'm'
} // end foreach self::$_HEADERS
+
echo '</table >';
+
+ if (self :: $show_spid_div == true) {
+ echo '</div>'; // id="sum_'.$keyGrupe.'">';
+ }
+
// Izrisemo ikone na dnu
- if ( (!isset($_spid) || $_spid == null) && (count(self::$_LOOPS) == 0 || self::$_CURRENT_LOOP['cnt'] == count(self::$_LOOPS)) && ($_GET['m'] != 'analysis_creport') )
+ if ( (!isset($_spid) || $_spid == null) && (!is_countable(self::$_LOOPS) || count(self::$_LOOPS) == 0 || self::$_CURRENT_LOOP['cnt'] == count(self::$_LOOPS)) && ($_GET['m'] != 'analysis_creport') )
self::displayBottomSettings('desc');
} // end if else ($_headFileName == null)
@@ -707,8 +725,10 @@ class SurveyAnalysis {
$cssBack = $variable['other'] != 1 ? ' anl_bck_desc_2' : ' anl_bck_desc_3';
$cssMove = $variable['other'] != 1 ? ' anl_tin' : ' anl_tin1';
- $cssBack .= (int)$grid['new_grid'] == 1 ? ' anl_bt ' : ' anl_bt_dot ';
+ $cssBack .= (isset($grid['new_grid']) && (int)$grid['new_grid'] == 1) ? ' anl_bt ' : ' anl_bt_dot ';
+
$_sequence = $variable['sequence']; # id kolone z podatki
+
if ($_sequence != null) {
$_desc = self::$_DESCRIPTIVES[$_sequence];
}
@@ -716,43 +736,38 @@ class SurveyAnalysis {
# pokličemo objekt SpremenljivkaSkala
$objectSkala = new SpremenljivkaSkala($spremenljivka['spr_id']);
+
# če smo na začetku grida dodamo podatke podvprašanja
if ($variable['var_cnt'] == 0 && in_array($spremenljivka['tip'],array(16,19,20) ) ) {
- echo '<tr>';
- echo '<td class="anl_bck anl_ac anl_br link_no_decoration">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_variabla_sub anl_double_bt anl_bb">';
+ echo '<tr class="row_grid">';
+
+ echo '<td class="cell_icons"></td>';
+
+ echo '<td class="cell_var">';
echo $grid['variable'];
echo '</td>';
- echo '<td class="anl_al anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb" colspan="'.(self::$_SHOW_LEGENDA ? '10' : '7').'">';
+
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? '10' : '7').'">';
echo $grid['naslov'];
echo '</td>';
- /*
- if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- }
- echo '<td class="anl_ac ss=anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td cla"anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- echo '<td class="anl_ac anl_br link_no_decoration anl_bck_desc_1 anl_double_bt anl_bb">&nbsp;</td>';
- */
+
echo '</tr>';
}
- echo '<tr>';
- echo '<td class="anl_bck anl_ac anl_br link_no_decoration">';
- echo '&nbsp;';
- echo '</td>';
- echo '<td class="'.$cssBack.' anl_ac anl_br link_no_decoration anl_variabla_sub">';
+
+
+ echo '<tr class="row_var">';
+
+ echo '<td class="cell_icons"></td>';
+
+ echo '<td class="'.$cssBack.' cell_var">';
echo $variable['variable'];
echo '</td>';
- echo '<td class="' . $cssBack . $cssMove . ' anl_br">';
- //echo $grid['naslov'] . ' - ' .$variable['naslov'];
+
+ echo '<td class="' . $cssBack . $cssMove . ' cell_question">';
echo $variable['naslov'];
- echo ($spremenljivka['enota'] == 1) ? ' - '.$variable['naslov2'] : '';
+ echo (isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1) ? ' - '.(isset($variable['naslov2'])?$variable['naslov2']:'') : '';
echo '</td>';
+
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -761,35 +776,40 @@ class SurveyAnalysis {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="' . $cssBack . ' anl_ac anl_br" title="'.$_tip.'">'.'&nbsp;'.'</td>';
- echo '<td class="' . $cssBack . ' anl_ac anl_br" title="'.$_tip.'">'.$_tip.'</td>';
- echo '<td class="' . $cssBack . ' anl_ac anl_br" title="'.$_oblika.'">' .$_oblika. '</td>';
+
+ echo '<td class="' . $cssBack . ' cell_info" title="'.$_tip.'">'.'&nbsp;'.'</td>';
+ echo '<td class="' . $cssBack . ' cell_info" title="'.$_tip.'">'.$_tip.'</td>';
+ echo '<td class="' . $cssBack . ' cell_info" title="'.$_oblika.'">' .$_oblika. '</td>';
}
+
#veljavno
- echo '<td class="' . $cssBack . ' anl_br anl_ac">'.(int)$_desc['validCnt'].'</td>';
+ echo '<td class="' . $cssBack . ' cell_value">'.(int)(isset($_desc['validCnt'])?$_desc['validCnt']:0).'</td>';
#ustrezno
- echo '<td class="' . $cssBack . ' anl_br anl_ac">'.(int)$_desc['allCnt'].'</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_ac">';
-
-
+ echo '<td class="' . $cssBack . ' cell_value">'.(int)(isset($_desc['allCnt'])?$_desc['allCnt']:0).'</td>';
+
+ echo '<td class="' . $cssBack . ' cell_value">';
if ( isset($_desc['avg']) && (int)$objectSkala->getSkala() !== 1 ) {
echo self::formatNumber($_desc['avg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
} else if (isset($_desc['avg']) && $spremenljivka['tip'] == 2 && (int)$objectSkala->getSkala() == 1 ) {
- echo self::formatNumber($_desc['avg']*100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'&nbsp;%');
+ echo self::formatNumber($_desc['avg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ //echo self::formatNumber($_desc['avg']*100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'&nbsp;%');
}
echo '</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_ac">';
+
+ echo '<td class="' . $cssBack . ' cell_value">';
if (isset($_desc['div']) && (int)$objectSkala->getSkala() !== 1) {
echo self::formatNumber($_desc['div'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
}
echo '</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_ac">'.((int)$objectSkala->getSkala() !== 1 ? $_desc['min'] : '').'</td>';
- echo '<td class="' . $cssBack . ' anl_ac">'.((int)$objectSkala->getSkala() !== 1 ? $_desc['max'] : '').'</td>';
- echo '</tr>';
+ echo '<td class="' . $cssBack . ' cell_value">'.((int)$objectSkala->getSkala() !== 1 ? $_desc['min'] : '').'</td>';
+ echo '<td class="' . $cssBack . ' cell_value">'.((int)$objectSkala->getSkala() !== 1 ? $_desc['max'] : '').'</td>';
+
+ echo '</tr>';
}
+
/** Izriše vrstico z opisnimi
*
* @param unknown_type $spremenljivka
@@ -797,129 +817,155 @@ class SurveyAnalysis {
*/
static function displayDescriptivesSpremenljivkaRow($spid,$spremenljivka,$show_enota,$_sequence = null) {
global $lang;
+
$cssBack = " anl_bck_desc_1";
+
+ $_desc=array();
if ($_sequence != null) {
$_desc = self::$_DESCRIPTIVES[$_sequence];
}
# pokličemo objekt SpremenljivkaSkala
$objectSkala = new SpremenljivkaSkala($spremenljivka['spr_id']);
+
- echo '<tr>';
- echo '<td class="anl_bck anl_ac anl_br anl_bt link_no_decoration">';
- self::showIcons($spid,$spremenljivka,'desc');
+
+ echo '<tr class="row_question">';
+
+
+ echo '<td class="cell_icons cell_icons'.$spid.'" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')"> </span>';
+ echo ' <div class="options" id="options'.$spid.'">';
+ self::showIcons($spid, $spremenljivka, 'desc');
+ echo ' </div>';
echo '</td>';
- echo '<td class="'.$cssBack.' anl_ac anl_br anl_bt">';
+
+
+ echo '<td class="'.$cssBack.' cell_var">';
self::showVariable($spid,$spremenljivka['variable']);
echo '</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_bt">';
+
+ echo '<td class="' . $cssBack . ' cell_question">';
echo ($spremenljivka['naslov']) . '</td>';
+
if (self::$_SHOW_LEGENDA) {
- if ($variable['other'] != '1' && $variable['text'] != '1') {
+ if ((isset($variable['other'])?$variable['other']:null) != '1' && (isset($variable['text'])?$variable['text']:null) != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
} else {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="' . $cssBack . ' anl_ac anl_br anl_bt" title="'.$_tip.'">'.
- self::getSpremenljivkaLegenda($spremenljivka,'tip')
- .'</td>';
- echo '<td class="' . $cssBack . ' anl_ac anl_br anl_bt" title="'.$_tip.'">'.(!$show_enota ? $_tip : '&nbsp').'</td>';
- echo '<td class="' . $cssBack . ' anl_ac anl_br anl_bt" title="'.$_oblika.'">'.(!$show_enota ? $_oblika : '&nbsp;'). '</td>';
+ echo '<td class="' . $cssBack . ' cell_info" title="'.$_tip.'">'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</td>';
+ echo '<td class="' . $cssBack . ' cell_info" title="'.$_tip.'">'.(!$show_enota ? $_tip : '&nbsp').'</td>';
+ echo '<td class="' . $cssBack . ' cell_info" title="'.$_oblika.'">'.(!$show_enota ? $_oblika : '&nbsp;'). '</td>';
}
+
#veljavno
- echo '<td class="' . $cssBack . ' anl_br anl_ac anl_bt">'.(!$show_enota ? (int)$_desc['validCnt'] : '&nbsp;') .'</td>';
+ echo '<td class="' . $cssBack . ' cell_value">'.(!$show_enota ? (int)(isset($_desc['validCnt'])?$_desc['validCnt']:0) : '&nbsp;') .'</td>';
+
#ustrezno
- echo '<td class="' . $cssBack . ' anl_br anl_ac anl_bt">'.(!$show_enota ? (int)$_desc['allCnt'] : '&nbsp;').'</td>';
+ echo '<td class="' . $cssBack . ' cell_value">'.(!$show_enota ? (int)(isset($_desc['allCnt'])?$_desc['allCnt']:0) : '&nbsp;').'</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_ac anl_bt">';
+ echo '<td class="' . $cssBack . ' cell_value">';
if (isset($_desc['avg']) && (int)$objectSkala->getSkala() !== 1) {
echo self::formatNumber($_desc['avg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
}
echo '</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_ac anl_bt">';
+
+ echo '<td class="' . $cssBack . ' cell_value">';
if (isset($_desc['div']) && (int)$objectSkala->getSkala() !== 1) {
echo self::formatNumber($_desc['div'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
}
echo '</td>';
- echo '<td class="' . $cssBack . ' anl_br anl_ac anl_bt">'.((int)$objectSkala->getSkala() !== 1 ? $_desc['min'] : '').'</td>';
- echo '<td class="' . $cssBack . ' anl_ac anl_bt">'.((int)$objectSkala->getSkala() !== 1 ? $_desc['max'] : '').'</td>';
- echo '</tr>';
+ echo '<td class="' . $cssBack . ' cell_value">'.((isset($_desc['min'])&&(int)$objectSkala->getSkala() !== 1) ? $_desc['min'] : '').'</td>';
+
+ echo '<td class="' . $cssBack . ' cell_value">'.((isset($_desc['max'])&&(int)$objectSkala->getSkala() !== 1) ? $_desc['max'] : '').'</td>';
+ echo '</tr>';
}
+
/** Izrišemo fekvence
*
*/
static function displayFrequency($_spid = null) {
global $site_path, $lang;
+
# preberemo header
if (self::$headFileName !== null ) {
+
#preberemo HEADERS iz datoteke
self::$_HEADERS = unserialize(file_get_contents(self::$headFileName));
- # odstranimo sistemske variable tipa email, ime, priimek, geslo
- self::removeSystemVariables();
-
- # polovimo frekvence
- self::getFrequencys();
- $vars_count = count(self::$_FILTRED_VARIABLES);
- $line_break = '';
- foreach (self::$_HEADERS AS $spid => $spremenljivka) {
- # preverjamo ali je meta
- if (($spremenljivka['tip'] != 'm'
- && in_array($spremenljivka['tip'], self::$_FILTRED_TYPES ))
- && (!isset($_spid) || (isset($_spid) && $_spid == $spid))) {
- # ali imamo sfiltrirano spremenljivko
- if ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) ) {
- # prikazujemo v odvisnosti od kategorije spremenljivke
- switch ($spremenljivka['tip']) {
- case 1: # radio - prikjaže navpično
- case 2: #checkbox če je dihotomna:
- case 3: # dropdown - prikjaže navpično
- case 6: # multigrid
- case 4: # text
- case 7:# variabla tipa »število«
- case 8: # datum
- case 16: #multicheckbox če je dihotomna:
- case 17: #razvrščanje če je ordinalna
- case 18: # vsota
- case 19: # multitext
- case 20: # multi number
- case 21: # besedilo*
- case 22: # kalkulacija
- case 25: # kvota
- case 26: # lokacija
- self::frequencyVertical($spid);
- break;
- case 5:
- # nagovor
- self::sumNagovor($spid,'freq');
- break;
-
- }
+ # odstranimo sistemske variable tipa email, ime, priimek, geslo
+ self::removeSystemVariables();
+
+ # polovimo frekvence
+ self::getFrequencys();
- }
+ $vars_count = count(self::$_FILTRED_VARIABLES);
+ $line_break = '';
+
+ foreach (self::$_HEADERS AS $spid => $spremenljivka) {
- } // end if $spremenljivka['tip'] != 'm'
- } // end foreach self::$_HEADERS
+ # preverjamo ali je meta
+ if ((isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
+ && in_array($spremenljivka['tip'], self::$_FILTRED_TYPES ))
+ && (!isset($_spid) || (isset($_spid) && $_spid == $spid))) {
- // Izrisemo ikone na dnu
- if ( (!isset($_spid) || $_spid == null) && (count(self::$_LOOPS) == 0 || self::$_CURRENT_LOOP['cnt'] == count(self::$_LOOPS)) && ($_GET['m'] != 'analysis_creport') )
- self::displayBottomSettings('freq');
+ # ali imamo sfiltrirano spremenljivko
+ if ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) ) {
+
+ # prikazujemo v odvisnosti od kategorije spremenljivke
+ switch ($spremenljivka['tip']) {
+
+ case 1: # radio - prikjaže navpično
+ case 2: #checkbox če je dihotomna:
+ case 3: # dropdown - prikjaže navpično
+ case 6: # multigrid
+ case 4: # text
+ case 7:# variabla tipa »število«
+ case 8: # datum
+ case 16: #multicheckbox če je dihotomna:
+ case 17: #razvrščanje če je ordinalna
+ case 18: # vsota
+ case 19: # multitext
+ case 20: # multi number
+ case 21: # besedilo*
+ case 22: # kalkulacija
+ case 25: # kvota
+ case 26: # lokacija
+ self::frequencyVertical($spid);
+ break;
+
+ case 5:
+ # nagovor
+ self::sumNagovor($spid,'freq');
+ break;
+ }
+ }
+
+ } // end if $spremenljivka['tip'] != 'm'
+
+ } // end foreach self::$_HEADERS
+
+ // Izrisemo ikone na dnu
+ if ( (!isset($_spid) || $_spid == null) && (count(self::$_LOOPS) == 0 || self::$_CURRENT_LOOP['cnt'] == count(self::$_LOOPS)) && ($_GET['m'] != 'analysis_creport') )
+ self::displayBottomSettings('freq');
} // end if else ($_headFileName == null)
}
- /** Izriše frekvence v vertikalni obliki
- *
- * @param unknown_type $spid
- */
+ /** Izriše frekvence v vertikalni obliki
+ *
+ * @param unknown_type $spid
+ */
static function frequencyVertical($spid) {
global $lang;
$spremenljivka = self::$_HEADERS[$spid];
+ $gidsCanShow = array();
# preverimo ali prikazujemo spremenljivko, glede na veljavne odgovore in nastavitev
$only_valid = 0;
@@ -929,7 +975,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -956,7 +1004,7 @@ class SurveyAnalysis {
}
}
}
- if (self::$hideEmptyValue == true || (is_countable(self::$_FREQUENCYS[$_sequence]['valid']) && count(self::$_FREQUENCYS[$_sequence]['valid']) > AUTO_HIDE_ZERRO_VALUE)) {
+ if (self::$hideEmptyValue == true || (isset(self::$_FREQUENCYS[$_sequence]['valid']) && is_countable(self::$_FREQUENCYS[$_sequence]['valid']) && count(self::$_FREQUENCYS[$_sequence]['valid']) > AUTO_HIDE_ZERRO_VALUE)) {
foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $key => $valid) {
if ((int)$valid['cnt'] == 0) {
unset (self::$_FREQUENCYS[$_sequence]['valid'][$key]);
@@ -973,19 +1021,24 @@ class SurveyAnalysis {
# koliko zapisov prikažemo naenkrat
$num_show_records = self::getNumRecords();
- echo '<div id="freq_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_analiza_holder">';
- self::displaySpremenljivkaIcons($spid);
+ echo '<div id="freq_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt'])?self::$_CURRENT_LOOP['cnt']:'').'" class="div_analiza_holder">';
+
+ self::displaySpremenljivkaIcons($spid);
+
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_br tbl_clps">';
+ echo '<table class="table_freq">';
+
# naslovna vrstica
- echo '<tr>';
+ echo '<tr class="row1">';
+
#variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<td class="cell_var">';
self::showVariable($spid,$spremenljivka['variable']);
echo '</td>';
+
#odgovori
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA ? 7 : 5).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 7 : 5).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if($spremenljivka['tip'] == 2){
echo ' <span class="anl_variabla_info">('.$lang['srv_info_checkbox'].')</span>';
}
@@ -1004,137 +1057,178 @@ class SurveyAnalysis {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo'</td>';
+
echo '</tr>';
- echo '<tr>';
+
+
+ echo '<tr class="row2">';
+
#variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
+ echo '<td class="cell_icons cell_icons'.$spid.'" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,'freq');
+ echo ' </div>';
echo '</td>';
+
+
#odgovori
+ echo '<td class="cell_question">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
if (self::$_SHOW_LEGENDA && $inline_legenda){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleOdstotek'] .'</td>';
+
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleOdstotek'] .'</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleVeljavni'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleVeljavni'] .'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
+
echo '</tr>';
// konec naslovne vrstice
+
+
// zeleno vrstico prikažemo samo skupaj z legendo
- if (self::$_SHOW_LEGENDA && $inline_legenda && in_array($spremenljivka['tip'],array(1,4,8)) ) {
- $css_bck = 'anl_bck_0_0 ';
- echo '<tr >';
- echo '<td class="anl_bl anl_bb anl_br anl_al '.$css_bck.'link_no_decoration">&nbsp;</td>';
- echo '<td class="anl_bb anl_br anl_al '.$css_bck.'">&nbsp;</td>';
-
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq anl_w90">'.$_tip.'</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq anl_w90">'.$_oblika.'</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
+ if (self::$_SHOW_LEGENDA && $inline_legenda && in_array($spremenljivka['tip'], array(1,4,8)) ) {
+
+ echo '<tr class="row3">';
+
+ echo '<td>&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
+
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
+
+ echo '<td>&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
}
- echo '<td class="anl_bb '.$css_bck.' anl_w70">&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
+
echo '</tr>';
}
+
+
$_answersOther = array();
# dodamo opcijo kje izrisujemo legendo
- $options=array('inline_legenda' => $inline_legenda, 'isTextAnswer' => false, 'isOtherAnswer' => false, 'num_show_records' => $num_show_records);
+ $options = array(
+ 'inline_legenda' => $inline_legenda,
+ 'isTextAnswer' => false,
+ 'isOtherAnswer' => false,
+ 'num_show_records' => $num_show_records
+ );
# izpišemo vlejavne odgovore
$_current_grid = null;
- if (count($spremenljivka['grids']) > 0)
+ if (count($spremenljivka['grids']) > 0){
+
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_variables_count = count($grid['variables']);
-
- # indikator da smo na prvi variabli
- $first_variable = true;
-
- # dodamo še kontrolo za prikaz mgridov in mcheckov za več kot 20 vrednosti
- if ((!is_array($gidsCanShow) && !isset($gidsCanShow[$gid]))
- || (is_array($gidsCanShow) && isset($gidsCanShow[$gid]) && $gidsCanShow[$gid]== true))
- # dodamo dodatne vrstice z albelami grida
- if ($_variables_count > 0 )
- foreach ($grid['variables'] AS $vid => $variable ){
- $_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
-
- if (($variable['text'] != true && $variable['other'] != true)
- || (in_array($spremenljivka['tip'],array(4,8,21,22,25,26,27)))){
- # dodamo ime podvariable
- //if ($_variables_count > 1 && in_array($spremenljivka['tip'],array(2,6,7,16,17,18,19,20,21))) {
- if ($inline_legenda) {
- # ali rišemo dvojno črto med grupami
- if ( $_current_grid != $gid && $_current_grid !== null && $spremenljivka['tip'] != 6&& $spremenljivka['tip'] != 16) {
- $options['doubleTop'] = true;
- } else {
- $options['doubleTop'] = false;
- }
- if ($first_variable == true && $spremenljivka['tip'] == 16) {
- if ($_current_grid !== null) {
- $options['doubleTop'] = true;
- }
- self::outputSubGridVertical($spremenljivka,$variable,$grid,$spid,$options);
- $options['doubleTop'] = false;
- }
- $_current_grid = $gid;
- self::outputSubVariablaVertical($spremenljivka,$variable,$grid,$spid,$options);
- }
- $counter = 0;
- $_kumulativa = 0;
-
-
- #po potrebi posortiramo podatke
- if ($spremenljivka['tip'] == 7 && is_array(self::$_FREQUENCYS[$_sequence]['valid'])) {
- ksort(self::$_FREQUENCYS[$_sequence]['valid']);
- }
- //self::$_FREQUENCYS[$_sequence]
- if (count(self::$_FREQUENCYS[$_sequence]['valid'])> 0 ) {
- # tekstovne odgovore posortiramo kronološko
- if ($spremenljivka['tip'] == 21 || $spremenljivka['tip'] == 4) {
- $_valid_answers = self :: sortTextValidAnswers($spid,$variable,self::$_FREQUENCYS[$_sequence]['valid']);
- } else {
- $_valid_answers = self::$_FREQUENCYS[$_sequence]['valid'];
- }
- foreach ($_valid_answers AS $vkey => $vAnswer) {
- if ($counter < $num_show_records) {
- if ($vAnswer['cnt'] > 0 || true) { # izpisujemo samo tiste ki nisno 0
- if (in_array($spremenljivka['tip'],array(4,7,8,19,20,21,26,27))) { // text, number, datum, mtext, mnumber, text*, lokacija,heatmap
- $options['isTextAnswer'] = true;
- } else {
- $options['isTextAnswer'] = false;
- }
- $counter = self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options);
- }
- }
- }
- # izpišemo sumo veljavnih
- $counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
- }
- if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
- foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
- if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
- $counter = self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
- }
- }
- # izpišemo sumo veljavnih
- $counter = self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
- }
- #izpišemo še skupno sumo
- $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);
- } else {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
- }
- $first_variable = false;
- }
- }
+ $_variables_count = count($grid['variables']);
+
+ # indikator da smo na prvi variabli
+ $first_variable = true;
+
+ # dodamo še kontrolo za prikaz mgridov in mcheckov za več kot 20 vrednosti
+ if (!isset($gidsCanShow[$gid]) || (is_array($gidsCanShow) && isset($gidsCanShow[$gid]) && $gidsCanShow[$gid]== true)){
+
+ # dodamo dodatne vrstice z albelami grida
+ if ($_variables_count > 0 ){
+ foreach ($grid['variables'] AS $vid => $variable ){
+
+ $_sequence = $variable['sequence']; # id kolone z podatki
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if (($variable['text'] != true && $variable['other'] != true)
+ || (in_array($spremenljivka['tip'],array(4,8,21,22,25,26,27)))){
+
+ # dodamo ime podvariable
+ if ($inline_legenda) {
+
+ # ali rišemo dvojno črto med grupami
+ if ( $_current_grid != $gid && $_current_grid !== null && $spremenljivka['tip'] != 6&& $spremenljivka['tip'] != 16) {
+ $options['doubleTop'] = true;
+ }
+ else {
+ $options['doubleTop'] = false;
+ }
+
+ if ($first_variable == true && $spremenljivka['tip'] == 16) {
+ if ($_current_grid !== null) {
+ $options['doubleTop'] = true;
+ }
+
+ self::outputSubGridVertical($spremenljivka,$variable,$grid,$spid,$options);
+ $options['doubleTop'] = false;
+ }
+
+ $_current_grid = $gid;
+ self::outputSubVariablaVertical($spremenljivka,$variable,$grid,$spid,$options);
+ }
+
+ $counter = 0;
+ $_kumulativa = 0;
+
+
+ # po potrebi posortiramo podatke
+ if ($spremenljivka['tip'] == 7 && is_array(self::$_FREQUENCYS[$_sequence]['valid'])) {
+ ksort(self::$_FREQUENCYS[$_sequence]['valid']);
+ }
+
+ if (is_countable(isset(self::$_FREQUENCYS[$_sequence]['valid'])?self::$_FREQUENCYS[$_sequence]['valid']:0) && count(isset(self::$_FREQUENCYS[$_sequence]['valid'])?self::$_FREQUENCYS[$_sequence]['valid']:0)> 0 ) {
+ # tekstovne odgovore posortiramo kronološko
+ if ($spremenljivka['tip'] == 21 || $spremenljivka['tip'] == 4) {
+ $_valid_answers = self :: sortTextValidAnswers($spid,$variable,self::$_FREQUENCYS[$_sequence]['valid']);
+ }
+ else {
+ $_valid_answers = self::$_FREQUENCYS[$_sequence]['valid'];
+ }
+
+ foreach ($_valid_answers AS $vkey => $vAnswer) {
+ if ($counter < $num_show_records) {
+ if ($vAnswer['cnt'] > 0 || true) { # izpisujemo samo tiste ki nisno 0
+ if (in_array($spremenljivka['tip'],array(4,7,8,19,20,21,26,27))) { // text, number, datum, mtext, mnumber, text*, lokacija,heatmap
+ $options['isTextAnswer'] = true;
+ } else {
+ $options['isTextAnswer'] = false;
+ }
+ $counter = self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options);
+ }
+ }
+ }
+
+ # izpišemo sumo veljavnih
+ $counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
+ }
+ if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
+ foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
+ if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
+ $counter = self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
+ }
+ }
+ # izpišemo sumo veljavnih
+ $counter = self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
+ }
+ #izpišemo še skupno sumo
+ $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);
+ }
+ else {
+ $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ }
+
+ $first_variable = false;
+ }
+ }
+ }
+ }
+ }
echo '</table>';
@@ -1147,73 +1241,85 @@ class SurveyAnalysis {
}
}
echo '</div>';
- echo '<br />';
}
static function outputSubGridVertical($spremenljivka,$variable,$grid,$spid,$_options = array()) {
global $lang;
+
# opcije
- $options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
+ $options = array(
+ 'isTextAnswer' => false, # ali je tekstovni odgovor
'isOtherAnswer' => false, # ali je odgovor Drugo
'inline_legenda' => true, # ali je legenda inline ali v headerju
'doubleTop' =>false, # ali imamo novo grupa in nardimo dvojni rob
);
+
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- $css_bck = 'anl_bck_freq_2 ';
- echo '<tr'.($options['doubleTop'] ? ' class="anl_double_bt"' : '').'>';
- echo '<td class="anl_bl anl_bb anl_br anl_ac '.$css_bck.'anl_variabla_sub">';
+ echo '<tr class="row_grid">';
+
+ echo '<td class="cell_var">';
echo $grid['variable'];
- #echo $variable['variable'];
echo '</td>';
- echo '<td class="anl_bb anl_br anl_al '.$css_bck.'">';
- // echo $grid['naslov'] . ' - ' .$variable['naslov'];
+
+ echo '<td class="cell_question">';
echo $grid['naslov'];
- #echo $variable['naslov'];
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
- if ($variable['other'] != '1' && $variable['text'] != '1') {
+
+ if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
+ }
+ else {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq">'.$_tip.'</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq">'.$_oblika.'</td>';
+
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
+
+ echo '<td>&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
}
- echo '<td class="anl_bb '.$css_bck.' anl_w70">&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
+
echo '</tr>';
}
+
static function outputSubVariablaVertical($spremenljivka,$variable,$grid,$spid,$_options = array()) {
global $lang;
+
# opcije
- $options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
+ $options = array(
+ 'isTextAnswer' => false, # ali je tekstovni odgovor
'isOtherAnswer' => false, # ali je odgovor Drugo
'inline_legenda' => true, # ali je legenda inline ali v headerju
'doubleTop' =>false, # ali imamo novo grupa in nardimo dvojni rob
);
+
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- $css_bck = 'anl_bck_freq_2 ';
- echo '<tr'.($options['doubleTop'] ? ' class="anl_double_bt"' : '').'>';
- echo '<td class="anl_bl anl_bb anl_br anl_ac '.$css_bck.'anl_variabla_sub">';
+
+ echo '<tr class="row_question">';
+
+ echo '<td class="cell_var">';
echo $variable['variable'];
echo '</td>';
- echo '<td class="anl_bb anl_br anl_al '.$css_bck.'">';
- // echo $grid['naslov'] . ' - ' .$variable['naslov'];
+
+ echo '<td class="cell_question">';
echo $variable['naslov'];
- echo ($spremenljivka['enota'] == 1) ? ' - '.$variable['naslov2'] : '';
+ echo (isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1) ? ' - '.$variable['naslov2'] : '';
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -1222,15 +1328,17 @@ class SurveyAnalysis {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq">'.$_tip.'</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
+
+ echo '<td>&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
}
- echo '<td class="anl_bb '.$css_bck.' anl_w70">&nbsp;</td>';
+ echo '<td>&nbsp;</td>';
+
echo '</tr>';
}
@@ -1268,21 +1376,22 @@ class SurveyAnalysis {
*/
static function displaySums($_spid = null) {
global $site_path;
- # preberemo header
+
+ # preberemo header
if (self::$headFileName === null ) {
// die ('<div>NAPAKA!!! Manjkajo datoteke s podatki. <a href="#" onClick="createCollectData();return false;">Kreiraj datoteke s podatki!</a></div>');
- } else {
+ }
+ else {
#preberemo HEADERS iz datoteke
if (self::$headFileName == null) {
echo "<br><b>Napaka</b>";
die();
}
+
self::$_HEADERS = unserialize(file_get_contents(self::$headFileName));
# odstranimo sistemske variable tipa email, ime, priimek, geslo
self::removeSystemVariables();
- #print_r("<pre>");
- #print_r(self::$_HEADERS);
- #print_r("</pre>");
+
# polovimo frekvence
self::getFrequencys();
$vars_count = count(self::$_FILTRED_VARIABLES);
@@ -1292,121 +1401,118 @@ class SurveyAnalysis {
foreach (self::$_HEADERS AS $spid => $spremenljivka) {
# preverjamo ali je meta
if (
- ($spremenljivka['tip'] != 'm'
+ (isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
&& in_array($spremenljivka['tip'], self::$_FILTRED_TYPES )
)
&& (!isset($_spid) || (isset($_spid) && $_spid == $spid))
)
{
# ali imamo sfiltrirano spremenljivko
- if ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) )
- {
+ if ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) ){
echo $line_break;
- #print_r($spremenljivka['tip']);
- # prikazujemo v odvisnosti od kategorije spremenljivke
-
- switch ($spremenljivka['tip']) {
- case 1:
- # radio - prikjaže navpično
- self::sumVertical($spid,'sums');
-
- break;
- case 2:
- #checkbox če je dihotomna:
- //self::sumHorizontalCheckbox($spid);
- self::sumVerticalCheckbox($spid,'sums');
- break;
- case 3:
- # dropdown - prikjaže navpično
- self::sumVertical($spid,'sums');
- break;
-
- case 6:
-
- if ($spremenljivka['enota'] != 3) {
- # multigrid
- self::sumHorizontal($spid,'sums');
- } else {
- #imamo dvojni mgrid
- self::sumDoubleHorizontal($spid,'sums*');
- }
- break;
- case 16:
- #multicheckbox če je dihotomna:
- self::sumMultiHorizontalCheckbox($spid,'sums');
- break;
- case 17:
-
- #razvrščanje če je ordinalna
- self::sumHorizontal($spid,'sums');
- break;
- case 4: # text
- case 8: # datum
- # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
- self::sumTextVertical($spid,'sums');
- break;
- case 21: # besedilo*
- # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
- if ($spremenljivka['cnt_all'] == 1) {
- // če je enodimenzionalna prikažemo kot frekvence
- // predvsem zaradi vprašanj tipa: language, email...
- self::sumTextVertical($spid,'sums');
- } else {
- self::sumMultiText($spid,'sums');
- }
- break;
- case 19: # multitext
- self::sumMultiText($spid,'sums');
- break;
- case 7:
- case 18:
- # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
- self::sumNumberVertical($spid,'sums');
- break;
- case 20:
- # Če je v gridu le ene variabla naj bo default prikazan f* in ne SUMA
- if ($spremenljivka['grids'][0]['cnt_vars'] == 1 ) {
- # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
- self::sumMultiNumberVertical($spid,'sums');
+ # prikazujemo v odvisnosti od kategorije spremenljivke
+ switch ($spremenljivka['tip']) {
+ case 1:
+ # radio - prikjaže navpično
+ self::sumVertical($spid,'sums');
+
+ break;
+ case 2:
+ #checkbox če je dihotomna:
+ //self::sumHorizontalCheckbox($spid);
+ self::sumVerticalCheckbox($spid,'sums');
+ break;
+ case 3:
+ # dropdown - prikjaže navpično
+ self::sumVertical($spid,'sums');
+ break;
+
+ case 6:
- } else {
+ if (!isset($spremenljivka['enota']) || $spremenljivka['enota'] != 3) {
+ # multigrid
+ self::sumHorizontal($spid,'sums');
+ } else {
+ #imamo dvojni mgrid
+ self::sumDoubleHorizontal($spid,'sums*');
+ }
+ break;
+ case 16:
+ #multicheckbox če je dihotomna:
+ self::sumMultiHorizontalCheckbox($spid,'sums');
+ break;
+ case 17:
+
+ #razvrščanje če je ordinalna
+ self::sumHorizontal($spid,'sums');
+ break;
+ case 4: # text
+ case 8: # datum
+ # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
+ self::sumTextVertical($spid,'sums');
+ break;
+ case 21: # besedilo*
+ # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
+ if ($spremenljivka['cnt_all'] == 1) {
+ // če je enodimenzionalna prikažemo kot frekvence
+ // predvsem zaradi vprašanj tipa: language, email...
+ self::sumTextVertical($spid,'sums');
+ } else {
+ self::sumMultiText($spid,'sums');
+ }
+ break;
+ case 19: # multitext
+ self::sumMultiText($spid,'sums');
+ break;
+ case 7:
+ case 18:
+ # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
+ self::sumNumberVertical($spid,'sums');
+ break;
+ case 20:
+
+ # Če je v gridu le ene variabla naj bo default prikazan f* in ne SUMA
+ if ($spremenljivka['grids'][0]['cnt_vars'] == 1 ) {
+ # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
+ self::sumMultiNumberVertical($spid,'sums');
+
+ } else {
+
+ # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
+ self::sumMultiNumber($spid,'sums');
+ }
+ break;
+ case 22:
+ case 25:
+ # kalkulacija
+ self::sumNumberVertical($spid,'sums');
+ break;
+ case 26:
+ # lokacija
+ self::sumMultiText($spid,'sums');
+ break;
+ case 27:
+ # heatmap
+ self::sumMultiTextHeatMap($spid,'sums',true, true);
- # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
- self::sumMultiNumber($spid,'sums');
+ break;
+ case 5:
+ # nagovor
+ self::sumNagovor($spid,'sums');
+ break;
+ default:
+ print_r("TODO: Sums for type:".$spremenljivka['tip']);
+ break;
}
- break;
- case 22:
- case 25:
- # kalkulacija
- self::sumNumberVertical($spid,'sums');
- break;
- case 26:
- # lokacija
- self::sumMultiText($spid,'sums');
- break;
- case 27:
- # heatmap
- self::sumMultiTextHeatMap($spid,'sums',true, true);
-
- break;
- case 5:
- # nagovor
- self::sumNagovor($spid,'sums');
- break;
- default:
- print_r("TODO: Sums for type:".$spremenljivka['tip']);
- break;
- }
-
- }
+ }
- } // end if $spremenljivka['tip'] != 'm'
- } // end foreach self::$_HEADERS
-
- // Izrisemo ikone na dnu
- if ( (!isset($_spid) || $_spid == null) && (!is_countable(self::$_LOOPS) || count(self::$_LOOPS) == 0 || self::$_CURRENT_LOOP['cnt'] == count(self::$_LOOPS)) && ($_GET['m'] != 'analysis_creport') )
- self::displayBottomSettings('sums');
+ } // end if $spremenljivka['tip'] != 'm'
+ } // end foreach self::$_HEADERS
+
+ // Izrisemo ikone na dnu
+ if ( (!isset($_spid) || $_spid == null) && (!is_countable(self::$_LOOPS) || count(self::$_LOOPS) == 0 || self::$_CURRENT_LOOP['cnt'] == count(self::$_LOOPS)) && ($_GET['m'] != 'analysis_creport') )
+ self::displayBottomSettings('sums');
} // end if else ($_headFileName == null)
}
@@ -1416,10 +1522,12 @@ class SurveyAnalysis {
*/
static function displaySumsNew($_spid = null) {
global $site_path;
+
# preberemo header
if (self::$headFileName === null ) {
// die ('<div>NAPAKA!!! Manjkajo datoteke s podatki. <a href="#" onClick="createCollectData();return false;">Kreiraj datoteke s podatki!</a></div>');
- } else {
+ }
+ else {
#preberemo HEADERS iz datoteke
self::$_HEADERS = unserialize(file_get_contents(self::$headFileName));
@@ -1432,103 +1540,81 @@ class SurveyAnalysis {
$vars_count = count(self::$_FILTRED_VARIABLES);
$line_break = '';
foreach (self::$_HEADERS AS $spid => $spremenljivka) {
- # preverjamo ali je meta
- if (($spremenljivka['tip'] != 'm'
- && in_array($spremenljivka['tip'], self::$_FILTRED_TYPES ))
- && (!isset($_spid) || (isset($_spid) && $_spid == $spid))) {
- # ali imamo sfiltrirano spremenljivko
- if ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) ) {
- echo $line_break;
- if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
- }
-
- self::displaySpremenljivkaIcons($spid);
-
- # prikazujemo v odvisnosti od kategorije spremenljivke
- switch ($spremenljivka['tip']) {
- case 1:
- # radio - prikjaže navpično
- self::sumHorizontal($spid,'sums*');
- break;
- case 2:
- #checkbox če je dihotomna:
- #self::sumVerticalCheckbox($spid,'sums*');
- self::sumHorizontalCheckbox($spid,'sums*');
- break;
- case 3:
- # dropdown - prikjaže navpično
- self::sumVertical($spid,'sums*');
- break;
- case 6:
- # multigrid
- self::sumHorizontal($spid,'sums');
- /*
- if ($spremenljivka['enota'] != 3) {
- # multigrid
- self::sumHorizontal($spid,'sums');
- } else {
- #imamo dvojni mgrid
- self::sumDoubleHorizontal($spid,'sums*');
- }
- */
- break;
- case 16:
- #multicheckbox če je dihotomna:
- self::sumVerticalCheckbox($spid,'sums*');
- break;
- case 17:
- #razvrščanje če je ordinalna
- self::sumHorizontal($spid,'sums*');
- break;
- case 4: # text
- case 8: # datum
- case 19: # multitext
- case 21: # besedilo*
- # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
- self::sumTextVertical($spid,'sums*');
- break;
- case 7:
- case 18:
- # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
- self::sumNumberVertical($spid,'sums*');
- break;
- case 20:
- self::sumMultiNumberVertical($spid,'sums*');
- /*
- # Če je v gridu le ene variabla naj bo default prikazan f* in ne SUMA
- if ($spremenljivka['grids'][0]['cnt_vars'] == 1) {
- # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
- self::sumMultiNumberVertical($spid,'sums');
-
- } else {
- # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
- self::sumMultiNumber($spid,'sums');
- }
- */
- break;
- case 26:
- # lokacija
- self::sumMultiText($spid,'sums');
- break;
- case 27:
- # heatmap
- self::sumMultiTextHeatMap($spid,'sums',true, true);
- break;
- case 5:
- # nagovor
- self::sumNagovor($spid,'sums*');
- break;
-
- }
- if (self :: $show_spid_div == true) {
- echo '</div>'; // id="sum_'.$keyGrupe.'">';
- }
- $line_break = "<br/>";
- }
+ # preverjamo ali je meta
+ if (($spremenljivka['tip'] != 'm' && in_array($spremenljivka['tip'], self::$_FILTRED_TYPES )) && (!isset($_spid) || (isset($_spid) && $_spid == $spid))) {
+
+ # ali imamo sfiltrirano spremenljivko
+ if ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) ) {
- } // end if $spremenljivka['tip'] != 'm'
+ echo $line_break;
+
+ if (self :: $show_spid_div == true) {
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
+ }
+
+ # prikazujemo v odvisnosti od kategorije spremenljivke
+ switch ($spremenljivka['tip']) {
+ case 1:
+ # radio - prikjaže navpično
+ self::sumHorizontal($spid,'sums*');
+ break;
+ case 2:
+ #checkbox če je dihotomna:
+ self::sumHorizontalCheckbox($spid,'sums*');
+ break;
+ case 3:
+ # dropdown - prikjaže navpično
+ self::sumVertical($spid,'sums*');
+ break;
+ case 6:
+ # multigrid
+ self::sumHorizontal($spid,'sums');
+ break;
+ case 16:
+ #multicheckbox če je dihotomna:
+ self::sumVerticalCheckbox($spid,'sums*');
+ break;
+ case 17:
+ #razvrščanje če je ordinalna
+ self::sumHorizontal($spid,'sums*');
+ break;
+ case 4: # text
+ case 8: # datum
+ case 19: # multitext
+ case 21: # besedilo*
+ # varabla tipa »besedilo« je v sumarniku IDENTIČNA kot v FREKVENCAH.
+ self::sumTextVertical($spid,'sums*');
+ break;
+ case 7:
+ case 18:
+ # variabla tipa »število« je v sumarniku identična kot v DESCRIPTIVES.
+ self::sumNumberVertical($spid,'sums*');
+ break;
+ case 20:
+ self::sumMultiNumberVertical($spid,'sums*');
+ break;
+ case 26:
+ # lokacija
+ self::sumMultiText($spid,'sums');
+ break;
+ case 27:
+ # heatmap
+ self::sumMultiTextHeatMap($spid,'sums',true, true);
+ break;
+ case 5:
+ # nagovor
+ self::sumNagovor($spid,'sums*');
+ break;
+
+ }
+ if (self :: $show_spid_div == true) {
+ echo '</div>'; // id="sum_'.$keyGrupe.'">';
+ }
+
+ $line_break = "<br/>";
+ }
+ } // end if $spremenljivka['tip'] != 'm'
} // end foreach self::$_HEADERS
} // end if else ($_headFileName == null)
}
@@ -1550,7 +1636,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -1567,7 +1655,7 @@ class SurveyAnalysis {
$options=array('inline_legenda' => $inline_legenda, 'isTextAnswer' => false, 'isOtherAnswer' => false, 'num_show_records' => $num_show_records);
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
@@ -1582,16 +1670,20 @@ class SurveyAnalysis {
}
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_br tbl_clps">';
+ // echo '<script src="https://kit.fontawesome.com/c5e58c7f60.js" crossorigin="anonymous"></script>';
+ echo '<table class="table_sums sums_vertical">';
+
# naslovna vrstica
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<tr class="row1">';
+
+ # variabla
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
+
#odgovori
$show_valid_percent = (self::$_HEADERS[$spid]['show_valid_percent'] == true) ? 1 : 0;
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA ? (4+((int)$inline_legenda * 2)+$show_valid_percent) : (4+$show_valid_percent)).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? (4+((int)$inline_legenda * 2)+$show_valid_percent) : (4+$show_valid_percent)).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
@@ -1607,109 +1699,105 @@ class SurveyAnalysis {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
+
+ echo '<tr class="row2">';
+
+ # variabla - en odgovor
+ echo '<td class="cell_icons cell_icons'.$spid.' en_odgovor" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
- #odgovori
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
+ # odgovori
+ echo '<td class="cell_question">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
if (self::$_SHOW_LEGENDA && $inline_legenda){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleOdstotek'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleOdstotek'] .'</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleVeljavni'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleVeljavni'] .'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
+
echo '</tr>';
// konec naslovne vrstice
- // zeleno vrstico prikažemo samo skupaj z legendo
- if (self::$_SHOW_LEGENDA && false) {
- $css_bck = 'anl_bck_0_0 ';
- echo '<tr >';
- echo '<td class="anl_bl anl_bb anl_br anl_al '.$css_bck.'link_no_decoration">&nbsp;</td>';
- echo '<td class="anl_bb anl_br anl_al '.$css_bck.'">&nbsp;</td>';
- if ($variable['other'] != '1' && $variable['text'] != '1') {
- $_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
- $_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
- $_tip = $lang['srv_analiza_vrsta_bese'];
- $_oblika = $lang['srv_analiza_oblika_nomi'];
- }
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq anl_w90">'.$_tip.'</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_ac anl_legend anl_legenda_freq anl_w90">'.$_oblika.'</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
- if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_bb anl_br '.$css_bck.' anl_w70">&nbsp;</td>';
- }
- echo '<td class="anl_bb '.$css_bck.' anl_w70">&nbsp;</td>';
- echo '</tr>';
- }
$_answersOther = array();
$sum_xi_fi=0;
$N = 0;
-
+
$_tmp_for_div = array();
+
# izpišemo vlejavne odgovore
- if (count($spremenljivka['grids']) > 0)
+ if (count($spremenljivka['grids']) > 0){
+
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- # dodamo dodatne vrstice z albelami grida
- if (count($grid['variables']) > 0 )
- foreach ($grid['variables'] AS $vid => $variable ){
- $_sequence = $variable['sequence']; # id kolone z podatki
- if ($variable['text'] != true && $variable['other'] != true) {
- $counter = 0;
- $_kumulativa = 0;
- //self::$_FREQUENCYS[$_sequence]
- if (count(self::$_FREQUENCYS[$_sequence]['valid'])> 0 ) {
- foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $vkey => $vAnswer) {
- // za povprečje
- $xi = (int)$vkey;
- $fi = (int)$vAnswer['cnt'];
+
+ # dodamo dodatne vrstice z albelami grida
+ if (count($grid['variables']) > 0 ){
- $sum_xi_fi += $xi * $fi;
- $N += $fi;
-
- if ($counter < $num_show_records) {
- if ($vAnswer['cnt'] > 0 || true) { # izpisujemo samo tiste ki nisno 0
- $counter = self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options);
- }
- }
- # za poznejše računannje odklona
- $_tmp_for_div[] = array('xi'=>$xi, 'fi'=>$fi, 'sequence'=>$_sequence);
- }
- # izpišemo sumo veljavnih
- $counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
+ foreach ($grid['variables'] AS $vid => $variable ){
- }
- if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
- foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
- if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
- $counter = self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
- }
- }
- # izpišemo sumo veljavnih
- $counter = self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
- }
- #izpišemo še skupno sumo
- $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);
- } else {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
- }
- }
- }
+ $_sequence = $variable['sequence']; # id kolone z podatki
+
+ if ($variable['text'] != true && $variable['other'] != true) {
+ $counter = 0;
+ $_kumulativa = 0;
+
+ if (count(self::$_FREQUENCYS[$_sequence]['valid'])> 0 ) {
+ foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $vkey => $vAnswer) {
+ // za povprečje
+ $xi = (int)$vkey;
+ $fi = (int)$vAnswer['cnt'];
+
+ $sum_xi_fi += $xi * $fi;
+ $N += $fi;
+
+ if ($counter < $num_show_records) {
+ if ($vAnswer['cnt'] > 0 || true) { # izpisujemo samo tiste ki nisno 0
+ $counter = self::outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_kumulativa,$options);
+ }
+ }
+ # za poznejše računannje odklona
+ $_tmp_for_div[] = array('xi'=>$xi, 'fi'=>$fi, 'sequence'=>$_sequence);
+ }
+ # izpišemo sumo veljavnih
+ $counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
+
+ }
+
+ if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
+ foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
+ if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
+ $counter = self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
+ }
+ }
+ # izpišemo sumo veljavnih
+ $counter = self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
+ }
+
+ #izpišemo še skupno sumo
+ $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);
+ }
+ else {
+ $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ }
+ }
+ }
+ }
+ }
# odklon
$avg = ($N > 0) ? $sum_xi_fi / $N : 0;
+
#standardna diviacija
$div = 0;
$sum_pow_xi_fi_avg = 0;
@@ -1719,23 +1807,30 @@ class SurveyAnalysis {
$sum_pow_xi_fi_avg += pow(($xi - $avg),2) * $fi;
}
+
$div = (($N -1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($N -1)) : 0;
# izpišemo še odklon in povprečje
if ($show_valid_percent == 1 && self::$_HEADERS[$spid]['skala'] != 1) {
- $css_bck = 'anl_bck';
- echo '<tr >';
- echo '<td class="cll_clps" style="font-size: 1px; height:2px; line-height:3px; border-right: 1px solid white;" colspan="'.(self::$_SHOW_LEGENDA ? 6+((int)$inline_legenda*2) : 6+((int)$inline_legenda*2)).'">&nbsp;</td>';
- echo '</tr>';
- echo '<tr >';
- echo '<td class="anl_br" colspan="'.(self::$_SHOW_LEGENDA ? 2+((int)$inline_legenda*2) : 2+((int)$inline_legenda*2)).'">&nbsp;</td>';
- echo '<td class="anl_bb anl_bt anl_br anl_p5 anl_ac anl_variabla_line '.$css_bck.'">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
- echo '<td class="anl_bb anl_bt anl_br anl_ac '.$css_bck.'">'. self::formatNumber($avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'').'</td>';
- echo '<td class="anl_bb anl_bt anl_br anl_p5 anl_ac anl_variabla_line '.$css_bck.'">'.$lang['srv_analiza_opisne_odklon'].'</td>';
- echo '<td class="anl_bb anl_bt anl_ac '.$css_bck.'">'.self::formatNumber($div,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'').'</td>';
+
+ echo '<tr>';
+ echo '<td class="cell_space" colspan="'.(self::$_SHOW_LEGENDA ? 6+((int)$inline_legenda*2) : 6+((int)$inline_legenda*2)).'">&nbsp;</td>';
echo '</tr>';
+
+ echo '<tr class="row_bottom">';
+
+ echo '<td class="cell_empty" colspan="'.(self::$_SHOW_LEGENDA ? 2+((int)$inline_legenda*2) : 2+((int)$inline_legenda*2)).'"></td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
+ echo '<td class="cell_value">'. self::formatNumber($avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'').'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_odklon'].'</td>';
+ echo '<td class="cell_value">'.self::formatNumber($div,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'').'</td>';
+
+ echo '</tr>';
}
+
echo '</table>';
+
+
# izpišemo še tekstovne odgovore za polja drugo
if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
@@ -1746,7 +1841,6 @@ class SurveyAnalysis {
}
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -1792,104 +1886,137 @@ class SurveyAnalysis {
# ugotovimo koliko imamo kolon
$gid=0;
- $_clmn_cnt = self::$_HEADERS[$spid]['grids'][$gid]['cnt_vars']-self::$_HEADERS[$spid]['grids'][$gid]['cnt_other'];
+
+ if(isset(self::$_HEADERS[$spid]['grids'][$gid]['cnt_other']))
+ $_clmn_cnt = self::$_HEADERS[$spid]['grids'][$gid]['cnt_vars'] - self::$_HEADERS[$spid]['grids'][$gid]['cnt_other'];
+ else
+ $_clmn_cnt = self::$_HEADERS[$spid]['grids'][$gid]['cnt_vars'];
+
# tekst vprašanja
$css_hide_enote = isset($_POST['navedbe']) && $_POST['navedbe'] == '1' ? ' displayNone' : '';
$css_hide_navedbe = isset($_POST['navedbe']) && $_POST['navedbe'] == '1' ? '' : ' displayNone';
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
# odgovori
echo '<div id="div_navedbe_1_'.$spid.'" class="'.$css_hide_enote.'">';
- echo '<table class="anl_tbl anl_ba tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_bck_desc_1">';
+
+ echo '<table class="table_sums sums_hor_checkbox navedbe1">';
+
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_al anl_bck anl_bb anl_bck_desc_1" colspan="'. ($_clmn_cnt+(self::$_SHOW_LEGENDA ? 5 : 3)) .'">';
+
+ echo '<td class="cell_question" colspan="'. ($_clmn_cnt+(self::$_SHOW_LEGENDA ? 5 : 3)) .'">';
echo '<span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type">&nbsp;&nbsp;<span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
- // echo '<span name="span_show_navedbe_1_'.$spid.'" class="span_navedbe"><a href="javascript:show_navedbe(\''.$spid.'\',\'3\');">&nbsp;(<span class="blue">'.$lang['srv_analiza_opisne_answers'].'&nbsp;</span>/<span class="blue">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '<span name="span_show_navedbe_2_'.$spid.'" class="span_navedbe'.$css_hide_enote.'"><a href="javascript:show_navedbe(\''.$spid.'\',\'2\');">&nbsp;(<span class="blue" title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '<span name="span_show_navedbe_3_'.$spid.'" class="span_navedbe'.$css_hide_navedbe.'"><a href="javascript:show_navedbe(\''.$spid.'\',\'1\');">&nbsp;(<span title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span class="blue" title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '</td>';
+
+ // Preklop navedbe/enote
+ self::showEnoteNavedbe($spid, $status='1');
+
+ echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb">';
+
+
+ echo '<tr class="row2">';
+
+
+ # variabla
+ echo '<td class="cell_icons cell_icons'.$spid.'" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from, array('navedbe'=>false));
+ echo ' </div>';
echo '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line">';
+
+ echo '<td class="cell_subquestion">';
echo $lang['srv_analiza_opisne_subquestion'];
echo '</td>';
+
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
- }
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line" colspan="'.($_clmn_cnt).'">';
- echo $lang['srv_analiza_opisne_answers'].'&nbsp;';
- echo '<span id="img_analysis_f_p_1_'.$spid.'" class="img_analysis_f_p"><a href="javascript:show_single_percent(\''.$spid.'\',\'2\');">&nbsp;(<span class="blue">f&nbsp;</span>/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '<span id="img_analysis_f_1_'.$spid.'" class="img_analysis_f displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'1\');">&nbsp;(<span class="blue">f&nbsp;</span>/&nbsp;%)</a></span>';
- echo '<span id="img_analysis_p_1_'.$spid.'" class="img_analysis_p displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'0\');">&nbsp;(f&nbsp;/<span class="blue">&nbsp;%</span>)</a></span>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ }
+
+ echo '<td class="cell_grid freq-p_cell" colspan="'.($_clmn_cnt).'">';
+ echo $lang['srv_analiza_opisne_answers'];
+ self::showFreqPercent($spid);
echo '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_valid'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_num_units'].'</td>';
+
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_valid'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_num_units'].'</td>';
+
echo '</tr>';
- $bck_css = ' anl_bck_0_0';
+
$_variables = self::$_HEADERS[$spid]['grids'][$gid]['variables'];
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb'.$bck_css .'">&nbsp;</td>';
- echo '<td class="anl_bl anl_br anl_bb'.$bck_css .'">&nbsp;</td>';
- if (self::$_SHOW_LEGENDA) {
+ echo '<tr class="row3">';
+
+ echo '<td class="cell_var"></td>';
+
+ echo '<td class="cell_subquestion"></td>';
+
+ if (self::$_SHOW_LEGENDA) {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- echo '<td class="anl_bb anl_br anl_ac anl_legend anl_legenda_freq'.$bck_css.'">&nbsp;</td>'; //'.$_tip.'
- echo '<td class="anl_bb anl_br anl_ac anl_legend anl_legenda_freq'.$bck_css.'">&nbsp;</td>'; // '.$_oblika.'
+ echo '<td class="cell_info"></td>'; //'.$_tip.'
+ echo '<td class="cell_info"></td>'; // '.$_oblika.'
}
+
if (count($_variables) > 0) {
foreach ($_variables AS $vkey => $variable) {
if ($variable['other'] != true) {
- echo '<td class="anl_bb anl_ac anl_dash_br'.$bck_css.'">' . $variable['naslov'].' ('.$variable['gr_id']. ') </td>';
+ echo '<td class="cell_grid">' . $variable['naslov'].' ('.$variable['gr_id']. ') </td>';
}
}
}
- //echo '<td class="anl_bb anl_ac anl_br red'.$bck_css.'">' . $lang['srv_anl_suma1'] . '</td>';
- echo '<td class="anl_bb anl_br anl_bl anl_ac'.$bck_css.'">'. $_valid_cnt .'</td>';
- echo '<td class="anl_bb anl_bl anl_br anl_ac'.$bck_css.'">'.$_approp_cnt. '</td>';
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
+
+
+ # vodoravna vrstice s podatki
foreach (self::$_HEADERS[$spid]['grids'] AS $gid => $grids) {
if ($gidsCanShow[$gid]) {
$_cnt = 0;
- # vodoravna vrstice s podatki
- $css_back = ' anl_bck_desc_2';
- echo '<tr>';
- echo '<td class="anl_br anl_bt anl_ac anl_variabla_sub'.$css_back.'">'.$grids['variable'].'</td>';
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$grids['naslov'].'</td>';
- if (self::$_SHOW_LEGENDA) {
+
+
+ echo '<tr class="row_var">';
+
+ echo '<td class="cell_var">'.$grids['variable'].'</td>';
+ echo '<td class="cell_subquestion">'.$grids['naslov'].'</td>';
+
+ if (self::$_SHOW_LEGENDA) {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$_tip.'</td>';
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
$_arguments = 0;
$_max_appropriate = 0;
$_max_cnt = 0;
+
// prikaz frekvenc
if (count($grids['variables']) > 0)
foreach ($grids['variables'] AS $vkey => $variable) {
$_sequence = $variable['sequence'];
- $_valid = self::$_FREQUENCYS[$_sequence]['validCnt'];
+ $_valid = isset(self::$_FREQUENCYS[$_sequence]['validCnt']) ? self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
$_cnt = self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
$_arguments += $_cnt;
@@ -1901,110 +2028,138 @@ class SurveyAnalysis {
}
if ($variable['other'] != true) {
- echo '<td class="anl_bb anl_dash_br anl_ac cll_clps '.$css_back.'">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr id="'.$spid.'_'.$_sequence.'" name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac' . (self::$enableInspect == true && (int)$_cnt > 0 ? ' mc_inspect' : '').'"'
- . (self::$enableInspect == true && (int)$_cnt > 0 ? ' vkey="1"' : '')
- .'" style="padding:5px 0px;">'.$_cnt.'</td>';
- echo '</tr>';
- echo '<tr name="single_sums_percent_'.$spid.'">';
- echo '<td style="padding:5px 0px;">';
-
- $_percent = ($_valid > 0 ) ? $_cnt * 100 / $_valid : 0;
- echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr></table>';
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr id="'.$spid.'_'.$_sequence.'" name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td>'.$_cnt.'</td>';
+ echo ' </tr>';
+
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>';
+ $_percent = ($_valid > 0 ) ? $_cnt * 100 / $_valid : 0;
+ echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo ' </td>';
+ echo ' </tr>';
+ echo ' </table>';
echo '</td>';
}
}
+
# veljavno
- echo '<td class="anl_bt anl_ac anl_br anl_bl red'.$css_back.'">'.$_max_cnt.'</td>';
- #ustrezno
- echo '<td class="anl_bt anl_ac anl_br'.$css_back.'">'.$_max_appropriate.'</td>';
+ echo '<td class="cell_value">'.$_max_cnt.'</td>';
+
+ # ustrezno
+ echo '<td class="cell_value">'.$_max_appropriate.'</td>';
echo '</tr>';
}
}
+
echo '</table>';
+
echo '</div>';
+
# navedbe
echo '<div id="div_navedbe_2_'.$spid.'" class="div_navedbe'.$css_hide_navedbe.'">';
- echo '<table class="anl_tbl anl_ba tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_bck_desc_1">';
+
+ echo '<table class="table_sums sums_hor_checkbox navedbe2">';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_al anl_bck anl_bb anl_bck_desc_1" colspan="'. ( $_clmn_cnt +(self::$_SHOW_LEGENDA ? 4 : 2)) .'">';
+
+ echo '<td class="cell_question" colspan="'. ( $_clmn_cnt +(self::$_SHOW_LEGENDA ? 4 : 2)) .'">';
echo '<span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type">&nbsp;&nbsp;<span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
- // echo '<span name="span_show_navedbe_1_'.$spid.'" class="span_navedbe"><a href="javascript:show_navedbe(\''.$spid.'\',\'3\');">&nbsp;(<span class="blue">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span class="blue">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '<span name="span_show_navedbe_2_'.$spid.'" class="span_navedbe'.$css_hide_enote.'"><a href="javascript:show_navedbe(\''.$spid.'\',\'2\');">&nbsp;(<span class="blue" title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '<span name="span_show_navedbe_3_'.$spid.'" class="span_navedbe'.$css_hide_navedbe.'"><a href="javascript:show_navedbe(\''.$spid.'\',\'1\');">&nbsp;(<span title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span class="blue" title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '</td>';
+
+ // Preklop navedbe/enote
+ self::showEnoteNavedbe($spid, $status='2');
+
+ echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb">';
- self::showIcons($spid,$spremenljivka,$_from, array('navedbe'=>true));
+
+
+ echo '<tr class="row2">';
+
+
+ # variabla
+ echo '<td class="cell_icons cell_icons'.$spid.' test" id="cell_icons'.$spid.'">';
+ // self::showIcons($spid,$spremenljivka,$_from, array('navedbe'=>true));
+ echo '<span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'_2\')" > </span>';
+ echo '<div class= "options displayNone" id="options'.$spid.'_2">';
+ self::showIcons($spid,$spremenljivka,$_from, array('navedbe'=>true));
+ echo '</div>'; //options
echo '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line">';
+
+
+ echo '<td class="cell_subquestion">';
echo $lang['srv_analiza_opisne_subquestion'];
echo '</td>';
+
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line" colspan="'.($_clmn_cnt+1).'">';
- echo $lang['srv_analiza_opisne_arguments'].'&nbsp;';
- echo '<span id="img_analysis_f_p_2_'.$spid.'" class="img_analysis_f_p "><a href="javascript:show_single_percent(\''.$spid.'\',\'2\');">&nbsp(<span class="blue">f&nbsp;</span>/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '<span id="img_analysis_f_2_'.$spid.'" class="img_analysis_f displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'1\');">&nbsp(<span class="blue">f&nbsp;</span>/&nbsp;%)</a></span>';
- echo '<span id="img_analysis_p_2_'.$spid.'" class="img_analysis_p displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'0\');">&nbsp(f&nbsp;/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '</td>';
+ echo '<td class="cell_grid freq-p_cell" colspan="'.($_clmn_cnt+1).'">';
+ echo $lang['srv_analiza_opisne_arguments'];
+ self::showFreqPercent($spid);
+ echo '</td>';
+
echo '</tr>';
- $bck_css = ' anl_bck_0_0';
+
+
$_variables = self::$_HEADERS[$spid]['grids'][$gid]['variables'];
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb'.$bck_css .'">&nbsp;</td>';
- echo '<td class="anl_bl anl_br anl_bb'.$bck_css .'">&nbsp;</td>';
- if (self::$_SHOW_LEGENDA) {
+ echo '<tr class="row3">';
+
+ echo '<td class="cell_var"></td>';
+ echo '<td class="cell_subquestion"></td>';
+ if (self::$_SHOW_LEGENDA) {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- echo '<td class="anl_bb anl_br anl_ac anl_legend anl_legenda_freq'.$bck_css.'">&nbsp;</td>'; //'.$_tip.'
- echo '<td class="anl_bb anl_br anl_ac anl_legend anl_legenda_freq'.$bck_css.'">&nbsp;</td>'; // '.$_oblika.'
+ echo '<td class="cell_info"></td>'; //'.$_tip.'
+ echo '<td class="cell_info"></td>'; // '.$_oblika.'
}
foreach ($_variables AS $vkey => $variable) {
if ($variable['other'] != true) {
- echo '<td class="anl_bb anl_ac anl_dash_br'.$bck_css.'">' . $variable['naslov'].' ('.$variable['gr_id']. ') </td>';
+ echo '<td class="cell_grid">' . $variable['naslov'].' ('.$variable['gr_id']. ') </td>';
}
}
- echo '<td class="anl_bb anl_ac anl_dash_br red'.$bck_css.'">' . $lang['srv_anl_suma1'] . '</td>';
+ echo '<td class="cell_grid">' . $lang['srv_anl_suma1'] . '</td>';
+
echo '</tr>';
+
+
+ # vodoravna vrstice s podatki
foreach (self::$_HEADERS[$spid]['grids'] AS $gid => $grids) {
$_cnt = 0;
- # vodoravna vrstice s podatki
- $css_back = ' anl_bck_desc_2';
+
echo '<tr>';
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$grids['variable'].'</td>';
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$grids['naslov'].'</td>';
+ echo '<td class="cell_var">'.$grids['variable'].'</td>';
+ echo '<td class="cell_subquestion">'.$grids['naslov'].'</td>';
if (self::$_SHOW_LEGENDA) {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$_tip.'</td>';
- echo '<td class="anl_br anl_bt'.$css_back.'">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
$_arguments = 0;
$_max_appropriate = 0;
$_max_cnt = 0;
+
// prikaz frekvenc
foreach ($grids['variables'] AS $vkey => $variable) {
$_sequence = $variable['sequence'];
@@ -2023,46 +2178,58 @@ class SurveyAnalysis {
$_percent = ($_valid > 0 ) ? $_cnt * 100 / $_valid : 0;
}
}
+
foreach ($grids['variables'] AS $vkey => $variable) {
if ($variable['other'] != true) {
$_sequence = $variable['sequence'];
$_cnt = self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
- echo '<td class="anl_bb anl_dash_br anl_ac cll_clps '.$css_back.'">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr id="'.$spid.'_'.$_sequence.'" name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac' . (self::$enableInspect == true && (int)$_cnt > 0 ? ' mc_inspect' : '').'"'
- . (self::$enableInspect == true && (int)$_cnt > 0 ? ' vkey="1"' : '')
- .' style="padding:5px 0px;">'.$_cnt.'</td>';
- echo '</tr>';
- echo '<tr name="single_sums_percent_'.$spid.'">';
- echo '<td style="padding:5px 0px;">';
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo '<table class="cell_table freq_row percent_row">';
+ echo ' <tr id="'.$spid.'_'.$_sequence.'" name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td class="' . (self::$enableInspect == true && (int)$_cnt > 0 ? ' mc_inspect' : '').'"'
+ . (self::$enableInspect == true && (int)$_cnt > 0 ? ' vkey="1"' : '')
+ .'>'.$_cnt.'</td>';
+ echo ' </tr>';
+
$_percent = ($_arguments > 0 ) ? $_cnt * 100 / $_arguments : 0;
+
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>';
echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr></table>';
+ echo ' </td>';
+ echo ' </tr>';
+ echo '</table>';
echo '</td>';
}
}
- echo '<td class="anl_bb anl_ac anl_dash_br cll_clps '.$css_back.'">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac" style="padding:5px 0px;">'.$_arguments.'</td>';
- echo '</tr>';
- echo '<tr name="single_sums_percent_'.$spid.'">';
- echo '<td style="padding:5px 0px;">';
+
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo '<table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td>'.$_arguments.'</td>';
+ echo ' </tr>';
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>';
$_percent = ($_arguments > 0 ) ? $_arguments * 100 / $_arguments : 0;
- echo self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr></table>';
+ echo self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo ' </td>';
+ echo ' </tr>';
+ echo '</table>';
+
echo '</td>';
+
echo '</tr>';
}
+
echo '</table>';
echo '</div>';
+
# izpišemo še tekstovne odgovore za polja drugo
if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
@@ -2073,7 +2240,6 @@ class SurveyAnalysis {
}
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -2083,6 +2249,7 @@ class SurveyAnalysis {
*/
static function sumHorizontalCheckbox($spid,$_from) {
global $lang;
+
$spremenljivka = self::$_HEADERS[$spid];
# preverimo ali prikazujemo spremenljivko, glede na veljavne odgovore in nastavitev
@@ -2093,7 +2260,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -2110,115 +2279,144 @@ class SurveyAnalysis {
foreach (self::$_HEADERS[$spid]['grids'][$gid]['variables'] AS $vid => $variable) {
$_sequence = $variable['sequence'];
- $_valid_cnt = max($_valid_cnt, self::$_FREQUENCYS[$_sequence]['validCnt']);
- $_approp_cnt = max($_approp_cnt, self::$_FREQUENCYS[$_sequence]['allCnt']);
+ $_valid_cnt = max(isset($_valid_cnt)?$_valid_cnt:0, self::$_FREQUENCYS[$_sequence]['validCnt']);
+ $_approp_cnt = max(isset($_approp_cnt)?$_approp_cnt:0, self::$_FREQUENCYS[$_sequence]['allCnt']);
if ($variable['other'] == true) {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
}
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_bl tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_bck_desc_1">';
+ echo '<table class="table_sums sums_hor_checkbox">';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_al anl_bck anl_bb anl_bck_desc_1" colspan="'. ($_clmn_cnt+(self::$_SHOW_LEGENDA ? 4 : 2)) .'">';
+
+ echo '<td class="cell_question" colspan="'. ($_clmn_cnt+(self::$_SHOW_LEGENDA ? 4 : 2)) .'">';
echo '<span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb">';
+
+
+ echo '<tr class="row2">';
+
+
+ echo '<td class="cell_icons cell_icons'.$spid.'" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
- echo '</td>';
+ echo ' </div>';
+ echo '</td>';
+
+
+
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line" colspan="'.$_clmn_cnt.'">'.$lang['srv_analiza_opisne_answers'];
- echo '<span id="img_analysis_f_p_1_'.$spid.'" class="img_analysis_f_p"><a href="javascript:show_single_percent(\''.$spid.'\',\'2\');">&nbsp(<span class="blue">f&nbsp;</span>/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '<span id="img_analysis_f_1_'.$spid.'" class="img_analysis_f displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'1\');">&nbsp(<span class="blue">f&nbsp;</span>/&nbsp;%)</a></span>';
- echo '<span id="img_analysis_p_1_'.$spid.'" class="img_analysis_p displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'0\');">&nbsp(f&nbsp;/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_valid'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_num_units'].'</td>';
- echo '</tr>';
+ echo '<td class="cell_value freq-p_cell" colspan="'.$_clmn_cnt.'">';
+ echo $lang['srv_analiza_opisne_answers'];
+ self::showFreqPercent($spid);
+ echo '</td>';
+
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_valid'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_num_units'].'</td>';
+
+ echo '</tr>';
+
- $bck_css = ' anl_bck_desc_2';
$_variables = self::$_HEADERS[$spid]['grids'][$gid]['variables'];
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb'.$bck_css .'">&nbsp;</td>';
- if (self::$_SHOW_LEGENDA) {
+ echo '<tr class="row3">';
+
+ echo '<td class="cell_var"></td>';
+
+ if (self::$_SHOW_LEGENDA) {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- echo '<td class="anl_bb anl_br anl_ac anl_legend anl_legenda_freq'.$bck_css.'">'.$_tip.'</td>';
- echo '<td class="anl_bb anl_br anl_ac anl_legend anl_legenda_freq'.$bck_css.'">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
foreach ($_variables AS $vkey => $variable) {
if ($variable['other'] != true) {
- echo '<td class="anl_bb anl_ac anl_dash_br'.$bck_css.'">' . $variable['naslov'] . '</td>';
+ echo '<td class="cell_value">' . $variable['naslov'] . '</td>';
}
}
- echo '<td class="anl_bb anl_bl anl_br anl_ac'.$bck_css.'">&nbsp;</td>';
- echo '<td class="anl_bb anl_br anl_ac'.$bck_css.'">&nbsp;</td>';
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
+
+
# vodoravna vrstice s podatki
echo '<tr name="single_sums_percent_cnt_'.$spid.'">';
- echo '<td class="anl_br anl_bt anl_ar anl_ita gray anl_dash_bb" colspan="'.(self::$_SHOW_LEGENDA ? 3 : 1).'">'.$lang['srv_analiza_frekvence_titleFrekvenca'].'</td>';
- // prikaz frekvenc
+
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 3 : 1).'">'.$lang['srv_analiza_frekvence_titleFrekvenca'].'</td>';
+
+ // prikaz frekvenc
foreach ($_variables AS $vkey => $variable) {
if ($variable['other'] != true) {
$_sequence = $variable['sequence'];
$cnt = self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
- echo '<td class="anl_p5 anl_bt anl_ac anl_dash_br anl_dash_bb">'.$cnt.'</td>';
+ echo '<td class="cell_value">'.$cnt.'</td>';
}
}
- echo '<td class="anl_bt anl_bl anl_ac anl_bb">'.$_valid_cnt.'</td>';
- echo '<td class="anl_bt anl_bl anl_ac anl_bb anl_br">'.$_approp_cnt.'</td>';
+ echo '<td class="cell_value">'.$_valid_cnt.'</td>';
+ echo '<td class="cell_value">'.$_approp_cnt.'</td>';
+
echo '</tr>';
+
// dodamo še veljavne procente
echo '<tr name="single_sums_percent_'.$spid.'" >';
- echo '<td class="anl_br anl_dash_bb anl_ar anl_ita gray" colspan="'.(self::$_SHOW_LEGENDA ? 3 : 1).'">'.$lang['srv_analiza_frekvence_titleOdstotekVeljavni'].'</td>';
- foreach ($_variables AS $vkey => $variable) {
+
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 3 : 1).'">'.$lang['srv_analiza_frekvence_titleOdstotekVeljavni'].'</td>';
+
+ foreach ($_variables AS $vkey => $variable) {
if ($variable['other'] != true) {
$_sequence = $variable['sequence'];
$cnt = self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
$percent = ( $_valid_cnt > 0) ? 100*$cnt / $_valid_cnt : 0;
- echo '<td class="anl_p5 anl_ac anl_dash_br anl_dash_bb">'.self::formatNumber($percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
+ echo '<td class="cell_value">'.self::formatNumber($percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
}
}
- echo '<td class="anl_bl">&nbsp;</td>';
- echo '<td>&nbsp;</td>';
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
// dodamo še procente
- echo '<tr name="single_sums_percent_'.$spid.'" >';
- echo '<td class="anl_br anl_ar anl_ita gray anl_bb" colspan="'.(self::$_SHOW_LEGENDA ? 3 : 1).'">'.$lang['srv_analiza_frekvence_titleOdstotekEnote'].'</td>';
+ echo '<tr name="single_sums_percent_'.$spid.'">';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 3 : 1).'">'.$lang['srv_analiza_frekvence_titleOdstotekEnote'].'</td>';
foreach ($_variables AS $vkey => $variable) {
if ($variable['other'] != true) {
$_sequence = $variable['sequence'];
$cnt = self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
$percent = ( $_approp_cnt > 0) ? 100*$cnt / $_approp_cnt : 0;
- echo '<td class="anl_p5 anl_ac anl_dash_br anl_bb">'.self::formatNumber($percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
+ echo '<td class="cell_value">'.self::formatNumber($percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
}
}
- echo '<td class="anl_bl">&nbsp;</td>';
- echo '<td>&nbsp;</td>';
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
echo '</table>';
+
# izpišemo še tekstovne odgovore za polja drugo
if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
@@ -2227,9 +2425,9 @@ class SurveyAnalysis {
echo '</div>';
}
}
+
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -2238,6 +2436,10 @@ class SurveyAnalysis {
$spremenljivka = self::$_HEADERS[$spid];
+ $_valid_cnt = array();
+ $_approp_cnt = array();
+ $_navedbe = array();
+
# preverimo ali prikazujemo spremenljivko, glede na veljavne odgovore in nastavitev
$all_categories_cnt = 0;
$only_valid = 0;
@@ -2248,7 +2450,9 @@ class SurveyAnalysis {
foreach ($grid['variables'] AS $vid => $variable ){
$all_categories_cnt++;
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -2270,17 +2474,17 @@ class SurveyAnalysis {
# ugotovimo koliko imamo kolon
if (count($spremenljivka['grids']) > 0)
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_clmn_cnt[$gid] = $grid['cnt_vars']-$grid['cnt_other'];
+ $_clmn_cnt[$gid] = $grid['cnt_vars']-(isset($grid['cnt_other']) ? $grid['cnt_other'] : 0);
if (count ($grid['variables']) > 0)
foreach ($grid['variables'] AS $vid => $variable) {
$_sequence = $variable['sequence'];
- $_valid_cnt[$gid] = max($_valid_cnt[$gid], self::$_FREQUENCYS[$_sequence]['validCnt']);
- $_approp_cnt[$gid] = max($_approp_cnt[$gid], self::$_FREQUENCYS[$_sequence]['allCnt']);
+ $_valid_cnt[$gid] = isset($_valid_cnt[$gid]) ? max($_valid_cnt[$gid], self::$_FREQUENCYS[$_sequence]['validCnt']) : self::$_FREQUENCYS[$_sequence]['validCnt'];
+ $_approp_cnt[$gid] = isset($_approp_cnt[$gid]) ? max($_approp_cnt[$gid], self::$_FREQUENCYS[$_sequence]['allCnt']) : self::$_FREQUENCYS[$_sequence]['allCnt'];
if ($variable['other'] == true) {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
$_valid[$gid][$vid] = self::$_FREQUENCYS[$_sequence]['valid'];
- $_navedbe[$gid] += self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
+ $_navedbe[$gid] = isset($_navedbe[$gid]) ? $_navedbe[$gid] += self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] : self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
}
}
$veljavni_percent = ($spremenljivka['tip'] == 2 || $spremenljivka['tip'] == 16) ? true : false;
@@ -2288,224 +2492,277 @@ class SurveyAnalysis {
$css_txt = 'anl_variabla_line';
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
echo '<div id="div_navedbe_1_'.$spid.'">';
- echo '<table class="anl_tbl anl_bt anl_br tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+
+ echo '<table class="table_sums sums_ver_checkbox navedbe1">';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 7+(int)$veljavni_percent : 5+(int)$veljavni_percent).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span> <span class="anl_variabla_info">('.$lang['srv_info_checkbox'].')</span>';
+
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 7+(int)$veljavni_percent : 5+(int)$veljavni_percent).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span> <span class="anl_variabla_info">('.$lang['srv_info_checkbox'].')</span>';
if (self::$_SHOW_LEGENDA && !$inline_legenda) {
echo '<div class="floatRight"><span>&nbsp;('.$_tip.')</span>'.'</div>';
}
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type">&nbsp;&nbsp;<span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
- echo '<span name="span_show_navedbe_2_'.$spid.'" class="span_navedbe"><a href="javascript:show_navedbe(\''.$spid.'\',\'2\');">&nbsp;(<span class="blue" title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '<span name="span_show_navedbe_3_'.$spid.'" class="span_navedbe displayNone"><a href="javascript:show_navedbe(\''.$spid.'\',\'1\');">&nbsp;(<span title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span class="blue" title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '</td>';
+
+ // Preklop navedbe/enote
+ self::showEnoteNavedbe($spid, $status='1');
+
+ echo '</td>';
+
echo '</tr>';
- $css_txt = 'anl_variabla_line';
- echo '<tr>';
- echo '<td class="anl_p5 anl_bl anl_br anl_ac anl_bck anl_bb anl_w110 '.$css_txt.'">';
+
+ echo '<tr class="row2">';
+
+
+ # variabla - več odgovorov
+ echo '<td class="cell_icons cell_icons'.$spid.' vec_odgovorov sum" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from, array('navedbe'=>false));
+ echo ' </div>';
echo '</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb '.$css_txt.'" style="width:280px">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
- if (self::$_SHOW_LEGENDA && $inline_legenda) {
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb anl_w70 '.$css_txt.'">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb anl_w110 '.$css_txt.'">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
- }
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb anl_w70 '.$css_txt.'">'.$lang['srv_analiza_opisne_frequency'].'</td>';
- echo '<td class="anl_p5 anl_ac anl_dash_br anl_bck anl_bb anl_w70 '.$css_txt.'">'.$lang['srv_analiza_opisne_valid'].'</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb anl_w70 '.$css_txt.'">% - '.$lang['srv_analiza_opisne_valid'].'</td>';
+ echo '<td class="cell_question">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
- echo '<td class="anl_p5 anl_'.($veljavni_percent?'dash_':'').'br anl_ac anl_bck anl_bb anl_w70 '.$css_txt.'">'.$lang['srv_analiza_num_units_valid'].'</td>';
+ if (self::$_SHOW_LEGENDA && $inline_legenda) {
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ }
+
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_frequency'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_valid'].'</td>';
+ echo '<td class="cell_value">% - '.$lang['srv_analiza_opisne_valid'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_num_units_valid'].'</td>';
if ($veljavni_percent) {
- echo '<td class="anl_p5 anl_ac anl_bck anl_bb anl_w70 '.$css_txt.'">% - '.$lang['srv_analiza_num_units_valid'].'</td>';
+ echo '<td class="cell_value">% - '.$lang['srv_analiza_num_units_valid'].'</td>';
}
+
echo '</tr>';
- $cssBack = "anl_bck anl_variabla_line ";
-
+
$_max_valid = 0;
$_max_appropriate = 0;
- if (count ($spremenljivka['grids']) > 0)
+ if (count ($spremenljivka['grids']) > 0){
+
foreach ($spremenljivka['grids'] as $gid => $grid) {
- $_max_valid = 0;
- $_max_appropriate = 0;
- if (count ($grid['variables']) > 0)
- foreach ($grid['variables'] AS $vid => $variable) {
- $_sequence = $variable['sequence'];
- #po potrebi prikažemo samo tiste ki imajo vrednosti
- if (($all_categories_cnt <= AUTO_HIDE_ZERRO_VALUE) || (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] > 0 )
- if ($variable['other'] != 1) {
-
-
- # dodamo labele podvprašanja
- if ($spremenljivka['tip'] == 16 && (($vid == 0 && $gid != 0) || ($vid == 0 && $gid == 0))) {
- $cssBack = "anl_bck_desc_2 ".($vid == 0 && $gid != 0 ? 'anl_double_bt ' : '');
- echo '<tr>';
- echo '<td class="'.$cssBack.'anl_bl anl_br anl_bb anl_ac anl_variabla_sub">'.$grid['variable'].'</td>';
- echo '<td class="'.$cssBack.'anl_br anl_bb" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 7+(int)$veljavni_percent : 5+(int)$veljavni_percent ).'">'.$grid['naslov'].'</td>';
- echo '</tr>';
- }
- $cssBack = "anl_bck_desc_2 ";
- echo '<tr id="'.$spid.'_'.$_sequence.'" name="valid_row_'.$_sequence.'" vkey="1">';
- echo '<td class="anl_p5 anl_tin1 '.$cssBack.'anl_bl anl_br anl_bb anl_ac anl_variabla_sub">'.$variable['variable'].'</td>';
- echo '<td class="anl_p5 anl_tin1 '.$cssBack.'anl_br anl_bb">'.$variable['naslov'].'</td>';
- if (self::$_SHOW_LEGENDA && $inline_legenda) {
- echo '<td class="anl_p5 '.$cssBack.'anl_br anl_bb anl_ac">'.$_tip.'</td>';
- echo '<td class="anl_p5 '.$cssBack.'anl_br anl_bb anl_ac">'.$_oblika.'</td>';
- }
- echo '<td class="anl_p5 anl_bb anl_ac anl_br '.$cssBack.( self::$enableInspect == true ? ' fr_inspect' : '').'" >';
- echo (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
- echo '</td>';
-
- $_max_appropriate = max($_max_appropriate, (int)self::$_FREQUENCYS[$_sequence]['allCnt']);
- $_max_valid = max ($_max_valid, ((int)(self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)self::$_FREQUENCYS[$_sequence]['valid']['0']['cnt'])));
-
- # veljavno
- echo '<td class="anl_p5 anl_dash_br anl_ac anl_bb '.$cssBack.'">';
- echo (int)(self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)self::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']);
- echo '</td>';
- echo '<td class="anl_p5 anl_bb anl_br anl_ac '.$cssBack.'" >';
- $_percent = (self::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] / self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
- echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- #ustrezno
- echo '<td class="anl_p5 anl_'.($veljavni_percent?'dash_':'').'br anl_ac anl_bb '.$cssBack.'">';
- echo (int)self::$_FREQUENCYS[$_sequence]['allCnt'];
- echo '</td>';
- # veljavno %
- if ($veljavni_percent) {
+ $_max_valid = 0;
+ $_max_appropriate = 0;
- $valid = (int)(self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)self::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']);
- $valid = (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
- $_percent = ($_max_appropriate > 0 ) ? 100*$valid / $_max_appropriate : 0;
-
- echo '<td class="anl_p5 anl_br anl_ac anl_bb '.$cssBack.'">';
- echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- }
- echo '</tr>';
+ if (count ($grid['variables']) > 0){
- } else {
- # drugo
- }
- }
- $cssBack = " anl_bck_2 red";
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb anl_al anl_ita'.$cssBack.'" >&nbsp;</td>';
- echo '<td class="anl_p5 anl_tin1 anl_br anl_bl anl_bb anl_al anl_ita'.$cssBack.'" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 3 : 1).'">'.$lang['srv_anl_suma_valid'].'</td>';
- echo '<td class="anl_bb anl_ac anl_br anl_ita'.$cssBack.'" >&nbsp;</td>'; //.$_approp_cnt[$gid].
- echo '<td class="anl_p5 anl_ac anl_dash_br anl_bb anl_ita'.$cssBack.'">'.$_max_valid.'</td>';
- echo '<td class="anl_bb anl_br'.$cssBack.'">&nbsp;</td>'; //.self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%')
+ foreach ($grid['variables'] AS $vid => $variable) {
+ $_sequence = $variable['sequence'];
-
- echo '<td class="anl_p5 anl_'.($veljavni_percent?'dash_':'').'br anl_ac anl_bb anl_ita'.$cssBack.'">'.$_max_appropriate.'</td>'; //$lang['srv_anl_suma_entries']
- if ($veljavni_percent) {
- $_percent = ($_max_appropriate > 0 ) ? 100*$_max_valid / $_max_appropriate : 0;
- echo '<td class="anl_p5 anl_br anl_ac anl_bb anl_ita'.$cssBack.'">';
- echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- }
- echo '</tr>';
-
+ #po potrebi prikažemo samo tiste ki imajo vrednosti
+ if (($all_categories_cnt <= AUTO_HIDE_ZERRO_VALUE) || (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] > 0 ){
+ if ($variable['other'] != 1) {
+
+ # dodamo labele podvprašanja
+ if ($spremenljivka['tip'] == 16 && (($vid == 0 && $gid != 0) || ($vid == 0 && $gid == 0))) {
+ echo '<tr class="row3">';
+ echo '<td class="cell_var">'.$grid['variable'].'</td>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 7+(int)$veljavni_percent : 5+(int)$veljavni_percent ).'">'.$grid['naslov'].'</td>';
+ echo '</tr>';
+ }
+
+ echo '<tr id="'.$spid.'_'.$_sequence.'" name="valid_row_'.$_sequence.'" vkey="1">';
+ echo '<td class="cell_var">'.$variable['variable'].'</td>';
+ echo '<td class="cell_question">'.$variable['naslov'].'</td>';
+ if (self::$_SHOW_LEGENDA && $inline_legenda) {
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
+ }
+ echo '<td class="cell_value">';
+ echo (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
+ echo '</td>';
+
+ $_max_appropriate = max($_max_appropriate, (int)self::$_FREQUENCYS[$_sequence]['allCnt']);
+ $_max_valid = max ($_max_valid, ((int)(self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)self::$_FREQUENCYS[$_sequence]['valid']['0']['cnt'])));
+
+ # veljavno
+ echo '<td class="cell_value">';
+ echo (int)(self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)self::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']);
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ $_percent = (self::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] / self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo '</td>';
+
+ # ustrezno
+ echo '<td class="cell_value">';
+ echo (int)self::$_FREQUENCYS[$_sequence]['allCnt'];
+ echo '</td>';
+
+ # veljavno %
+ if ($veljavni_percent) {
+
+ $valid = (int)(self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt']+(int)self::$_FREQUENCYS[$_sequence]['valid']['0']['cnt']);
+ $valid = (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'];
+ $_percent = ($_max_appropriate > 0 ) ? 100*$valid / $_max_appropriate : 0;
+
+ echo '<td class="cell_value">';
+ echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo '</td>';
+ }
+ echo '</tr>';
+
+ }
+ }
+ else {
+ # drugo
+ }
+ }
+ }
+
+
+ echo '<tr class="row_var">';
+
+ echo '<td class="cell_var"></td>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 3 : 1).'">'.$lang['srv_anl_suma_valid'].'</td>';
+ echo '<td class="cell_value">/</td>';
+ echo '<td class="cell_value">'.$_max_valid.'</td>';
+ echo '<td class="cell_value">/</td>';
+
+ echo '<td class="cell_value">'.$_max_appropriate.'</td>';
+ if ($veljavni_percent) {
+ $_percent = ($_max_appropriate > 0 ) ? 100*$_max_valid / $_max_appropriate : 0;
+ echo '<td class="cell_value">';
+ echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo '</td>';
+ }
+ echo '</tr>';
+ }
}
echo '</table>';
echo '</div>'; // div_navedbe_1_'.$spid.'
+
# še navedbe
echo '<div id="div_navedbe_2_'.$spid.'" class="div_navedbe displayNone">';
- echo '<table class="anl_tbl anl_bt anl_br tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+
+ echo '<table class="table_sums sums_ver_checkbox navedbe2">';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda? 5 : 3).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda? 5 : 3).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA && !$inline_legenda) {
echo '<div class="floatRight"><span>&nbsp;('.$_tip.')</span>'.'</div>';
}
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type">&nbsp;&nbsp;<span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
- echo '<span name="span_show_navedbe_2_'.$spid.'" class="span_navedbe"><a href="javascript:show_navedbe(\''.$spid.'\',\'2\');">&nbsp;(<span class="blue" title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '<span name="span_show_navedbe_3_'.$spid.'" class="span_navedbe displayNone"><a href="javascript:show_navedbe(\''.$spid.'\',\'1\');">&nbsp;(<span title="'.$lang['srv_enote_navedbe_1'].'">'.$lang['srv_analiza_opisne_units'].'&nbsp;</span>/<span class="blue" title="'.$lang['srv_enote_navedbe_2'].'">&nbsp;'.$lang['srv_analiza_opisne_arguments'].'</span>)</a></span>';
- echo '</td>';
+
+ // Preklop navedbe/enote
+ self::showEnoteNavedbe($spid, $status='2');
+
+ echo '</td>';
+
echo '</tr>';
- $css_txt = 'anl_variabla_line';
- echo '<tr>';
- echo '<td class="anl_p5 anl_bl anl_br anl_ac anl_bck anl_bb anl_w110 '.$css_txt.'">';
+
+
+ echo '<tr class="row2">';
+
+
+ # variabla
+ echo '<td class="cell_icons cell_icons'.$spid.' test" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'_2\')" > </span>';
+ echo ' <div class= "options " id="options'.$spid.'_2">';
self::showIcons($spid,$spremenljivka,$_from, array('navedbe'=>true));
+ echo ' </div>';
echo '</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb '.$css_txt.'" style="width:280px">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
+
+ echo '<td class="cell_question">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
if (self::$_SHOW_LEGENDA && $inline_legenda) {
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb anl_w70 '.$css_txt.'">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb anl_w110 '.$css_txt.'">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_p5 anl_dash_br anl_ac anl_bck anl_bb '.$css_txt.'">'.$lang['srv_analiza_opisne_frequency'].'</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb '.$css_txt.'">%</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_frequency'].'</td>';
+ echo '<td class="cell_value">%</td>';
echo '</td>';
+
echo '</tr>';
- $cssBack = "anl_bck anl_variabla_line ";
-
- if (count ($spremenljivka['grids']) > 0)
+
+ if (count ($spremenljivka['grids']) > 0){
+
foreach ($spremenljivka['grids'] as $gid => $grid) {
- if (count ($grid['variables']) > 0)
- foreach ($grid['variables'] AS $vid => $variable) {
- $_sequence = $variable['sequence'];
- #po potrebi prikažemo samo tiste ki imajo vrednosti
- if (($all_categories_cnt <= AUTO_HIDE_ZERRO_VALUE) || (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] > 0 )
- if ($variable['other'] != 1) {
-
- # dodamo labele podvprašanja
- if ($spremenljivka['tip'] == 16 && (($vid == 0 && $gid != 0) || ($vid == 0 && $gid == 0))) {
- $cssBack = 'anl_bck_desc_2'.($vid == 0 && $gid != 0 ? ' anl_double_bt ' : '');
- echo '<tr>';
- echo '<td class="anl_p5 '.$cssBack.' anl_bl anl_br anl_bb anl_ac anl_variabla_sub">'.$grid['variable'].'</td>';
- echo '<td class="anl_p5 '.$cssBack.' anl_br anl_bb"'.(self::$_SHOW_LEGENDA && $inline_legenda ? ' colspan="5"' : ' colspan="3"' ).'>'.$grid['naslov'].'</td>';
- echo '</tr>';
- }
- $cssBack = "anl_bck_desc_2 ";
- echo '<tr>';
- echo '<td class="anl_p5 anl_tin1 '.$cssBack.'anl_bl anl_br anl_bb anl_ac anl_variabla_sub">'.$variable['variable'].'</td>';
- echo '<td class="anl_p5 anl_tin1 '.$cssBack.'anl_br anl_bb">'.$variable['naslov'].'</td>';
- if (self::$_SHOW_LEGENDA && $inline_legenda) {
- echo '<td class="anl_p5 '.$cssBack.'anl_br anl_bb anl_ac">'.$_tip.'</td>';
- echo '<td class="anl_p5 '.$cssBack.'anl_br anl_bb anl_ac">'.$_oblika.'</td>';
- }
-
- echo '<td class="anl_p5 anl_dash_br anl_ac anl_bb '.$cssBack.'">'. self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'].'</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bb '.$cssBack.'">';
- $_percent = ($_navedbe[$gid] > 0 ) ? 100*self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] / $_navedbe[$gid] : 0;
- echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr>';
- } else {
- # drugo
- }
+ if (count ($grid['variables']) > 0){
+
+ foreach ($grid['variables'] AS $vid => $variable) {
+
+ $_sequence = $variable['sequence'];
+
+ #po potrebi prikažemo samo tiste ki imajo vrednosti
+ if (($all_categories_cnt <= AUTO_HIDE_ZERRO_VALUE) || (int)self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] > 0 ){
+ if ($variable['other'] != 1) {
+
+ # dodamo labele podvprašanja
+ if ($spremenljivka['tip'] == 16 && (($vid == 0 && $gid != 0) || ($vid == 0 && $gid == 0))) {
+ echo '<tr>';
+ echo '<td class="cell_var">'.$grid['variable'].'</td>';
+ echo '<td class="cell_question"'.(self::$_SHOW_LEGENDA && $inline_legenda ? ' colspan="5"' : ' colspan="3"' ).'>'.$grid['naslov'].'</td>';
+ echo '</tr>';
+ }
+
+ echo '<tr>';
+
+ echo '<td class="cell_var">'.$variable['variable'].'</td>';
+ echo '<td class="cell_question">'.$variable['naslov'].'</td>';
+
+ if (self::$_SHOW_LEGENDA && $inline_legenda) {
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
+ }
+
+ echo '<td class="cell_value">'. self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'].'</td>';
+ echo '<td class="cell_value">';
+ $_percent = ($_navedbe[$gid] > 0 ) ? 100*self::$_FREQUENCYS[$_sequence]['valid']['1']['cnt'] / $_navedbe[$gid] : 0;
+ echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo '</td>';
+
+ echo '</tr>';
+ }
+ }
+ else {
+ # drugo
+ }
+ }
+ }
}
- $cssBack = " anl_bck_2 red";
+
echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bb anl_al anl_ita'.$cssBack.'" >&nbsp;</td>';
- echo '<td class="anl_p5 anl_tin1 anl_bl anl_br anl_bb anl_al anl_ita'.$cssBack.'" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 3 : 1).'">'.$lang['srv_anl_suma_valid'].'</td>';
- echo '<td class="anl_p5 anl_dash_br anl_ac anl_bb anl_ita'.$cssBack.'">'.$_navedbe[$gid].'</td>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bb anl_ita'.$cssBack.'">'.self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
- echo '</tr>';
-
+
+ echo '<td class="cell_var"></td>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA && $inline_legenda ? 3 : 1).'">'.$lang['srv_anl_suma_valid'].'</td>';
+ echo '<td class="cell_value">'.$_navedbe[$gid].'</td>';
+ echo '<td class="cell_value">'.self::formatNumber('100',SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
+
+ echo '</tr>';
}
+
echo '</table>';
+
echo '</div>'; // Konec div_navedbe_2_$spid
+
# izpišemo še tekstovne odgovore za polja drugo
if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
@@ -2514,9 +2771,9 @@ class SurveyAnalysis {
echo '</div>';
}
}
+
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -2538,7 +2795,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -2546,9 +2805,7 @@ class SurveyAnalysis {
return;
}
- #$_invalidAnswers = self :: getInvalidAnswers (MISSING_TYPE_FREQUENCY);
$_invalidAnswers = self :: getInvalidAnswers (MISSING_TYPE_DESCRIPTOR);
- #$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
# opcije nareedimo posebej, da po potrebi zajamemo tudi misinge
$str_qry = "SELECT id, spr_id, REPLACE(REPLACE(REPLACE(naslov,'\n',' '),'\r','<br>'),'|',' ') as naslov, variable, other, part, REPLACE(REPLACE(REPLACE(naslov_graf,'\n',' '),'\r','<br>'),'|',' ') as naslov_graf, vrstni_red FROM srv_grid WHERE spr_id='".$spid."' ORDER BY vrstni_red";
@@ -2579,56 +2836,75 @@ class SurveyAnalysis {
}
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
- echo '<table class="anl_tbl anl_ba tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_bck_desc_1">';
+
+ echo '<table class="table_sums sums_hor">';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_al anl_bck anl_bb anl_bck_desc_1" colspan="'. ($_clmn_cnt+$add_fld+(self::$_SHOW_LEGENDA ? 5+$_sub_question_col : 3+$_sub_question_col)) .'">';
+
+ echo '<td class="cell_question" colspan="'. ($_clmn_cnt+$add_fld+(self::$_SHOW_LEGENDA ? 5+$_sub_question_col : 3+$_sub_question_col)) .'">';
echo '<span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- $css_txt = 'anl_variabla_line';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb">';
+
+ echo '<tr class="row2">';
+
+
+ # variabla - tabela en odgovor
+ echo '<td class="cell_icons cell_icons'.$spid.' tabela_en_odgovor" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
+
if ($_sub_question_col) {
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb '.$css_txt.'" style="width:280px">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
+ echo '<td class="cell_subquestion" style="width:280px">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
}
+
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line" colspan="'.($_clmn_cnt+1).'">'.$lang['srv_analiza_opisne_answers'];
- echo '<span id="img_analysis_f_p_1_'.$spid.'" class="img_analysis_f_p"><a href="javascript:show_single_percent(\''.$spid.'\',\'2\');">&nbsp(<span class="blue">f&nbsp;</span>/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '<span id="img_analysis_f_1_'.$spid.'" class="img_analysis_f displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'1\');">&nbsp(<span class="blue">f&nbsp;</span>/&nbsp;%)</a></span>';
- echo '<span id="img_analysis_p_1_'.$spid.'" class="img_analysis_p displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'0\');">&nbsp(f&nbsp;/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_valid'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_num_units'].'</td>';
+
+ echo '<td class="cell_grid freq-p_cell" colspan="'.($_clmn_cnt+1).'">';
+ echo $lang['srv_analiza_opisne_answers'];
+ self::showFreqPercent($spid);
+ echo '</td>';
+
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_valid'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_num_units'].'</td>';
if ($additional_field) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_odklon'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_odklon'].'</td>';
}
+
echo '</tr>';
- $cssBack = "anl_bck_0_0 ";
+
$_variables = $grid['variables'];
- echo '<tr>';
- echo '<td class="anl_tin ' . $cssBack . 'anl_bl anl_br anl_bb">&nbsp;</td>';
+
+ echo '<tr class="row3">';
+
+ echo '<td class="cell_var"></td>';
+
if ( $_sub_question_col ) {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
+ echo '<td class="cell_subquestion"></td>';
}
+
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -2637,8 +2913,8 @@ class SurveyAnalysis {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">&nbsp;</td>'; //$_tip
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">&nbsp;</td>'; // $_oblika
+ echo '<td class="cell_info"></td>'; //$_tip
+ echo '<td class="cell_info"></td>'; // $_oblika
}
//nastavitve iz baze za ureditev pravilnega izrisa analize za tabelo s trakom
@@ -2646,150 +2922,193 @@ class SurveyAnalysis {
$spremenljivkaParams = new enkaParameters($row['params']);
$diferencial_trak = ($spremenljivkaParams->get('diferencial_trak') ? $spremenljivkaParams->get('diferencial_trak') : 0);
$diferencial_trak_starting_num = ($spremenljivkaParams->get('diferencial_trak_starting_num') ? $spremenljivkaParams->get('diferencial_trak_starting_num') : 0);
- //nastavitve iz baze za ureditev pravilnega izrisa analize za tabelo s trakom
if (count($spremenljivka['options']) > 0) {
foreach ( $spremenljivka['options'] as $key => $kategorija) {
- if($diferencial_trak){ //ce je trak, je potrebno naslove stolpcev spremeniti v vrednosti na traku
+
+ if($diferencial_trak){ //ce je trak, je potrebno naslove stolpcev spremeniti v vrednosti na traku
$_label = $diferencial_trak_starting_num;
$diferencial_trak_starting_num++;
- }else{
+ }
+ else{
// misinge imamo zdruzene
$_label = $kategorija;
}
- echo '<td class="' . $cssBack . ' anl_bb anl_ac anl_dash_br ">'.$_label.'</td>';
+ echo '<td class="cell_grid">'.$_label.'</td>';
}
}
- echo '<td class="' . $cssBack . ' anl_bb anl_br anl_ac red anl_w70">'.$lang['srv_anl_suma1'].'</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
- if ($additional_field) {
+ echo '<td class="cell_grid">'.$lang['srv_anl_suma1'].'</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
+ if ($additional_field) {
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
}
+
echo '</tr>';
$part=null;
- #zlopamo skozi gride
- if (count($spremenljivka['grids']) > 0)
- foreach ($spremenljivka['grids'] AS $gid => $grid) {
-
- # za dvojne gride
- if ((int)$grid['part'] > 0) {
- if ($part == null || $part == $grid['part'] ) {
- $part_css = '';
- } else {
- $part_css = ' anl_double_bt ';
- }
- $part = $grid['part'];
- }
- else {
- $part_css = '';
- }
-
- $cssBack = "anl_bck_desc_2 ";
- # zloopamo skozi variable
- if (count($grid['variables']) > 0)
- foreach ($grid['variables'] AS $vid => $variable ) {
- $_sequence = $variable['sequence'];
- #popotrebi izpisujemo samo veljavne
- if ((count($spremenljivka['grids']) <= AUTO_HIDE_ZERRO_VALUE ||
- (self::$_FREQUENCYS[$_sequence]['allCnt'] - self::$_FREQUENCYS[$_sequence]['invalidCnt']) > 0))
- if ($variable['other'] != true) {
- echo '<tr id="'.$spid.'_'.$_sequence.'"'.($part_css != '' ? ' class="'.$part_css.'"' : '').'>';
- if ($_sub_question_col) {
- echo '<td class="anl_tin1 ' . $cssBack . 'anl_bl anl_br anl_bb anl_ac anl_variabla_sub">';
-
- echo $variable['variable'];
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">';
- echo $variable['naslov'];
+ # zlopamo skozi gride
+ if (count($spremenljivka['grids']) > 0){
- // dodatek desne strani sem. diferenciala
- echo ($spremenljivka['enota'] == 1) ? ' - '.$variable['naslov2'] : '';
- echo '</td>';
- } else {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
- }
- if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">'.$_tip.'</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">'.$_oblika.'</td>';
- }
- # za odklon in povprečje
- $sum_xi_fi=0;
- $N = 0;
- $div=0;
- if (count($spremenljivka['options']) > 0) {
- foreach ( $spremenljivka['options'] as $key => $kategorija) {
- if ($additional_field) { # za odklon in povprečje
- $xi = $key;
- $fi = self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'];
- $sum_xi_fi += $xi * $fi ;
- $N += $fi;
- }
- echo '<td class="anl_bb anl_dash_br anl_ac cll_clps ' . $cssBack . '">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac'.(self::$enableInspect == true && (int)self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] > 0 ? ' mg_inspect' : '').'"'
- .(self::$enableInspect == true && (int)self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] > 0 ? ' vkey="'.$key.'"' : '')
- .' style="padding:5px 0px;">'.self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'].'</td>';
- echo '</tr><tr name="single_sums_percent_'.$spid.'">';
- echo '<td style="padding:5px 0px;">';
- $_percent = (self::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] * 100 / self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
- echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr></table>';
- echo '</td>';
-
-
- }
- }
- // suma
- echo '<td class="anl_bb anl_br anl_ac cll_clps ' . $cssBack . '">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac red" style="padding:5px 0px;">'.((int)self::$_FREQUENCYS[$_sequence]['validCnt']).'</td>';
- echo '</tr><tr name="single_sums_percent_'.$spid.'">';
- echo '<td class="red" style="padding:5px 0px;">'.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
- echo '</tr></table>';
- echo '</td>';
- // zamenjano veljavni ustrezni
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac" >';
- echo (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
- echo '</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac" >'.(int)self::$_FREQUENCYS[$_sequence]['allCnt'].'</td>';
- if ($additional_field) { # za odklon in povprečje
- # povprečje
- $avg = ($N > 0) ? $sum_xi_fi / $N : 0;
- #standardna diviacija
- $div = 0;
- $sum_pow_xi_fi_avg = 0;
- if (count($spremenljivka['options']) > 0) {
- foreach ( $spremenljivka['options'] as $xi => $kategorija) {
- $fi = self::$_FREQUENCYS[$_sequence]['valid'][$xi]['cnt'];
- $sum_pow_xi_fi_avg += pow(($xi - $avg),2) * $fi;
- }
- }
- $div = (($N -1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($N -1)) : 0;
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac" >';
- echo self::formatNumber($avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac" >';
- echo self::formatNumber($div,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
- echo '</td>';
- }
- echo '</tr>';
-
- } else {
- # immamo polje drugo
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
- }
- }
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+
+ # za dvojne gride
+ if (isset($grid['part']) && (int)$grid['part'] > 0) {
+ if ($part == null || $part == $grid['part'] ) {
+ $part_css = '';
+ } else {
+ $part_css = ' anl_double_bt ';
+ }
+ $part = $grid['part'];
+ }
+ else {
+ $part_css = '';
+ }
+
+
+ # zloopamo skozi variable
+ if (count($grid['variables']) > 0){
+
+ foreach ($grid['variables'] AS $vid => $variable ) {
+
+ $_sequence = $variable['sequence'];
+
+ $invalid_count = isset(self::$_FREQUENCYS[$_sequence]['invalidCnt']) ? self::$_FREQUENCYS[$_sequence]['invalidCnt'] : 0;
+ $all_count = isset(self::$_FREQUENCYS[$_sequence]['allCnt']) ? self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
+
+
+ #popotrebi izpisujemo samo veljavne
+ if (count($spremenljivka['grids']) <= AUTO_HIDE_ZERRO_VALUE || ($all_count-$invalid_count) > 0){
+
+ if ($variable['other'] != true) {
+ echo '<tr id="'.$spid.'_'.$_sequence.'"'.($part_css != '' ? ' class="'.$part_css.'"' : '').'>';
+
+ if ($_sub_question_col) {
+ echo '<td class="cell_var">';
+ echo $variable['variable'];
+ echo '</td>';
+
+ echo '<td class="cell_subquestion">';
+ echo $variable['naslov'];
+
+ // dodatek desne strani sem. diferenciala
+ echo (isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1) ? ' - '.$variable['naslov2'] : '';
+ echo '</td>';
+ }
+ else {
+ echo '<td class="cell_subquestion"></td>';
+ }
+
+ if (self::$_SHOW_LEGENDA) {
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
+ }
+
+ # za odklon in povprečje
+ $sum_xi_fi=0;
+ $N = 0;
+ $div=0;
+ if (count($spremenljivka['options']) > 0) {
+
+ foreach ( $spremenljivka['options'] as $key => $kategorija) {
+ if ($additional_field) { # za odklon in povprečje
+ $xi = $key;
+ $fi = self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'];
+ $sum_xi_fi += $xi * $fi ;
+ $N += $fi;
+ }
+
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td class="'.(self::$enableInspect == true && (int)self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] > 0 ? ' mg_inspect' : '').'"'
+ .(self::$enableInspect == true && (int)self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] > 0 ? ' vkey="'.$key.'"' : '')
+ .'>'.self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'].'</td>';
+ echo ' </tr>';
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+
+ echo ' <td>';
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']) && self::$_FREQUENCYS[$_sequence]['validCnt'] > 0)
+ $_percent = self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'] * 100 / self::$_FREQUENCYS[$_sequence]['validCnt'];
+ else
+ $_percent = 0;
+ echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo ' </td>';
+
+ echo ' </tr>';
+ echo ' </table>';
+
+ echo '</td>';
+ }
+ }
+
+ // suma
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td>'.(isset(self::$_FREQUENCYS[$_sequence]['validCnt']) ? (int)self::$_FREQUENCYS[$_sequence]['validCnt'] : 0).'</td>';
+ echo ' </tr>';
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>'.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
+ echo ' </tr>';
+ echo ' </table>';
+
+ echo '</td>';
+
+ // zamenjano veljavni ustrezni
+ echo '<td class="cell_value">';
+ echo (isset(self::$_FREQUENCYS[$_sequence]['validCnt']) ? (int)self::$_FREQUENCYS[$_sequence]['validCnt'] : '0');
+ echo '</td>';
+
+ echo '<td class="cell_value">'.(int)self::$_FREQUENCYS[$_sequence]['allCnt'].'</td>';
+
+ if ($additional_field) { # za odklon in povprečje
+
+ # povprečje
+ $avg = ($N > 0) ? $sum_xi_fi / $N : 0;
+
+ #standardna diviacija
+ $div = 0;
+ $sum_pow_xi_fi_avg = 0;
+
+ if (count($spremenljivka['options']) > 0) {
+ foreach ( $spremenljivka['options'] as $xi => $kategorija) {
+ $fi = self::$_FREQUENCYS[$_sequence]['valid'][$xi]['cnt'];
+ $sum_pow_xi_fi_avg += pow(($xi - $avg),2) * $fi;
+ }
+ }
+
+ $div = (($N -1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($N -1)) : 0;
+
+ echo '<td class="cell_value">';
+ echo self::formatNumber($avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo self::formatNumber($div,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
+ echo '</td>';
+ }
+
+ echo '</tr>';
+ }
+ }
+ else {
+ # immamo polje drugo
+ $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ }
+ }
+ }
+ }
}
+
echo '</table>';
# izpišemo še tekstovne odgovore za polja drugo
@@ -2803,7 +3122,6 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -2824,7 +3142,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -2839,116 +3159,146 @@ class SurveyAnalysis {
$_sub_question_col = 6;
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
- echo '<table class="anl_tbl anl_ba tbl_clps">';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_bck_desc_1">';
+ echo '<table class="table_sums sums_double_hor">';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_br anl_al anl_bck anl_bb anl_bck_desc_1" colspan="'. ($_clmn_cnt+2+$_sub_question_col+(self::$_SHOW_LEGENDA ? 2 : 0)) .'">';
+
+ echo '<td class="cell_question" colspan="'. ($_clmn_cnt+2+$_sub_question_col+(self::$_SHOW_LEGENDA ? 2 : 0)) .'">';
echo '<span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- $css_txt = 'anl_variabla_line';
- echo '<tr>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb">';
+
+ echo '<tr class="row2">';
+
+
+ echo '<td class="cell_icons cell_icons'.$spid.' test" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
+
if ($_sub_question_col) {
- echo '<td class="anl_p5 anl_br anl_ac anl_bck anl_bb '.$css_txt.'" style="width:280px">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
+ echo '<td class="cell_subquestion">'.$lang['srv_analiza_opisne_subquestion'].'</td>';
}
+
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w110 anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line" colspan="'.($_clmn_cnt+6).'">'.$lang['srv_analiza_opisne_answers'];
- echo '<span id="img_analysis_f_p_1_'.$spid.'" class="img_analysis_f_p"><a href="javascript:show_single_percent(\''.$spid.'\',\'2\');">&nbsp(<span class="blue">f&nbsp;</span>/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '<span id="img_analysis_f_1_'.$spid.'" class="img_analysis_f displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'1\');">&nbsp(<span class="blue">f&nbsp;</span>/&nbsp;%)</a></span>';
- echo '<span id="img_analysis_p_1_'.$spid.'" class="img_analysis_p displayNone"><a href="javascript:show_single_percent(\''.$spid.'\',\'0\');">&nbsp(f&nbsp;/<span class="blue">&nbsp;%</span>)</a></span>';
- echo '</td>';
- #št. enot
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_variabla_line" >&nbsp;</td>';
+
+ echo '<td class="cell_grid freq-p_cell" colspan="'.($_clmn_cnt+6).'">';
+ echo $lang['srv_analiza_opisne_answers'];
+ self::showFreqPercent($spid);
+ echo '</td>';
+
+ # št. enot
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
- #naslovi podskupin
- $cssBack = "anl_bck_0_0 ";
+
+
+ # naslovi podskupin
$_variables = $grid['variables'];
- echo '<tr>';
- echo '<td class="anl_tin ' . $cssBack . 'anl_bl anl_br anl_bb">&nbsp;</td>';
+
+ echo '<tr class="row3">';
+
+ echo '<td class="cell_var"></td>';
+
if ( $_sub_question_col ) {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
+ echo '<td class="cell_subquestion"></td>';
}
+
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
+ }
+ else {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">&nbsp;</td>'; //$_tip
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">&nbsp;</td>'; // $_oblika
+
+ echo '<td class="cell_info"></td>'; //$_tip
+ echo '<td class="cell_info"></td>'; // $_oblika
}
- echo '<td class="' . $cssBack . ' anl_bb anl_ac anl_br" colspan="'.(count($spremenljivka['options'])+3).'">'.($spremenljivka['double'][1]['subtitle'] == '' ? $lang['srv_grid_subtitle_def'].' 1' : $spremenljivka['double'][1]['subtitle']).'</td>';
- echo '<td class="' . $cssBack . ' anl_bb anl_ac anl_br" colspan="'.(count($spremenljivka['options'])+3).'">'.($spremenljivka['double'][2]['subtitle'] == '' ? $lang['srv_grid_subtitle_def'].' 2' : $spremenljivka['double'][2]['subtitle']).'</td>';
- #št. enot
- echo '<td class="' . $cssBack . ' anl_bb anl_ac anl_br" >&nbsp;</td>';
+
+ echo '<td class="cell_grid" colspan="'.(count($spremenljivka['options'])+3).'">'.($spremenljivka['double'][1]['subtitle'] == '' ? $lang['srv_grid_subtitle_def'].' 1' : $spremenljivka['double'][1]['subtitle']).'</td>';
+ echo '<td class="cell_grid" colspan="'.(count($spremenljivka['options'])+3).'">'.($spremenljivka['double'][2]['subtitle'] == '' ? $lang['srv_grid_subtitle_def'].' 2' : $spremenljivka['double'][2]['subtitle']).'</td>';
+
+ #št. enot
+ echo '<td class="cell_value"></td>';
echo '</tr>';
+
# naslovi variabel
- $cssBack = "anl_bck_0_0 ";
$_variables = $grid['variables'];
- echo '<tr>';
- echo '<td class="anl_tin ' . $cssBack . 'anl_bl anl_br anl_bb">&nbsp;</td>';
+
+ echo '<tr class="row4">';
+
+ echo '<td class="cell_var"></td>';
+
if ( $_sub_question_col ) {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
+ echo '<td class="subquestion"></td>';
}
+
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
+ }
+ else {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">&nbsp;</td>'; //$_tip
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">&nbsp;</td>'; // $_oblika
+
+ echo '<td class="cell_info"></td>'; //$_tip
+ echo '<td class="cell_info"></td>'; // $_oblika
}
+
if (count($spremenljivka['options']) > 0) {
foreach ( $spremenljivka['options'] as $key => $kategorija) {
// misinge imamo zdruzene
$_label = $kategorija;
- echo '<td class="' . $cssBack . ' anl_bb anl_ac anl_dash_br ">'.$_label.'</td>';
+ echo '<td class="cell_grid">'.$_label.'</td>';
}
}
- echo '<td class="' . $cssBack . ' anl_bb anl_br anl_ac red anl_w70">'.$lang['srv_anl_suma1'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_odklon'].'</td>';
-
+ echo '<td class="cell_value">'.$lang['srv_anl_suma1'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_odklon'].'</td>';
if (count($spremenljivka['options']) > 0) {
foreach ( $spremenljivka['options'] as $key => $kategorija) {
// misinge imamo zdruzene
$_label = $kategorija;
- echo '<td class="' . $cssBack . ' anl_bb anl_ac anl_dash_br ">'.$_label.'</td>';
+ echo '<td class="cell_value">'.$_label.'</td>';
}
}
- echo '<td class="' . $cssBack . ' anl_bb anl_br anl_ac red anl_w70">'.$lang['srv_anl_suma1'].'</td>';
- echo '<td class="' . $cssBack . ' anl_bb anl_br anl_ac anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
- echo '<td class="' . $cssBack . ' anl_bb anl_br anl_ac anl_w70 anl_variabla_line">'.$lang['srv_analiza_opisne_odklon'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_anl_suma1'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_povprecje'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_opisne_odklon'].'</td>';
# št enot
- echo '<td class="' . $cssBack . ' anl_bb anl_br anl_ac anl_w70 anl_variabla_line">'.$lang['srv_analiza_num_units'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_analiza_num_units'].'</td>';
echo '</tr>';
+
+
#zloopamo skozi gride in nardimo
$_tmp_table = array();
$_part = 1;
@@ -2982,7 +3332,7 @@ class SurveyAnalysis {
$_tmp_table[$grid['part']][$cnt]['variables'][] = array('key'=>$key, 'freq'=>self::$_FREQUENCYS[$_sequence]['valid'][$key]['cnt'],'percent'=>$_percent);
}
}
- $_tmp_table[$grid['part']][$cnt]['seq'] = $variable['seq'];
+ $_tmp_table[$grid['part']][$cnt]['seq'] = (isset($variable['seq']) ? $variable['seq'] : null);
$_tmp_table[$grid['part']][$cnt]['vr_id'] = $variable['vr_id'];
$_tmp_table[$grid['part']][$cnt]['variable'] = substr($variable['variable'], 0, strrpos($variable['variable'], "_"));
$_tmp_table[$grid['part']][$cnt]['naslov'] = $variable['naslov'];
@@ -3015,52 +3365,66 @@ class SurveyAnalysis {
#zlopamo skozi gride
if (count($_tmp_table[1]) > 0) {
foreach ($_tmp_table[1] AS $tkey => $grid) {
- $cssBack = "anl_bck_desc_2 ";
+
echo '<tr id="'.$spid.'_'.$grid['vr_id'].'">';
+
if ($_sub_question_col) {
- echo '<td class="anl_tin1 ' . $cssBack . 'anl_bl anl_br anl_bb anl_ac anl_variabla_sub">'.$grid['variable'].'</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">'.$grid['naslov'].'</td>';
- } else {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb">&nbsp;</td>';
+ echo '<td class="cell_var">'.$grid['variable'].'</td>';
+ echo '<td class="cell_subquestion">'.$grid['naslov'].'</td>';
+ }
+ else {
+ echo '<td class="cell_var"></td>';
}
+
if (self::$_SHOW_LEGENDA) {
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">'.$_tip.'</td>';
- echo '<td class="anl_p5 ' . $cssBack . 'anl_br anl_bb anl_ac">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
# zloopamo skozi variable
if (count($grid['variables']) > 0) {
+
foreach ($grid['variables'] AS $vid => $variable ) {
#mg_inspectž
- echo '<td class="anl_bb anl_dash_br anl_ac cll_clps '.$cssBack.'">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac'.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' dmg_inspect' : '').'" style="padding:5px 0px;"'.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' gid="'.$variable['key'].'_1"' : '').'>'.$variable['freq'].'</td>';
- echo '</tr><tr name="single_sums_percent_'.$spid.'">';
- echo '<td style="padding:5px 0px;">';
- echo self::formatNumber($variable['percent'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr></table>';
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td class="'.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' dmg_inspect' : '').'" '.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' gid="'.$variable['key'].'_1"' : '').'>'.$variable['freq'].'</td>';
+ echo ' </tr>';
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>';
+ echo self::formatNumber($variable['percent'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo ' </td>';
+ echo ' </tr>';
+ echo ' </table>';
+
echo '</td>';
} // end foreach variables
} // end if (count($grid['variables']) > 0)
+
+
// suma
- echo '<td class="anl_bb anl_br anl_ac cll_clps ' . $cssBack . '">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac red" style="padding:5px 0px;">'.(int)$grid['suma'].'</td>';
- echo '</tr><tr name="single_sums_percent_'.$spid.'">';
- echo '<td class="red" style="padding:5px 0px;">'.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
- echo '</tr></table>';
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td>'.(int)$grid['suma'].'</td>';
+ echo ' </tr>';
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>'.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
+ echo ' </tr>';
+ echo ' </table>';
+
echo '</td>';
- // povpreje
- echo '<td class="anl_bb anl_br anl_ac ' . $cssBack . '" >';
+ // povprecje
+ echo '<td class="cell_value">';
echo self::formatNumber($grid['avg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
echo '</td>';
// odklon
- echo '<td class="anl_bb anl_br anl_ac ' . $cssBack . '" >';
+ echo '<td class="cell_value">';
echo self::formatNumber($grid['div'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
echo '</td>';
@@ -3068,43 +3432,54 @@ class SurveyAnalysis {
$_right_grid = $_tmp_table[2][$tkey];
if (count($_right_grid['variables']) > 0) {
foreach ($_right_grid['variables'] AS $vid => $variable ) {
- echo '<td class="anl_bb anl_dash_br anl_ac cll_clps '.$cssBack.'">';
+
+ echo '<td class="cell_value cell_noPadding">';
+
#mg_inspect
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac'.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' dmg_inspect' : '').'" style="padding:5px 0px;"'.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' gid="'.$variable['key'].'_2"' : '').'>'.$variable['freq'].'</td>';
- echo '</tr><tr name="single_sums_percent_'.$spid.'">';
- echo '<td style="padding:5px 0px;">';
- echo self::formatNumber($variable['percent'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '</td>';
- echo '</tr></table>';
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td class="anl_ac'.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' dmg_inspect' : '').'" '.(self::$enableInspect == true && (int)$variable['freq'] > 0 ? ' gid="'.$variable['key'].'_2"' : '').'>'.$variable['freq'].'</td>';
+ echo ' </tr>';
+ echo ' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>';
+ echo self::formatNumber($variable['percent'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
+ echo ' </td>';
+ echo ' </tr>';
+ echo ' </table>';
+
echo '</td>';
} // end foreach variables
} // end if (count($grid['variables']) > 0)
+
// suma
- echo '<td class="anl_bb anl_br anl_ac cll_clps '.$cssBack.'">';
- echo '<table class="fullWidth anl_ac tbl_clps">';
- echo '<tr name="single_sums_percent_cnt_'.$spid.'" class="anl_dash_bb">';
- echo '<td class="anl_ac red" style="padding:5px 0px;">'.(int)$_right_grid['suma'].'</td>';
- echo '</tr><tr name="single_sums_percent_'.$spid.'">';
- echo '<td class="red" style="padding:5px 0px;">'.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
- echo '</tr></table>';
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo ' <table class="cell_table freq_row percent_row">';
+ echo ' <tr name="single_sums_percent_cnt_'.$spid.'">';
+ echo ' <td>'.(int)$_right_grid['suma'].'</td>';
+ echo ' </tr>';
+ echo' <tr name="single_sums_percent_'.$spid.'">';
+ echo ' <td>'.self::formatNumber(100,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%').'</td>';
+ echo ' </tr>';
+ echo ' </table>';
+
echo '</td>';
// povpreje
- echo '<td class="anl_bb anl_br anl_ac ' . $cssBack . '" >';
+ echo '<td class="cell_value">';
echo self::formatNumber($_right_grid['avg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
echo '</td>';
# odklon
- echo '<td class="anl_bb anl_br anl_ac ' . $cssBack . '" >';
+ echo '<td class="cell_value">';
echo self::formatNumber($_right_grid['div'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
echo '</td>';
# št enot
- echo '<td class="anl_bb anl_br anl_ac ' . $cssBack . '" >';
+ echo '<td class="cell_value">';
echo $grid['allCnt'];
echo '</td>';
+
echo '</tr>';
} // end foreach ($_tmp_table[1] AS $tkey => $grid)
}
@@ -3121,9 +3496,7 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
-
}
/** Izriše multi number odgovore. izpiše samo povprečja
@@ -3143,7 +3516,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -3157,21 +3532,24 @@ class SurveyAnalysis {
$_cols = $spremenljivka['cnt_all'] / $spremenljivka['cnt_grids'];
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_bb tbl_clps">';
+ echo '<table class="table_sums sums_multinumber">';
+
# naslovna vrstica
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<tr class="row1">';
+
+ # variabla
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- #odgovori
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA ? 3+$_cols : 1+$_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+
+ # odgovori
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 3+$_cols : 1+$_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -3183,66 +3561,83 @@ class SurveyAnalysis {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
+
+
+ echo '<tr class="row2">';
+
+
+ # variabla
+ echo '<td class="cell_icons cell_icons'.$spid.' test" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>'; //options
echo '</td>';
- #odgovori
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">'.$lang['srv_analiza_opisne_subquestion'] . '</td>';
+ #odgovori
+ echo '<td class="cell_subquestion">'.$lang['srv_analiza_opisne_subquestion'] . '</td>';
if (self::$_SHOW_LEGENDA){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line" colspan="'.($_cols).'">'. $lang['srv_analiza_sums_average'] .'</td>';
+
+ echo '<td class="cell_grid" colspan="'.($_cols).'">'. $lang['srv_analiza_sums_average'] .'</td>';
echo '</tr>';
// konec naslovne vrstice
+
$_answersOther = array();
$_grids_count = count($spremenljivka['grids']);
if ($_grids_count > 0) {
+
# naslovna vrstica
$_row = $spremenljivka['grids'][0];
- echo '<tr>';
- echo '<td class="anl_bl anl_bb anl_bck">&nbsp;</td>';
- echo '<td class="anl_bl anl_br anl_bb anl_bck">&nbsp;</td>';
+
+ echo '<tr class="row3">';
+
+ echo '<td class="cell_var"></td>';
+ echo '<td class="cell_subquestion"></td>';
if (self::$_SHOW_LEGENDA){
- echo '<td class="anl_br anl_bb anl_bck">&nbsp;</td>';
- echo '<td class="anl_br anl_bb anl_bck">&nbsp;</td>';
+ echo '<td class="cell_info"></td>';
+ echo '<td class="cell_info"></td>';
}
if (count($_row['variables']) > 0 )
foreach ($_row['variables'] AS $rid => $_col ){
$_sequence = $_col['sequence']; # id kolone z podatki
if ($_col['other'] != true) {
- echo '<td class="anl_br anl_bb anl_bck anl_ac">';
- // echo $_col['variable'];
+ echo '<td class="cell_grid">';
echo $_col['naslov'];
echo '</td>';
- } else {
+ }
+ else {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
}
echo '</tr>';
- $_css_bck = 'anl_bck_desc_2 anl_ac anl_bt_dot ';
+
+
$last = 0;
- //anl_bck_desc_2 anl_bl anl_br anl_variabla_sub
+
foreach ($spremenljivka['grids'] AS $gid => $grid) {
$_variables_count = count($grid['variables']);
- echo '<tr class="'.$_css_bck.'">';
- echo '<td class="anl_bl anl_br anl_variabla_sub">';
+
+ echo '<tr>';
+
+ echo '<td class="cell_var">';
echo $grid['variable'];
echo '</td>';
- echo '<td class="anl_br anl_al">';
+
+ echo '<td class="cell_subquestion">';
echo $grid['naslov'];
echo '</td>';
if (self::$_SHOW_LEGENDA){
- echo '<td class="anl_br">'.$_tip.'</td>';
- echo '<td class="anl_br">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
if ($_variables_count > 0) {
@@ -3251,14 +3646,14 @@ class SurveyAnalysis {
if ($variable['other'] != true) {
# tabela z navedbami
- echo '<td class="anl_at anl_br">';
- echo self::formatNumber(self::$_FREQUENCYS[$_sequence]['average'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '</td>';
-
+ echo '<td class="cell_value">';
+ echo self::formatNumber(isset(self::$_FREQUENCYS[$_sequence]['average'])?self::$_FREQUENCYS[$_sequence]['average']:0,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '</td>';
}
}
}
+
echo '</tr>';
}
}
@@ -3266,7 +3661,6 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -3287,7 +3681,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -3302,87 +3698,104 @@ class SurveyAnalysis {
# ali izpisujemo enoto:
$show_enota = true;
- if ((int)$spremenljivka['enota'] == 0 && self::$_HEADERS[$spid]['cnt_all'] == 1) {
+ if (!isset($spremenljivka['enota']) || ((int)$spremenljivka['enota'] == 0 && self::$_HEADERS[$spid]['cnt_all'] == 1)) {
$show_enota = false;
}
# ugotovimo koliko imamo kolon
- if (count($spremenljivka['grids']) > 0)
+ if (count($spremenljivka['grids']) > 0){
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_clmn_cnt[$gid] = $grid['cnt_vars']-$grid['cnt_other'];
- if (count($grid['variables']) > 0)
- foreach ($grid['variables'] AS $vid => $variable) {
- $_sequence = $variable['sequence'];
- $_approp_cnt[$gid] = max($_approp_cnt[$gid], self::$_FREQUENCYS[$_sequence]['allCnt']);
- # za povprečje
- $sum_xi_fi=0;
- $N = 0;
- $div=0;
- $min = null;
- $max = null;
+ if(isset($grid['cnt_other']))
+ $_clmn_cnt[$gid] = $grid['cnt_vars'] - $grid['cnt_other'];
+ else
+ $_clmn_cnt[$gid] = $grid['cnt_vars'];
+
+ if (is_countable($grid['variables']) && count($grid['variables']) > 0){
- if (count(self::$_FREQUENCYS[$_sequence]['valid']) > 0 ) {
- foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $xi => $_validFreq) {
+ foreach ($grid['variables'] AS $vid => $variable) {
+ $_sequence = $variable['sequence'];
- # popravimo morebitne . in -
- $fnkey = (float)$xi;
+ if(isset($_approp_cnt[$gid]))
+ $_approp_cnt[$gid] = max($_approp_cnt[$gid], self::$_FREQUENCYS[$_sequence]['allCnt']);
+ else
+ $_approp_cnt[$gid] = self::$_FREQUENCYS[$_sequence]['allCnt'];
- if (is_numeric($xi) && is_numeric($fnkey) && trim($fnkey) != '') {
- $fi = $_validFreq['cnt'];
- $sum_xi_fi += $xi * $fi ;
- $N += $fi;
-
- $min = $min != null ? min($min,$fnkey) : $fnkey;
- $max = $max != null ? max($max,$fnkey) : $fnkey;
+ # za povprečje
+ $sum_xi_fi=0;
+ $N = 0;
+ $div=0;
+ $min = null;
+ $max = null;
+
+ if (count(self::$_FREQUENCYS[$_sequence]['valid']) > 0 ) {
+ foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $xi => $_validFreq) {
+
+ # popravimo morebitne . in -
+ $fnkey = (float)$xi;
+
+ if (is_numeric($xi) && is_numeric($fnkey) && trim($fnkey) != '') {
+ $fi = $_validFreq['cnt'];
+ $sum_xi_fi += $xi * $fi ;
+ $N += $fi;
+
+ $min = $min != null ? min($min,$fnkey) : $fnkey;
+ $max = $max != null ? max($max,$fnkey) : $fnkey;
+ }
+ }
}
- }
- }
- # povprešje
- $avg = ($N > 0) ? $sum_xi_fi / $N : 0;
+ # povprešje
+ $avg = ($N > 0) ? $sum_xi_fi / $N : 0;
- self::$_FREQUENCYS[$_sequence]['validAvg'] = $avg;
- self::$_FREQUENCYS[$_sequence]['validMin'] = $min;
- self::$_FREQUENCYS[$_sequence]['validMax'] = $max;
+ self::$_FREQUENCYS[$_sequence]['validAvg'] = $avg;
+ self::$_FREQUENCYS[$_sequence]['validMin'] = $min;
+ self::$_FREQUENCYS[$_sequence]['validMax'] = $max;
- #standardna diviacija
- $div = 0;
- $sum_pow_xi_fi_avg = 0;
- if (count(self::$_FREQUENCYS[$_sequence]['valid']) > 0 ) {
- foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $xi => $_validFreq) {
- $fi = $_validFreq['cnt'];
- $sum_pow_xi_fi_avg += pow(($xi - $avg),2) * $fi;
- }
- }
- self::$_FREQUENCYS[$_sequence]['validDiv'] = (($N -1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($N -1)) : 0;
+ #standardna diviacija
+ $div = 0;
+ $sum_pow_xi_fi_avg = 0;
+ if (count(self::$_FREQUENCYS[$_sequence]['valid']) > 0 ) {
+ foreach (self::$_FREQUENCYS[$_sequence]['valid'] AS $xi => $_validFreq) {
+ $fi = $_validFreq['cnt'];
+ $sum_pow_xi_fi_avg += pow(($xi - $avg),2) * $fi;
+ }
+ }
+ self::$_FREQUENCYS[$_sequence]['validDiv'] = (($N -1) > 0) ? sqrt($sum_pow_xi_fi_avg / ($N -1)) : 0;
- #določimo še polja drugo za kasnejši prikaz
- if ($variable['other'] == true) {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ #določimo še polja drugo za kasnejši prikaz
+ if ($variable['other'] == true) {
+ $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ }
+ }
}
}
}
+
$isSingleGrid = ($spremenljivka['cnt_all'] == $spremenljivka['cnt_grids']) ? true : false;
# če je cnt_all == cnt_grids pomeni da imamo samo 1 grid
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
+
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_br anl_bb tbl_clps">';
+ echo '<table class="table_sums sums_multinumber_ver">';
+
# naslovna vrstica
- echo '<tr>';
+ echo '<tr class="row1">';
+
#variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
+
#odgovori
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA ? 7+(int)$inline_legenda*2 : 7).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 7+(int)$inline_legenda*2 : 7).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -3399,42 +3812,52 @@ class SurveyAnalysis {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck">';
+ echo '<tr class="row2">';
+
+
+ # variabla
+ echo '<td class="cell_icons cell_icons'.$spid.' test" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
-
if ($show_enota) {
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">';
+ echo '<td class="cell_subquestion">';
if ($spremenljivka['tip'] == 20 || $spremenljivka['tip'] == 7) {
echo $lang['srv_analiza_opisne_subquestion'];
- } else {
+ }
+ else {
echo $lang['srv_analiza_opisne_variable_text'];
}
echo'</td>';
- } else { # če mamo number brez labele izrisujemo drugače
- echo '<td class="anl_br">';
- echo '&nbsp;';
+ }
+ else { # če mamo number brez labele izrisujemo drugače
+ echo '<td class="cell_subquestion">';
+ echo '';
echo'</td>';
}
if (self::$_SHOW_LEGENDA && $inline_legenda){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line" >'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line" >'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
- }
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_m'] . '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_num_units'] . '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_povprecje'] . '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_odklon'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_min'] . '</td>';
- echo '<td class="anl_bck anl_ac anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_max'] . '</td>';
+ echo '<td class="cell_info" >'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info" >'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ }
+
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_m'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_num_units'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_povprecje'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_odklon'].'</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_min'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_max'] . '</td>';
+
echo '</tr>';
+
$_answersOther = array();
$_grupa_cnt = 0;
if (count($spremenljivka['grids']) > 0)
@@ -3450,71 +3873,72 @@ class SurveyAnalysis {
if ($variable['other'] != true) {
$_sequence = $variable['sequence'];
- $cssBrdr = (int)$grid['new_grid'] == 1 && $isSingleGrid == false? ' anl_double_bt' : ' anl_bt_dot';
-
echo '<tr>';
- if (!$show_enota && $spremenljivka['tip'] == 7) {
- echo '<td style="border-bottom:1px solid white;">' ;
- } else {
- echo '<td class="anl_bck_desc_2 anl_ac anl_bl anl_br anl_variabla_sub'.$cssBrdr.'">' ;
- }
- echo $_css_double_line;
+
+ echo '<td class="cell_var">' ;
# za number (7) ne prikazujemo variable
if ($spremenljivka['tip'] != 7 ) {
echo $variable['variable'];
}
echo '</td>' ;
- if (!$show_enota && $spremenljivka['tip'] == 7) {
- echo '<td style="border-bottom:1px solid white;">' ;
- } else {
- echo '<td class="anl_bck_desc_2 anl_al anl_br'.$cssBrdr.'">' ;
- }
+ echo '<td class="cell_subquestion">' ;
if ($show_enota) {
# če ni enojni grid
if ($isSingleGrid == false) {
- echo (count($grid['variables']) > 1 && $spremenljivka['tip'] == 20 ? $grid['naslov'] . ' - ' : '' ).$variable['naslov'];
- } else {
- # če je enojni, izpišemo labele variable
- echo $grid['naslov'];
- }
- } else {
- echo '&nbsp;';
- }
+ echo (count($grid['variables']) > 1 && $spremenljivka['tip'] == 20 ? $grid['naslov'] . ' - ' : '' ).$variable['naslov'];
+ }
+ else {
+ # če je enojni, izpišemo labele variable
+ echo $grid['naslov'];
+ }
+ }
+
echo '</td>' ;
+
if (self::$_SHOW_LEGENDA && $inline_legenda) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
+ }
+ else {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'" title="'.$_tip.'">'.$_tip.'</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'" title="'.$_oblika.'">' .$_oblika. '</td>';
+ echo '<td class="cell_info" title="'.$_tip.'">'.$_tip.'</td>';
+ echo '<td class="cell_info" title="'.$_oblika.'">' .$_oblika. '</td>';
}
- echo '<td class="anl_bck_desc_2 anl_ac anl_br anl_bl'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo (int)$_approp_cnt[$gid];
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber(self::$_FREQUENCYS[$_sequence]['validAvg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber(self::$_FREQUENCYS[$_sequence]['validDiv'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo (int)self::$_FREQUENCYS[$_sequence]['validMin'];
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+ echo '</td>';
+
+ echo '<td class="cell_value">';
echo (int)self::$_FREQUENCYS[$_sequence]['validMax'];;
echo '</td>';
echo '</tr>';
- } else {
+ }
+ else {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
+
$grid['new_grid'] = false;
}
@@ -3533,17 +3957,17 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
+
/** Izriše number odgovore v vertikalni obliki
*
* @param unknown_type $spid
*/
static function sumNumberVertical($spid,$_from) {
global $lang;
- $spremenljivka = self::$_HEADERS[$spid];
+ $spremenljivka = self::$_HEADERS[$spid];
# preverimo ali prikazujemo spremenljivko, glede na veljavne odgovore in nastavitev
$only_valid = 0;
@@ -3553,7 +3977,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -3568,18 +3994,27 @@ class SurveyAnalysis {
# ali izpisujemo enoto:
$show_enota = true;
- if (((int)$spremenljivka['enota'] == 0 && self::$_HEADERS[$spid]['cnt_all'] == 1) || $spremenljivka['tip'] == 22 || $spremenljivka['tip'] == 25) {
+ if (((!isset($spremenljivka['enota']) || (int)$spremenljivka['enota'] == 0) && self::$_HEADERS[$spid]['cnt_all'] == 1) || $spremenljivka['tip'] == 22 || $spremenljivka['tip'] == 25) {
$show_enota = false;
}
$sum_avg = 0;
# ugotovimo koliko imamo kolon
if (count($spremenljivka['grids']) > 0)
foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_clmn_cnt[$gid] = $grid['cnt_vars']-$grid['cnt_other'];
+
+ if(isset($grid['cnt_other']))
+ $_clmn_cnt[$gid] = $grid['cnt_vars']-$grid['cnt_other'];
+ else
+ $_clmn_cnt[$gid] = $grid['cnt_vars'];
+
if (count($grid['variables']) > 0)
foreach ($grid['variables'] AS $vid => $variable) {
$_sequence = $variable['sequence'];
- $_approp_cnt[$gid] = max($_approp_cnt[$gid], self::$_FREQUENCYS[$_sequence]['allCnt']);
+
+ if(isset($_approp_cnt[$gid]))
+ $_approp_cnt[$gid] = max($_approp_cnt[$gid], self::$_FREQUENCYS[$_sequence]['allCnt']);
+ else
+ $_approp_cnt[$gid] = self::$_FREQUENCYS[$_sequence]['allCnt'];
# za povprečje
$sum_xi_fi=0;
@@ -3630,22 +4065,27 @@ class SurveyAnalysis {
}
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
+
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_br anl_bb tbl_clps">';
+ echo '<table class="table_sums sums_number_ver">';
+
# naslovna vrstica
- echo '<tr>';
+ echo '<tr class="row1">';
+
#variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
+
$num_cols = 7 + ($spremenljivka['tip'] == 18 ? 1 : 0);
+
#odgovori
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA ? $num_cols+(int)$inline_legenda*2 : $num_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? $num_cols+(int)$inline_legenda*2 : $num_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -3662,44 +4102,49 @@ class SurveyAnalysis {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck">';
+
+ echo '<tr class="row2">';
+
+ # variabla - število
+ echo '<td class="cell_icons cell_icons'.$spid.' stevilo" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
-
+ echo '<td class="cell_question">';
if ($show_enota == true) {
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">';
if ($spremenljivka['tip'] == 20 || $spremenljivka['tip'] == 7) {
echo $lang['srv_analiza_opisne_subquestion'];
- } else {
+ }
+ else {
echo $lang['srv_analiza_opisne_variable_text'];
}
- echo'</td>';
- } else { # če mamo number brez labele izrisujemo drugače
- echo '<td class="anl_br">';
- echo '&nbsp;';
- echo'</td>';
- }
+ }
+ echo'</td>';
if (self::$_SHOW_LEGENDA && $inline_legenda){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line" >'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line" >'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_m'] . '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_num_units'] . '</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_povprecje'] . '</td>';
+
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_m'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_num_units'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_povprecje'] . '</td>';
if ($spremenljivka['tip'] == 18) {
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">%</td>';
+ echo '<td class="cell_value">%</td>';
}
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_odklon'].'</td>';
- echo '<td class="anl_br anl_ac anl_bck anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_min'] . '</td>';
- echo '<td class="anl_bck anl_ac anl_bb anl_w70 anl_legend anl_variabla_line">' . $lang['srv_analiza_opisne_max'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_odklon'].'</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_min'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_opisne_max'] . '</td>';
+
echo '</tr>';
+
$_answersOther = array();
$_grupa_cnt = 0;
if (count($spremenljivka['grids']) > 0)
@@ -3715,35 +4160,26 @@ class SurveyAnalysis {
if ($variable['other'] != true) {
$_sequence = $variable['sequence'];
- $cssBrdr = (int)$grid['new_grid'] == 1 ? ' anl_double_bt' : ' anl_bt_dot';
-
echo '<tr>';
- if (!$show_enota && $spremenljivka['tip'] == 7) {
- echo '<td style="border-bottom:1px solid white;">' ;
- } else {
- echo '<td class="anl_bck_desc_2 anl_ac anl_bl anl_br anl_variabla_sub'.$cssBrdr.'">' ;
- }
- echo $_css_double_line;
+
+ echo '<td class="cell_var">' ;
# za number (7) ne prikazujemo variable
if ($spremenljivka['tip'] != 7 || ($show_enota == true && $spremenljivka['tip'] == 7 )) {
if ($variable['variable'] == $spremenljivka['variable']) {
echo $variable['variable'].'_1';
- } else {
+ }
+ else {
echo $variable['variable'];
}
}
echo '</td>' ;
- if ((!$show_enota && $spremenljivka['tip'] == 7 ) || $spremenljivka['tip'] == 22 || $spremenljivka['tip'] == 25) {
- echo '<td style="border-bottom:1px solid white;">' ;
- } else {
- echo '<td class="anl_bck_desc_2 anl_al anl_br'.$cssBrdr.'">' ;
- }
+
+ echo '<td class="cell_question">' ;
if ($show_enota) {
echo (count($grid['variables']) > 1 && $spremenljivka['tip'] == 20 ? $grid['naslov'] . ' - ' : '' ).$variable['naslov'];
- } else {
- echo '&nbsp;';
- }
+ }
echo '</td>' ;
+
if (self::$_SHOW_LEGENDA && $inline_legenda) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -3752,68 +4188,85 @@ class SurveyAnalysis {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'" title="'.$_tip.'">'.$_tip.'</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'" title="'.$_oblika.'">' .$_oblika. '</td>';
+ echo '<td class="cell_info" title="'.$_tip.'">'.$_tip.'</td>';
+ echo '<td class="cell_info" title="'.$_oblika.'">' .$_oblika. '</td>';
}
- echo '<td class="anl_bck_desc_2 anl_ac anl_br anl_bl'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo (int)$_approp_cnt[$gid];
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber(self::$_FREQUENCYS[$_sequence]['validAvg'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
echo '</td>';
+
if ($spremenljivka['tip'] == 18) {
$_percent = ($sum_avg > 0 ) ? 100 * self::$_FREQUENCYS[$_sequence]['validAvg'] / $sum_avg : 0;
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+ echo '<td class="cell_value">';
echo self::formatNumber($_percent,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'%');
echo '</td>';
}
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber(self::$_FREQUENCYS[$_sequence]['validDiv'],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
echo '</td>';
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+
+ echo '<td class="cell_value">';
echo (int)self::$_FREQUENCYS[$_sequence]['validMin'];
- echo '<td class="anl_bck_desc_2 anl_ac anl_br'.$cssBrdr.'">';
+ echo '</td>';
+
+ echo '<td class="cell_value">';
echo (int)self::$_FREQUENCYS[$_sequence]['validMax'];;
echo '</td>';
echo '</tr>';
- } else {
+ }
+ else {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
+
$grid['new_grid'] = false;
}
}
}
if ($spremenljivka['tip'] == 18) {
- $css_back = 'anl_bck_text_1 anl_bt';
- echo '<tr>';
- echo '<td class="'.$css_back.' anl_bl red">';
+ echo '<tr class="row_sum">';
+
+ echo '<td class="cell_var">';
echo $lang['srv_anl_suma1'];
echo '</td>';
- echo '<td class="'.$css_back.'">&nbsp;</td>';
-
- if (self::$_SHOW_LEGENDA && $inline_legenda){
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- }
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- echo '<td class="'.$css_back.' anl_ac anl_bl anl_br" >';
- echo self::formatNumber($sum_avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
- echo '</td>';
- # skupna suma
- echo '<td class="'.$css_back.' anl_br anl_ac" >100%</td>';
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- echo '<td class="'.$css_back.'" >&nbsp;</td>';
- echo '</tr>';
+
+ echo '<td class="cell_question"></td>';
+
+ if (self::$_SHOW_LEGENDA && $inline_legenda){
+ echo '<td class="cell_info"></td>';
+ echo '<td class="cell_info"></td>';
+ }
+
+ echo '<td class="cell_value">/</td>';
+ echo '<td class="cell_value">/</td>';
+
+ echo '<td class="cell_value">';
+ echo self::formatNumber($sum_avg,SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_DEVIATION'),'');
+ echo '</td>';
+
+ # skupna suma
+ echo '<td class="cell_value">100%</td>';
+ echo '<td class="cell_value">/</td>';
+ echo '<td class="cell_value">/</td>';
+ echo '<td class="cell_value">/</td>';
+
+ echo '</tr>';
}
+
echo '</table>';
+
# izpišemo še tekstovne odgovore za polja drugo
if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
@@ -3825,7 +4278,6 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -3834,33 +4286,38 @@ class SurveyAnalysis {
*/
static function sumNagovor($spid,$_from) {
global $lang;
+
$spremenljivka = self::$_HEADERS[$spid];
+
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- $cssBack = "anl_bck_freq_1 ";
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
- echo '<table class="anl_tbl_inner anl_ba" >';
- echo '<tr>';
- echo '<td class="anl_p5 anl_br anl_ac anl_bck_desc_1 anl_bb anl_w110">';
+ echo '<table class="table_sums sums_nagovor" >';
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- echo '<td class="anl_p5 anl_br anl_al anl_bck_desc_1 anl_bb"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+
+ echo '<td class="cell_question"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
+
echo '</table>';
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -3873,12 +4330,12 @@ class SurveyAnalysis {
global $lang;
$spremenljivka = self::$_HEADERS[$spid];
- $lokacija=false;
- $heatmap=false;
- if($spremenljivka['tip'] == 26)
- $lokacija=true;
- else if ($spremenljivka['tip'] == 27)
- $heatmap=true;
+ $lokacija=false;
+ $heatmap=false;
+ if($spremenljivka['tip'] == 26)
+ $lokacija=true;
+ else if ($spremenljivka['tip'] == 27)
+ $heatmap=true;
$anketa = self::$sid;
@@ -3890,7 +4347,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -3906,143 +4365,172 @@ class SurveyAnalysis {
# koliko zapisov prikažemo naenkrat
$num_show_records = self::getNumRecords();
- // $num_show_records = $_max_answers_cnt <= (int)$num_show_records ? $_max_answers_cnt : $num_show_records;
-
- //za tip lokacija (ne enota 3) se rabi user_id, ker se kasneje delajo linki
- $need_user_id = !($spremenljivka['tip'] != 26 || ($spremenljivka['tip'] == 26 && $spremenljivka['enota'] == 3));
+ //za tip lokacija (ne enota 3) se rabi user_id, ker se kasneje delajo linki
+ $need_user_id = !($spremenljivka['tip'] != 26 || ($spremenljivka['tip'] == 26 && $spremenljivka['enota'] == 3));
$_answers = self::getAnswers($spremenljivka, $num_show_records, $need_user_id);
$_all_valid_answers_cnt = $_answers['validCnt'];
$_valid_answers = $_answers['valid'];
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
+
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_bb tbl_clps">';
+ echo '<table class="table_sums sums_multitext">';
+
+
# naslovna vrstica
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<tr class="row1">';
+
+ # variabla
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
- #odgovori
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(!$lokacija ? (self::$_SHOW_LEGENDA ? 3+$_cols : 1+$_cols) : 3+$_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+
+ # odgovori
+ echo '<td class="cell_question" colspan="'.(!$lokacija ? (self::$_SHOW_LEGENDA ? 3+$_cols : 1+$_cols) : 3+$_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
+ }
+ else {
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
+
+
+ echo '<tr class="row2">';
+
+ # variabla
+ echo '<td class="cell_icons cell_icons'.$spid.' test" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
- #odgovori
- if(!$lokacija)
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">'.$lang['srv_analiza_opisne_subquestion'] . '</td>';
+ #odgovori
+ if(!$lokacija)
+ echo '<td class="cell_subquestion">'.$lang['srv_analiza_opisne_subquestion'] . '</td>';
+
if (self::$_SHOW_LEGENDA){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- if(!$lokacija){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line" colspan="'.(!$lokacija ? $_cols : 3+$_cols).'">'. $lang['srv_analiza_opisne_arguments'] .'</td>';
- echo '</tr>';
- }
+
+ if(!$lokacija){
+ echo '<td class="cell_grid" colspan="'.(!$lokacija ? $_cols : 3+$_cols).'">'. $lang['srv_analiza_opisne_arguments'] .'</td>';
+ }
+
+ echo '</tr>';
// konec naslovne vrstice
+
$_answersOther = array();
$_grids_count = count($spremenljivka['grids']);
if ($_grids_count > 0) {
+
# naslovna vrstica
$_row = $spremenljivka['grids'][0];
- if(!$lokacija){
- echo '<tr>';
- echo '<td class="anl_bl anl_bb anl_bck">&nbsp;</td>';
- echo '<td class="anl_bl anl_br anl_bb anl_bck">&nbsp;</td>';
- }
+
+ echo '<tr class="row3">';
+
+ if(!$lokacija){
+ echo '<td class="cell_var"></td>';
+ echo '<td class="cell_subquestion"></td>';
+ }
if (self::$_SHOW_LEGENDA){
- echo '<td class="anl_br anl_bb anl_bck">&nbsp;</td>';
- echo '<td class="anl_br anl_bb anl_bck">&nbsp;</td>';
+ echo '<td class="cell_info"></td>';
+ echo '<td class="cell_info"></td>';
}
- if (count($_row['variables'])>0)
+
+ if (count($_row['variables'])>0){
foreach ($_row['variables'] AS $rid => $_col ){
- $_sequence = $_col['sequence']; # id kolone z podatki
- if ($_col['other'] != true) {
- echo '<td class="anl_br anl_bb anl_bck anl_ac">';
- // echo $_col['variable'];
- echo $_col['naslov'];
- echo '</td>';
- } else {
- $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
- }
+ $_sequence = $_col['sequence']; # id kolone z podatki
+ if ($_col['other'] != true) {
+ echo '<td class="cell_grid">';
+ echo $_col['naslov'];
+ echo '</td>';
+ }
+ else {
+ $_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
+ }
+ }
}
+
echo '</tr>';
- $_css_bck = 'anl_bck_desc_2 anl_ac anl_bt_dot ';
+
+
+
$last = 0;
- //anl_bck_desc_2 anl_bl anl_br anl_variabla_sub
+
foreach ($spremenljivka['grids'] AS $gid => $grid) {
$_variables_count = count($grid['variables']);
- echo '<tr class="'.$_css_bck.'">';
- echo '<td class="anl_bl anl_br anl_variabla_sub">';
- if(!$lokacija)
- echo $grid['variable'];
- //else{
- else if ($lokacija && $heatmap == false){
- //echo $grid['naslov'].'<br>';//ni potrebno, ker je ze v glavi?
- $sprid = explode('_',$spid);
- $loopid = $sprid[1];
- $sprid = $sprid[0];
-
- self::displayMapDataAll($spid);
- }
- elseif($heatmap){
- //echo $grid['naslov'].'<br>';//ni potrebno, ker je ze v glavi?
- $sprid = explode('_',$spid);
- $loopid = $sprid[1];
- $sprid = $sprid[0];
- SurveyUserSession::Init($anketa);
-
- $heatmapId = 'heatmap'.$sprid;
- //echo $heatmapId;
- //SurveyChart::displayExportIcons($sprid);
- echo '<a class="fHeatMap" id="heatmap_'.$sprid.'" title="'.$lang['srv_view_data_on_map'].
- '" href="javascript:void(0);" onclick="passHeatMapData('.$sprid.', -1, '.$loopid.', '.$anketa.');">';
-
- echo 'Heatmap';
- echo '</a>';
- }
+
+ echo '<tr>';
+
+ echo '<td class="cell_var">';
+ if(!$lokacija){
+ $sprid = $spid;
+
+ echo isset($grid['variable'])?$grid['variable']:'';
+ }
+ else if ($lokacija && $heatmap == false){
+ $sprid = explode('_',is_string($spid)?$spid:'');
+ $loopid = $sprid[1];
+ $sprid = $sprid[0];
+
+ self::displayMapDataAll($spid);
+ }
+ elseif($heatmap){
+
+ $sprid = explode('_',is_string($spid)?$spid:'');
+ $loopid = $sprid[1];
+ $sprid = $sprid[0];
+
+ SurveyUserSession::Init($anketa);
+
+ $heatmapId = 'heatmap'.$sprid;
+
+ echo '<a class="fHeatMap" id="heatmap_'.$sprid.'" title="'.$lang['srv_view_data_on_map'].
+ '" href="javascript:void(0);" onclick="passHeatMapData('.$sprid.', -1, '.$loopid.', '.$anketa.');">';
+
+ echo 'Heatmap';
+ echo '</a>';
+ }
echo '</td>';
- if(!$lokacija){
- echo '<td class="anl_br anl_al">';
- echo $grid['naslov'];
- echo '</td>';
- }
+
+ if(!$lokacija){
+ echo '<td class="cell_subquestion">';
+ echo $grid['naslov'];
+ echo '</td>';
+ }
+
if (self::$_SHOW_LEGENDA){
- echo '<td class="anl_br">'.$_tip.'</td>';
- echo '<td class="anl_br">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
if ($_variables_count > 0) {
+
# preštejemo max vrstic na grupo
$_max_i = 0;
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $_max_i = max($_max_i,min($num_show_records,self::$_FREQUENCYS[$_sequence]['validCnt']));
+ $_max_i = max($_max_i,min($num_show_records,(isset(self::$_FREQUENCYS[$_sequence]['validCnt'])?self::$_FREQUENCYS[$_sequence]['validCnt']:0)));
}
# za barvanje
@@ -4053,113 +4541,84 @@ class SurveyAnalysis {
$_sequence = $variable['sequence']; # id kolone z podatki
if ($variable['other'] != true) {
+
# tabela z navedbami
- echo '<td class=" anl_at cll_clps">';
- echo '<table id="'.$spid.'_'.$_sequence.'" class="fullWidth anl_ac tbl_clps" style="vertical-align:top;">';
- #$_valid_cnt = count(self::$_FREQUENCYS[$_sequence]['valid']);
- $index=0;
- if (count($_valid_answers) > 0) {
- foreach ($_valid_answers AS $key => $answer) {
- $index++;
- $cssBck = ' '.self::$cssColors['0_' . ($index & 1)];
- $_ans = $answer[$_sequence];
-
- if($index <= $moreBound){
- //if($index < $moreBound){
- echo '<tr class="notmore">';
- echo '<td class="'.$cssBck.' anl_br anl_user_text'
- .($_ans != null && $_ans != '' && self::$enableInspect == true ? ' mt_inspect' : '')
- .'"'
- .($index == 1 && $_ans != null && $_ans != '' && self::$enableInspect == true ? ' vkey="'.$_ans.'"' : '').'>';
- # narišemo printereček za izpis posameznih textovnih odgovorov
- if ($index == 1) {
- //echo '<span class="anl_single_ans_ico as_link" onclick="showSpremenljivkaTextAnswersPopup(\''.$spid.'\',\''.$_sequence.'\'); return false;">';
-
- //TODO! zakomentiral, ker nima funkcije, ikona pa pokvarjena
- /*echo '<span class="anl_single_ans_ico as_link">';
- echo '&nbsp;';
- echo '</span>';*/
- }
- if ($_ans != null && $_ans != '') {
- if(!($need_user_id && $lokacija))
- echo $_ans;
- else
- echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
- '" href="javascript:void(0);" onclick="passMapData('.$sprid.', '
- .$key.', '.$loopid.', '.$anketa.');">'.$_ans.'</a>';
- } else {
- echo '&nbsp;';
- }
+ echo '<td class="cell_value cell_noPadding">';
- if($index == $moreBound){
- #more - več
- echo '<br />';
- echo '&nbsp;';
- echo '<div class="srv_heatmap_info_more_'.$sprid.' as_link" onclick="$(\'.more_'.$sprid.', .srv_heatmap_info_more_'.$sprid.', .srv_objava_info_more2_'.$sprid.'\').toggle();">'.$lang['srv_more'].'</div>';
- #more - več - konec
- }
- echo '</td>';
- echo '</tr>';
- }
- else {
- echo '<tr class="more_'.$sprid.' displayNone" >';
- echo '<td class="'.$cssBck.' anl_br anl_user_text'
- .($_ans != null && $_ans != '' && self::$enableInspect == true ? ' mt_inspect' : '')
- .'"'
- .($index == 1 && $_ans != null && $_ans != '' && self::$enableInspect == true ? ' vkey="'.$_ans.'"' : '').'>';
- # narišemo printereček za izpis posameznih textovnih odgovorov
- if ($index == 1) {
- //echo '<span class="anl_single_ans_ico as_link" onclick="showSpremenljivkaTextAnswersPopup(\''.$spid.'\',\''.$_sequence.'\'); return false;">';
-
- //TODO! zakomentiral, ker nima funkcije, ikona pa pokvarjena
- /*echo '<span class="anl_single_ans_ico as_link">';
- echo '&nbsp;';
- echo '</span>';*/
- }
- if ($_ans != null && $_ans != '') {
- if(!($need_user_id && $lokacija))
- echo $_ans;
- else
- echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
- '" href="javascript:void(0);" onclick="passMapData('.$sprid.', '
- .$key.', '.$loopid.', '.$anketa.');">'.$_ans.'</a>';
- } else {
- echo '&nbsp;';
- }
+ echo '<table id="'.$spid.'_'.$_sequence.'" class="cell_table">';
+
+ $index=0;
+ if (count($_valid_answers) > 0) {
+ foreach ($_valid_answers AS $key => $answer) {
+ $index++;
+ $cssBck = ' '.self::$cssColors['0_' . ($index & 1)];
+ $_ans = $answer[$_sequence];
+
+ if($index <= $moreBound){
+
+ echo '<tr class="notmore">';
+
+ echo '<td '
+ .($_ans != null && $_ans != '' && self::$enableInspect == true ? ' mt_inspect' : '')
+ .'"'
+ .($index == 1 && $_ans != null && $_ans != '' && self::$enableInspect == true ? ' vkey="'.$_ans.'"' : '').'>';
+
+ if ($_ans != null && $_ans != '') {
+
+ if(!($need_user_id && $lokacija))
+ echo $_ans;
+ else
+ echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
+ '" href="javascript:void(0);" onclick="passMapData('.$sprid.', '
+ .$key.', '.$loopid.', '.$anketa.');">'.$_ans.'</a>';
+ }
+
+ #more - več
+ if($index == $moreBound){
+ echo '<div class="srv_heatmap_info_more_'.$sprid.' as_link multigrid_more" onclick="$(\'.more_'.$sprid.', .srv_heatmap_info_more_'.$sprid.', .srv_heatmap_info_more2_'.$sprid.'\').toggleClass(\'displayNone\');">'.$lang['srv_more'].'</div>';
+ #more - več - konec
+ }
+ echo '</td>';
+
+ echo '</tr>';
+ }
+ else {
+ echo '<tr class="more_'.$sprid.' displayNone">';
+
+ echo '<td '
+ .($_ans != null && $_ans != '' && self::$enableInspect == true ? ' mt_inspect' : '')
+ .'"'
+ .($index == 1 && $_ans != null && $_ans != '' && self::$enableInspect == true ? ' vkey="'.$_ans.'"' : '').'>';
- if($index == $_max_i){
- #less - manj
- echo '<br />';
- echo '&nbsp;';
- echo '<div class="srv_heatmap_info_more2_'.$sprid.' as_link" onclick="$(\'.more_'.$sprid.', .srv_heatmap_info_more_'.$sprid.', .srv_heatmap_info_more2_'.$sprid.' \').toggle();">'.$lang['srv_less'].'</div>';
- }
- echo '</td>';
- echo '</tr>';
- }
- }
- }
-
- if ($_all_valid_answers_cnt > $index) {
- $index++;
- $cssBck = ' '.self::$cssColors['0_' . ($index & 1)];
- echo '<tr>';
- echo '<td class="'.$cssBck.' anl_br anl_user_text">';
- // Pri javni povezavi drugace izpisemo
- if(self::$printPreview == false)
- echo '<div id="valid_row_togle_more_'.$vid.'" class="floatRight blue pointer anl_more" onclick="showHidenTextTable(\''.$spid.'\', \''.$num_show_records.'\', \''.self::$_CURRENT_LOOP['cnt'].'\');return false;">'.$lang['srv_anl_more'].'</div>';
- else
- echo '<div id="valid_row_togle_more_'.$vid.'" class="floatRight anl_more">'.$lang['srv_anl_more'].'</div>';
- echo '</td>';
- echo '</tr>';
- }
- echo '</table>';
+ if ($_ans != null && $_ans != '') {
+ if(!($need_user_id && $lokacija))
+ echo $_ans;
+ else
+ echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
+ '" href="javascript:void(0);" onclick="passMapData('.$sprid.', '
+ .$key.', '.$loopid.', '.$anketa.');">'.$_ans.'</a>';
+ }
+
+ #less - manj
+ if($index == $_max_i){
+ echo '<div class="srv_heatmap_info_more2_'.$sprid.' as_link multigrid_more displayNone" onclick="$(\'.more_'.$sprid.', .srv_heatmap_info_more_'.$sprid.', .srv_heatmap_info_more2_'.$sprid.' \').toggleClass(\'displayNone\');">'.$lang['srv_less'].'</div>';
+ }
+ echo '</td>';
+
+ echo '</tr>';
+ }
+ }
+ }
+
+ echo '</table>';
- echo '</td>';
+ echo '</td>';
}
}
+
$last = $_max_i;
-
}
+
echo '</tr>';
}
}
@@ -4176,41 +4635,39 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
- /**
- *
- * @global type $lang
- * @param string $spid - [spremenljivka_id]_[loop_id]
- */
- private static function displayMapDataAll($spid){
- global $lang;
-
- $sprid = explode('_',$spid);
- $loopid = $sprid[1];
- $sprid = $sprid[0];
-
- $spremenljivka = Cache::srv_spremenljivka($sprid);
- $enota = $spremenljivka["enota"];
-
- //za choose location naredi isto, kot za vsak userja posebej - dobi direkt iz baze ne glede na filterje
- if($enota == 3){
- echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
- '" href="javascript:void(0);" onclick="passMapData('.$sprid.', -1, '.$loopid.', '.self::$sid.', \'mapData\');">';
- echo '<img src="img_0/Google_Maps_Icon.png" height="24" width="24" />';
- echo '</a>';
- }
- //prikaz glede na filterje
- else{
- echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
- '" href="javascript:void(0);" onclick="passMapData('.$sprid.', -1, '.$loopid.', '.self::$sid.', \'mapDataAll\');">';
- echo '<img src="img_0/Google_Maps_Icon.png" height="24" width="24" />';
- echo '</a>';
- }
- }
+ /**
+ *
+ * @global type $lang
+ * @param string $spid - [spremenljivka_id]_[loop_id]
+ */
+ private static function displayMapDataAll($spid){
+ global $lang;
+ $sprid = explode('_',$spid);
+ $loopid = $sprid[1];
+ $sprid = $sprid[0];
+
+ $spremenljivka = Cache::srv_spremenljivka($sprid);
+ $enota = $spremenljivka["enota"];
+
+ //za choose location naredi isto, kot za vsak userja posebej - dobi direkt iz baze ne glede na filterje
+ if($enota == 3){
+ echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
+ '" href="javascript:void(0);" onclick="passMapData('.$sprid.', -1, '.$loopid.', '.self::$sid.', \'mapData\');">';
+ echo '<img src="img_0/Google_Maps_Icon.png" height="24" width="24" />';
+ echo '</a>';
+ }
+ //prikaz glede na filterje
+ else{
+ echo '<a class="fMap" title="'.$lang['srv_view_data_on_map'].
+ '" href="javascript:void(0);" onclick="passMapData('.$sprid.', -1, '.$loopid.', '.self::$sid.', \'mapDataAll\');">';
+ echo '<img src="img_0/Google_Maps_Icon.png" height="24" width="24" />';
+ echo '</a>';
+ }
+ }
/** Izriše tekstovne odgovore v vertikalni obliki
*
@@ -4218,6 +4675,7 @@ class SurveyAnalysis {
*/
static function sumTextVertical($spid,$_from) {
global $lang;
+
# dajemo v bufer, da da ne prikazujemo vprašanj brez veljavnih odgovorov če imamo tako nastavljeno
$spremenljivka = self::$_HEADERS[$spid];
@@ -4229,7 +4687,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -4247,21 +4707,25 @@ class SurveyAnalysis {
$options=array('inline_legenda' => $inline_legenda, 'isTextAnswer' => false, 'isOtherAnswer' => false, 'num_show_records' => $num_show_records);
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
+
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_br tbl_clps">';
+ echo '<table class="table_sums sums_text_ver">';
+
# naslovna vrstica
- echo '<tr>';
+ echo '<tr class="row1">';
+
#variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo '<td class="cell_var">';
echo self::showVariable($spid, $spremenljivka['variable']);
echo '</td>';
+
#odgovori
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(self::$_SHOW_LEGENDA ? 5+(int)$inline_legenda*2 : 5).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+ echo '<td class="cell_question" colspan="'.(self::$_SHOW_LEGENDA ? 5+(int)$inline_legenda*2 : 5).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
if (self::$_SHOW_LEGENDA) {
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
@@ -4278,26 +4742,38 @@ class SurveyAnalysis {
echo '<div class="anl_variable_type"><span>'.$lang['srv_analiza_opisne_variable_type'].': </span>'.self::getSpremenljivkaLegenda($spremenljivka,'tip').'</div>';
}
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
+
+
+ echo '<tr class="row2">';
+
+ # variabla - besedilo
+ echo '<td class="cell_icons cell_icons'.$spid.' besedilo" id="cell_icons'.$spid.'">';
+ echo ' <span class="faicon dots" onclick="show_settings_survey_analysis(\''.$spid.'\')" > </span>';
+ echo ' <div class= "options" id="options'.$spid.'">';
self::showIcons($spid,$spremenljivka,$_from);
+ echo ' </div>';
echo '</td>';
- #odgovori
+
+ # odgovori
+ echo '<td class="cell_question">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_variabla_line">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
if (self::$_SHOW_LEGENDA && $inline_legenda){
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_legend anl_variabla_line">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_expression'].'</td>';
+ echo '<td class="cell_info">'.$lang['srv_analiza_opisne_variable_skala'].'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleOdstotek'] .'</td>';
+
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleOdstotek'] .'</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleVeljavni'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleVeljavni'] .'</td>';
}
- echo '<td class="anl_br anl_bb anl_ac anl_bck anl_w70 anl_variabla_line">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
+ echo '<td class="cell_value">'. $lang['srv_analiza_frekvence_titleKumulativa'] .'</td>';
+
echo '</tr>';
+
+
// konec naslovne vrstice
$_answersOther = array();
$_grids_count = count($spremenljivka['grids']);
@@ -4329,9 +4805,9 @@ class SurveyAnalysis {
}
}
# izpišemo sumo veljavnih
- $counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
+ //$counter = self::outputSumaValidAnswerVertical($counter,$_sequence,$spid,$options);
}
- if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
+ /*if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki nisno 0
$counter = self::outputInvalidAnswerVertical($counter,$ikey,$iAnswer,$_sequence,$spid,$options);
@@ -4341,8 +4817,10 @@ class SurveyAnalysis {
$counter = self::outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$options);
}
#izpišemo še skupno sumo
- $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);
- } else {
+ $counter = self::outputSumaVertical($counter,$_sequence,$spid,$options);*/
+
+ }
+ else {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
}
@@ -4360,7 +4838,6 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -4372,45 +4849,55 @@ class SurveyAnalysis {
* @param $_options
*/
static function outputGridLabelVertical($gid,$grid,$vid,$variable,$spid,$_options=array()) {
- echo '<tr id="'.$spid.'_'.$counter.'">';
- echo '<td class="anl_bck_freq_2 anl_bl anl_bb anl_br anl_ac anl_variabla_sub">';
+
+ echo '<tr id="'.$spid.'_'.$counter.'" class="row_grid">';
+
+ echo '<td class="cell_var">';
echo $variable['variable'];
echo '</td>';
- echo '<td class="anl_bck_freq_2 anl_al anl_bb anl_br">';
- //echo ($grid['naslov'] != '' ? $grid['naslov']. '&nbsp;-&nbsp;' : '').$variable['naslov'];
+
+ echo '<td class="cell_question">';
echo $variable['naslov'];
echo '</td>';
+
if (self::$_SHOW_LEGENDA) {
$spremenljivka = self::$_HEADERS[$spid];
+
if ($variable['other'] != '1' && $variable['text'] != '1') {
$_tip = self::getSpremenljivkaLegenda($spremenljivka,'izrazanje');
$_oblika = self::getSpremenljivkaLegenda($spremenljivka,'skala');
- } else {
+ }
+ else {
global $lang;
+
$_tip = $lang['srv_analiza_vrsta_bese'];
$_oblika = $lang['srv_analiza_oblika_nomi'];
}
- echo '<td class="anl_bck_freq_2 anl_ac anl_bb anl_br ">'.$_tip.'</td>';
- echo '<td class="anl_bck_freq_2 anl_ac anl_bb anl_br ">'.$_oblika.'</td>';
+ echo '<td class="cell_info">'.$_tip.'</td>';
+ echo '<td class="cell_info">'.$_oblika.'</td>';
}
- echo '<td class="anl_bck_freq_2 anl_bb anl_br">&nbsp;</td>';
+
+ echo '<td class="cell_value"></td>';
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_bck_freq_2 anl_bb anl_br">&nbsp;</td>';
+ echo '<td class="cell_value"></td>';
}
- echo '<td class="anl_bck_freq_2 anl_bb anl_br">&nbsp;</td>';
- echo '<td class="anl_bck_freq_2 anl_bb anl_br">&nbsp;</td>';
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
+
$counter++;
+
return $counter;
}
static function outputValidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,&$_kumulativa,$_options=array()) {
global $lang;
- # opcije
-
+
+ # opcije
$options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
'isOtherAnswer' => false, # ali je odgovor Drugo
'inline_legenda' => true, # ali je legenda inline ali v headerju
@@ -4419,111 +4906,127 @@ class SurveyAnalysis {
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- $cssBck = ' '.self::$cssColors['0_' . ($counter & 1)];
- $_valid = (self::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*$vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
- $_percent = (self::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*$vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
+ $_valid = (isset(self::$_FREQUENCYS[$_sequence]['validCnt']) && self::$_FREQUENCYS[$_sequence]['validCnt'] > 0) ? 100*$vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ $_percent = (isset(self::$_FREQUENCYS[$_sequence]['allCnt']) && self::$_FREQUENCYS[$_sequence]['allCnt'] > 0) ? 100*$vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
$_kumulativa += $_valid;
# če smo v arhivih dodamovse odgovore vendar so nekateri skriti
+ $cssHide = '';
if ($counter >= $options['num_show_records'] && self::$isArchive) {
- $cssHide=' class="displayNone"';
+ $cssHide = 'displayNone';
}
- echo '<tr id="'.$spid.'_'.$_sequence.'_'.$counter.'" name="valid_row_'.$_sequence.'"'.(self::$enableInspect == true && (int)$vAnswer['cnt'] > 0 ? ' vkey="'.$vkey.'"' : '').$cssHide.'>';
- echo '<td class="anl_bl anl_ac anl_br gray">&nbsp;</td>';
- echo '<td class="anl_br'.$cssBck.'">';
- echo '<div class="anl_user_text_more">'.$vkey.'</div>';
- echo (($options['isTextAnswer'] == false && (string)$vkey != $vAnswer['text']) ? ' ('.$vAnswer['text'] .')' : '');
+
+
+ echo '<tr id="'.$spid.'_'.$_sequence.'_'.$counter.'" name="valid_row_'.$_sequence.'"'.(self::$enableInspect == true && (int)$vAnswer['cnt'] > 0 ? ' vkey="'.$vkey.'"' : ''). 'class="row_var '.$cssHide.'">';
+
+ echo '<td class="cell_noVerBorder"></td>';
+
+ echo '<td class="cell_question">';
+ echo ' <span class="anl_user_text_more">'.$vkey.'</div>';
+ echo (($options['isTextAnswer'] == false && (string)$vkey != $vAnswer['text']) ? ' ('.$vAnswer['text'] .')' : '');
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true ) {
- echo '<td class="anl_ac anl_br'.$cssBck.'">&nbsp;</td>';
- echo '<td class="anl_ac anl_br'.$cssBck.'">&nbsp;</td>';
+ echo '<td class="cell_info"></td>';
+ echo '<td class="cell_info"></td>';
}
- echo '<td class="anl_ac anl_br'.$cssBck.(self::$enableInspect == true && $options['isOtherAnswer']== false && (int)$vAnswer['cnt'] > 0 ? ' fr_inspect' : '').'">';
+ echo '<td class="cell_value '.(self::$enableInspect == true && $options['isOtherAnswer']== false && (int)$vAnswer['cnt'] > 0 ? ' fr_inspect' : '').'">';
echo (int)$vAnswer['cnt'];
echo '</td>';
- echo '<td class="anl_ar anl_br'.$cssBck.' anl_pr10">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
+
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_br'.$cssBck.' anl_pr10">';
+ echo '<td class="cell_value">';
echo self::formatNumber($_valid, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
- echo '<td class="anl_ar'.$cssBck.' anl_pr10">';
- echo self::formatNumber($_kumulativa, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '<td class="cell_value">';
+ echo self::formatNumber($_kumulativa, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
+
echo '</tr>';
+
# če mamo več
if ( $counter+1 == $options['num_show_records'] && $options['num_show_records'] < count(self::$_FREQUENCYS[$_sequence]['valid'])) {
+
if (self::$isArchive == false ) {
- echo '<tr id="'.$spid.'_'.$_sequence.'_'.$counter.'" name="valid_row_'.$_sequence.'" >';
- echo '<td class="anl_bl anl_ac anl_br gray">&nbsp;</td>';
- echo '<td class="anl_br'.$cssBck.'">';
- // Pri javni povezavi drugace izpisemo
- if(self::$printPreview == false){
- echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatLeft blue pointer anl_more" onclick="showHidenTextTable(\''.$spid.'\', \''.$options['num_show_records'].'\', \''.self::$_CURRENT_LOOP['cnt'].'\');return false;">'.$lang['srv_anl_more'].'</div>';
- echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatRight blue pointer anl_more" onclick="showHidenTextTable(\''.$spid.'\', \''.$options['num_show_records'].'\', \''.self::$_CURRENT_LOOP['cnt'].'\');return false;">'.$lang['srv_anl_more'].'</div>';
- }
- else{
- echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatLeft anl_more">'.$lang['srv_anl_more'].'</div>';
- echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatRight anl_more">'.$lang['srv_anl_more'].'</div>';
- }
+
+ echo '<tr id="'.$spid.'_'.$_sequence.'_'.$counter.'" name="valid_row_'.$_sequence.'" class="row_var">';
+
+ echo '<td class="cell_noVerBorder"></td>';
+
+ echo '<td class="cell_question">';
+ echo ' <div id="valid_row_togle_more_'.$_sequence.'" class="floatLeft blue pointer anl_more" onclick="showHidenTextTable(\''.$spid.'\', \''.$options['num_show_records'].'\', \''.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'\');return false;">'.$lang['srv_anl_more'].'</div>';
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true ) {
- echo '<td class="anl_ac anl_br'.$cssBck.'">&nbsp;</td>';
- echo '<td class="anl_ac anl_br'.$cssBck.'">&nbsp;</td>';
+ echo '<td class="cell_info"></td>';
+ echo '<td class="cell_info"></td>';
}
- echo '<td class="anl_ac anl_br'.$cssBck.'">'.'</td>';
- echo '<td class="anl_ar anl_br'.$cssBck.' anl_pr10">'.'</td>';
+
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_br'.$cssBck.' anl_pr10">'.'</td>';
+ echo '<td class="cell_value"></td>';
}
- echo '<td class="anl_ar'.$cssBck.' anl_pr10">'.'</td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
- } else {
- #v arhivie dodamo vse odgovore vendar so skriti
- echo '<tr id="'.$spid.'_'.$_sequence.'_'.$counter.'" name="valid_row_'.$_sequence.'" >';
- echo '<td class="anl_bl anl_ac anl_br gray">&nbsp;</td>';
- echo '<td class="anl_br'.$cssBck.'">';
- echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatLeft blue pointer" onclick="$(this).parent().parent().parent().find(\'tr.displayNone\').removeClass(\'displayNone\');$(this).parent().parent().addClass(\'displayNone\');return false;">'.$lang['srv_anl_all'].'</div>';
- echo '<div id="valid_row_togle_more_'.$_sequence.'" class="floatRight blue pointer" onclick="$(this).parent().parent().parent().find(\'tr.displayNone\').removeClass(\'displayNone\');$(this).parent().parent().addClass(\'displayNone\');return false;">'.$lang['srv_anl_all'].'</div>';
+ }
+ else {
+
+ # v arhivie dodamo vse odgovore vendar so skriti
+ echo '<tr id="'.$spid.'_'.$_sequence.'_'.$counter.'" name="valid_row_'.$_sequence.'" class="row_var row_more">';
+
+ echo '<td class="cell_noVerBorder"></td>';
+
+ echo '<td class="cell_more">';
+ echo ' <div id="valid_row_togle_more_'.$_sequence.'" class="floatLeft blue pointer" onclick="$(this).parent().parent().parent().find(\'tr.displayNone\').removeClass(\'displayNone\');$(this).parent().parent().addClass(\'displayNone\');return false;">'.$lang['srv_anl_all'].'</div>';
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true ) {
- echo '<td class="anl_ac anl_br'.$cssBck.'">&nbsp;</td>';
- echo '<td class="anl_ac anl_br'.$cssBck.'">&nbsp;</td>';
+ echo '<td class="cell_info"></td>';
+ echo '<td class="cell_info"></td>';
}
- echo '<td class="anl_ac anl_br'.$cssBck.'">'.'</td>';
- echo '<td class="anl_ar anl_br'.$cssBck.' anl_pr10">'.'</td>';
+
+ echo '<td class="cell_value"></td>';
+ echo '<td class="cell_value"></td>';
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_br'.$cssBck.' anl_pr10">'.'</td>';
+ echo '<td class="cell_value"></td>';
}
- echo '<td class="anl_ar'.$cssBck.' anl_pr10">'.'</td>';
+ echo '<td class="cell_value"></td>';
+
echo '</tr>';
}
}
$counter++;
+
return $counter;
}
+ // Zadnja osnovna vrstica - suma z razipranjem missingov
static function outputSumaValidAnswerVertical($counter,$_sequence,$spid,$_options=array()) {
global $lang;
+
# opcije
- $options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
- 'isOtherAnswer' => false, # ali je odgovor Drugo
- 'inline_legenda' => true, # ali je legenda inline ali v headerju
+ $options = array(
+ 'isTextAnswer' => false, # ali je tekstovni odgovor
+ 'isOtherAnswer' => false, # ali je odgovor Drugo
+ 'inline_legenda' => true, # ali je legenda inline ali v headerju
);
+
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- // $cssBck = ' '.self::$cssColors['0_' . ($counter & 1)]; $_percent = (self::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*self::$_FREQUENCYS[$_sequence]['validCnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
- $cssBck = ' '.self::$cssColors['text_1'];
-
$_brez_MV = ((int)self::$missingProfileData['display_mv_type'] === 0 ) ? TRUE : FALSE;
$_hide_minus = ((int)self::$missingProfileData['display_mv_type'] === 2 ) ? TRUE : FALSE;
$value =((int)self::$missingProfileData['display_mv_type'] === 0 ) ? 0 : 1;
@@ -4535,203 +5038,218 @@ class SurveyAnalysis {
$_sufix = '_loop'.self::$_CURRENT_LOOP['cnt'].$_sufix;
}
- echo '<tr id="anl_click_missing_tr_'.$_sequence.$_sufix.'" class="'.($_brez_MV ? 'anl_bb' : 'anl_dash_red_bb').'">';
- echo '<td class="anl_bl anl_br anl_al gray anl_ti_20'.$cssBck.'">'.$lang['srv_anl_valid'];
+ echo '<tr id="anl_click_missing_tr_'.$_sequence.$_sufix.'" class="row_var row_sum '.($_brez_MV ? 'anl_bb' : 'anl_dash_red_bb').'">';
- echo '<span id="click_missing_'.$_sequence.$_sufix.'" class="anl_click_missing gray'.($_brez_MV ? '' : ' displayNone').'" value="'.$value.'">&nbsp;&nbsp;<span class="faicon plus_orange icon-orange_hover_red folder_plusminus"></span></span>';
- echo '<span id="single_missing_title_'.$_sequence.$_sufix.'" class="anl_click_missing_hide gray'.($_brez_MV || $_hide_minus? ' displayNone' : '').'">&nbsp;&nbsp;<span class="faicon minus_orange icon-orange_hover_red folder_plusminus"></span></span>';
+ echo '<td class="cell_missing">';
+ echo ' <span id="click_missing_'.$_sequence.$_sufix.'" class="anl_click_missing '.($_brez_MV ? '' : ' displayNone').'" value="'.$value.'"><span class="faicon arrow2_d"></span>'.$lang['srv_anl_valid'].'</span>';
echo '</td>';
- echo '<td class="anl_br anl_al anl_ita red'.$cssBck.'" >'.$lang['srv_anl_suma1'].'</td>';
+ echo '<td class="cell_question">'.$lang['srv_anl_suma1'].'</td>';
-
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
- echo '<th class="anl_ita red anl_br anl_ac'.$cssBck.'">&nbsp;</th>';
- echo '<th class="anl_ita red anl_br anl_ac'.$cssBck.'">&nbsp;</th>';
+ echo '<td class="cell_info">/</td>';
+ echo '<td class="cell_info">/</td>';
}
- echo '<td class="anl_ita red anl_br anl_ac'.$cssBck.'" >';
- echo self::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ? self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ echo '<td class="cell_value">';
+ echo (isset(self::$_FREQUENCYS[$_sequence]['validCnt'])?self::$_FREQUENCYS[$_sequence]['validCnt']:0) > 0 ? self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
echo '</td>';
+
$_percent = self::$_FREQUENCYS[$_sequence]['allCnt'] > 0
- ? 100 * self::$_FREQUENCYS[$_sequence]['validCnt'] / self::$_FREQUENCYS[$_sequence]['allCnt']
- : 0;
- echo '<td class="anl_ita red anl_br anl_ar'.$cssBck.' anl_pr10">' . self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
+ ? 100 * (isset(self::$_FREQUENCYS[$_sequence]['validCnt'])?self::$_FREQUENCYS[$_sequence]['validCnt']:0) / self::$_FREQUENCYS[$_sequence]['allCnt']
+ : 0;
+ echo '<td class="cell_value">' . self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_ita red anl_br anl_ar'.$cssBck.' anl_pr10">' . self::formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
+ echo '<td class="cell_value">' . self::formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
}
- echo '<td class="anl_ita red anl_ac'.$cssBck.'">&nbsp;</td>';
+ echo '<td class="cell_value">/</td>';
+
echo '</tr>';
- // $counter++;
- return $counter;
+ return $counter;
}
+ // Vrstica s posamezno missing vrednostjo
static function outputInvalidAnswerVertical($counter,$vkey,$vAnswer,$_sequence,$spid,$_options=array()) {
global $lang;
+
# opcije
- $options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
- 'isOtherAnswer' => false, # ali je odgovor Drugo
- 'inline_legenda' => true, # ali je legenda inline ali v headerju
+ $options = array(
+ 'isTextAnswer' => false, # ali je tekstovni odgovor
+ 'isOtherAnswer' => false, # ali je odgovor Drugo
+ 'inline_legenda' => true, # ali je legenda inline ali v headerju
);
+
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- //$cssBck = ' '.self::$cssColors['text_' . ($counter & 1)];
- $cssBck = ' '.self::$cssColors['0_' . ($counter & 1)];
$_percent = (self::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*$vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
$_invalid = (self::$_FREQUENCYS[$_sequence]['invalidCnt'] > 0 ) ? 100*$vAnswer['cnt'] / self::$_FREQUENCYS[$_sequence]['invalidCnt'] : 0;
$_sufix = (self::$podstran == M_ANALYSIS_SUMMARY_NEW ? '_NEW' : '');
- # da deluje razpiranje manjkajočih tudi kadar imamo skupine
+
+ # da deluje razpiranje manjkajočih tudi kadar imamo skupine
if (isset(self::$_CURRENT_LOOP['cnt'])) {
$_sufix = '_loop'.self::$_CURRENT_LOOP['cnt'].$_sufix;
}
$_Z_MV = ((int)self::$missingProfileData['display_mv_type'] === 2) ? TRUE : FALSE;
- echo '<tr name="missing_detail_'.$_sequence.$_sufix.'"'.($_Z_MV ? '': ' class="displayNone"').'>';
- echo '<td class="anl_bl anl_br anl_ac gray" style="width:10px">&nbsp;</td>';
- echo '<td class="anl_br'.$cssBck.'">';
- echo '<div class="floatLeft"><div class="anl_tin2">'.'<span class="anl_user_text">' . $vkey . '</span>' . ' (' . $vAnswer['text'].')'.'</div></div>';
- echo '<div class="floatRight anl_detail_percent anl_w50 anl_ac anl_dash_bl">'.self::formatNumber($_invalid, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%').'</div>';
- echo '<div class="floatRight anl_detail_percent anl_w30 anl_ac">'.$vAnswer['cnt'].'</div>';
+
+ echo '<tr name="missing_detail_'.$_sequence.$_sufix.'" class="row_var row_missing '.($_Z_MV ? '': 'displayNone').'">';
+
+ echo '<td class="cell_noVerBorder"></td>';
+
+ echo '<td class="row_question">';
+ echo ' <div class="floatLeft"><div class="anl_tin2">'.'<span class="anl_user_text">' . $vkey . '</span>' . ' (' . $vAnswer['text'].')'.'</div></div>';
+ //echo ' <div class="floatRight anl_detail_percent anl_w50 anl_ac anl_dash_bl">'.self::formatNumber($_invalid, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%').'</div>';
+ //echo ' <div class="floatRight anl_detail_percent anl_w30 anl_ac">'.$vAnswer['cnt'].'</div>';
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
- echo '<th class="anl_ac anl_br'.$cssBck.'">&nbsp;</th>';
- echo '<th class="anl_ac anl_br'.$cssBck.'">&nbsp;</th>';
+ echo '<td class="cell_info">/</td>';
+ echo '<td class="cell_info">/</td>';
}
- echo '<td class="anl_ac anl_br'.$cssBck.'">';
+
+ echo '<td class="cell_value">';
echo (int)$vAnswer['cnt'];
echo '</td>';
- echo '<td class="anl_ar anl_br'.$cssBck.'">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
+
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_br anl_detail_percent anl_ita'.$cssBck.'">';
- echo '&nbsp;';
- echo '</td>';
+ echo '<td class="cell_value">/</td>';
}
- echo '<td class="'.$cssBck.'" >';
- echo '&nbsp;';
- echo '</td>';
+
+ echo '<td class="cell_value">/</td>';
+
echo '</tr>';
+
$counter++;
+
return $counter;
}
+ // Zadnja vrstica manjkajocih vrednosti - suma manjkajocih
static function outputSumaInvalidAnswerVertical($counter,$_sequence,$spid,$_options = array()) {
global $lang;
+
# opcije
- $options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
- 'isOtherAnswer' => false, # ali je odgovor Drugo
- 'inline_legenda' => true, # ali je legenda inline ali v headerju
+ $options = array(
+ 'isTextAnswer' => false, # ali je tekstovni odgovor
+ 'isOtherAnswer' => false, # ali je odgovor Drugo
+ 'inline_legenda' => true, # ali je legenda inline ali v headerju
);
+
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- //$cssBck = ' '.self::$cssColors['text_' . ($counter & 1)];
- $cssBck = ' '.self::$cssColors['text_1'];
- $_percent = (self::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*self::$_FREQUENCYS[$_sequence]['invalidCnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['allCnt']) && self::$_FREQUENCYS[$_sequence]['allCnt'] > 0 && isset(self::$_FREQUENCYS[$_sequence]['invalidCnt']))
+ $_percent = 100*self::$_FREQUENCYS[$_sequence]['invalidCnt'] / self::$_FREQUENCYS[$_sequence]['allCnt'];
+ else
+ $_percent = 0;
$_brez_MV = ((int)self::$missingProfileData['display_mv_type'] === 0) ? TRUE : FALSE;
$_hide_minus = ((int)self::$missingProfileData['display_mv_type'] === 1 || (int)self::$missingProfileData['display_mv_type'] === 0) ? TRUE : FALSE;
$_sufix = (self::$podstran == M_ANALYSIS_SUMMARY_NEW ? '_NEW' : '');
- # da deluje razpiranje manjkajočih tudi kadar imamo skupine
+
+ # da deluje razpiranje manjkajočih tudi kadar imamo skupine
if (isset(self::$_CURRENT_LOOP['cnt'])) {
$_sufix = '_loop'.self::$_CURRENT_LOOP['cnt'].$_sufix;
}
- echo '<tr id="click_missing_1_'.$_sequence.$_sufix.'" class="anl_dash_red_bb'.($_brez_MV ?' displayNone' : '').'">';
- echo '<td class="anl_bl anl_al anl_br gray anl_ti_20'.$cssBck.'">';
+ echo '<tr id="click_missing_1_'.$_sequence.$_sufix.'" name="missing_detail_'.$_sequence.'" class="row_var row_missing row_sum '.($_brez_MV ? 'displayNone' : '').'">';
+
+ echo '<td class="cell_var cell_noVerBorder">';
echo $lang['srv_anl_missing'];
echo '</td>';
- echo '<td class="anl_br anl_ita red'.$cssBck.'" >';
- echo $lang['srv_analiza_manjkajocevrednosti'];
- // podrobno za missinge
- echo '<span id="single_missing_0'.$_sequence.$_sufix.'" class="printHide anl_ita anl_detail_percent'.($_hide_minus ? '' : ' displayNone').'">&nbsp;&nbsp;';
- echo '<a href="#single_missing_'.$_sequence.$_sufix.'" onclick="show_single_missing(\''.$_sequence.$_sufix.'\', 0);return false;" > ' ;
- //echo $lang['srv_analiza_missingSpremenljivke'] ;
- echo ' <span class="faicon plus_orange icon-orange_hover_red folder_plusminus"></span> </a>';
- echo '</span>';
- echo '<span id="single_missing_1'.$_sequence.$_sufix.'" class="printHide anl_ita anl_detail_percent'.($_hide_minus ? ' displayNone' : '').'">&nbsp;&nbsp;';
- echo '<a href="#single_missing_'.$_sequence.$_sufix.'" onclick="show_single_missing(\''.$_sequence.$_sufix.'\', 1);return false;" > ' ;
- // echo $lang['srv_analiza_missingSpremenljivke'] ;
- echo ' <span class="faicon minus_orange icon-orange_hover_red folder_plusminus"></span> </a>';
- echo '</span>';
- echo '<div id="single_missing_suma_'.$_sequence.$_sufix.'" class="floatRight anl_w50 anl_dash_bl anl_dash_bt anl_ac anl_detail_percent displayNone">100.0%</div>';
- echo '<div id="single_missing_suma_freq_'.$_sequence.$_sufix.'" class="floatRight anl_w30 anl_dash_bt anl_ac anl_detail_percent displayNone">'.self::$_FREQUENCYS[$_sequence]['invalidCnt'].'</div>';
+ echo '<td class="cell_question">';
+ echo $lang['srv_analiza_manjkajocevrednosti'];
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
- echo '<th class="anl_ac anl_br anl_ita red'.$cssBck.'">&nbsp;</th>';
- echo '<th class="anl_ac anl_br anl_ita red'.$cssBck.'">&nbsp;</th>';
+ echo '<td class="cell_info">&nbsp;</td>';
+ echo '<td class="cell_info">&nbsp;</td>';
}
- echo '<td class="anl_ac anl_br anl_detail_cnt anl_ita red'.$cssBck.'">';
- $answer['cnt'] = self::$_FREQUENCYS[$_sequence]['invalidCnt'] > 0 ? self::$_FREQUENCYS[$_sequence]['invalidCnt'] : 0;
+ echo '<td class="cell_value">';
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['invalidCnt']) && self::$_FREQUENCYS[$_sequence]['invalidCnt'] > 0)
+ $answer['cnt'] = self::$_FREQUENCYS[$_sequence]['invalidCnt'];
+ else
+ $answer['cnt'] = 0;
+
echo (int)$answer['cnt'];
echo '</td>';
- echo '<td class="anl_ar anl_br anl_ita red'.$cssBck.' anl_pr10">';
+
+ echo '<td class="cell_value">';
echo self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
+
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_br anl_ita red'.$cssBck.' anl_pr10">';
- echo '<span id="single_missing_percent_'.$_sequence.$_sufix.'" class="'.($detail ? 'displayNone' : '' ).'">&nbsp;</span>';
- echo '</td>';
+ echo '<td class="cell_value">/</td>';
}
- echo '<td class="anl_ar anl_ita red'.$cssBck.' anl_pr10">&nbsp;</td>';
+ echo '<td class="cell_value">/</td>';
+
echo '</tr>';
+
$counter++;
+
return $counter;
}
+ // Cisto zadnja vrstica - suma vseh (manjkajoce + navadne)
static function outputSumaVertical($counter,$_sequence,$spid, $_options = array()) {
global $lang;
- # opcije
- $options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
- 'isOtherAnswer' => false, # ali je odgovor Drugo
- 'inline_legenda' => true, # ali je legenda inline ali v headerju
+ # opcije
+ $options = array(
+ 'isTextAnswer' => false, # ali je tekstovni odgovor
+ 'isOtherAnswer' => false, # ali je odgovor Drugo
+ 'inline_legenda' => true, # ali je legenda inline ali v headerju
);
+
foreach ($_options as $_oKey => $_option) {
$options[$_oKey] = $_option;
}
- // $cssBck = ' '.self::$cssColors['0_' .($counter & 1)];
- $cssBck = ' anl_bck_text_0';
$_brez_MV = ((int)self::$missingProfileData['display_mv_type'] === 0) ? TRUE : FALSE;
$_sufix = (self::$podstran == M_ANALYSIS_SUMMARY_NEW ? '_NEW' : '');
+
# da deluje razpiranje manjkajočih tudi kadar imamo skupine
if (isset(self::$_CURRENT_LOOP['cnt'])) {
$_sufix = '_loop'.self::$_CURRENT_LOOP['cnt'].$_sufix;
}
- echo '<tr id="click_missing_suma_'.$_sequence.$_sufix.'" class="'.($_brez_MV ? 'displayNone' : '').'">';
- //echo '<td class="anl_bl anl_ac anl_dash_bt anl_br anl_bb gray">&nbsp;</td>'; // $lang['srv_anl_appropriate']
- //echo '<td class="anl_al anl_dash_bt anl_br anl_bb red anl_ita'.$cssBck.'">'.$lang['srv_anl_suma2'].'</td>';
- echo '<td class="anl_bl anl_ac anl_dash_bt anl_bb red anl_ita'.$cssBck.'">'.$lang['srv_anl_suma2'].'</td>';
- echo '<td class="anl_dash_bt anl_br anl_bb'.$cssBck.'">&nbsp;</td>';
+ echo '<tr id="click_missing_suma_'.$_sequence.$_sufix.'" name="missing_detail_'.$_sequence.'" class="row_sum_all '.($_brez_MV ? 'displayNone' : '').'">';
+
+ echo '<td class="cell_var">'.$lang['srv_anl_suma2'].'</td>';
+
+ echo '<td class="cell_question"></td>';
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
- echo '<td class="anl_ac anl_dash_bt anl_br anl_bb anl_ita'.$cssBck.'" >&nbsp;</td>';
- echo '<td class="anl_ac anl_dash_bt anl_br anl_bb anl_ita'.$cssBck.'" >&nbsp;</td>';
+ echo '<td class="cell_info">/</td>';
+ echo '<td class="cell_info">/</td>';
}
- echo '<td class="anl_ac anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.'" >' . (self::$_FREQUENCYS[$_sequence]['allCnt'] ? self::$_FREQUENCYS[$_sequence]['allCnt'] : 0) . '</td>';
- echo '<td class="anl_ar anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.' anl_pr10">' . self::formatNumber('100', SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
+
+ echo '<td class="cell_value">' . (self::$_FREQUENCYS[$_sequence]['allCnt'] ? self::$_FREQUENCYS[$_sequence]['allCnt'] : 0) . '</td>';
+ echo '<td class="cell_value">' . self::formatNumber('100', SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.' anl_pr10">&nbsp;</td>';
+ echo '<td class="cell_value">/</td>';
}
- echo '<td class="anl_ac anl_dash_bt anl_bb anl_ita red'.$cssBck.'">&nbsp;</td>';
- echo '</tr>';
+ echo '<td class="cell_value">/</td>';
+ echo '</tr>';
}
-
- static function outputSumaValidAnswerHeatmap($counter,$_sequence,$spid,$_options=array(), $validHeatmapRegion) {
+ static function outputSumaValidAnswerHeatmap($counter,$_sequence,$spid=0,$_options=array(), $validHeatmapRegion=null) {
global $lang;
# opcije
$options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
@@ -4769,28 +5287,16 @@ class SurveyAnalysis {
echo '<th class="anl_ita red anl_br anl_ac'.$cssBck.'">&nbsp;</th>';
}
- //Veljavni - Skupaj
+ // Veljavni - Skupaj
echo '<td class="anl_ita red anl_br anl_ac'.$cssBck.'" >';
echo $validHeatmapRegion;
- //echo self::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ? self::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
echo '</td>';
-
-/* $_percent = self::$_FREQUENCYS[$_sequence]['allCnt'] > 0
- ? 100 * self::$_FREQUENCYS[$_sequence]['validCnt'] / self::$_FREQUENCYS[$_sequence]['allCnt']
- : 0;
- echo '<td class="anl_ita red anl_br anl_ar'.$cssBck.' anl_pr10">' . self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
- if (self::$_HEADERS[$spid]['show_valid_percent'] == true) {
- echo '<td class="anl_ita red anl_br anl_ar'.$cssBck.' anl_pr10">' . self::formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
- }
- echo '<td class="anl_ita red anl_ac'.$cssBck.'">&nbsp;</td>'; */
- echo '</tr>';
- // $counter++;
return $counter;
}
- static function outputInvalidAnswerHeatmap($counter,$vkey,$vAnswer,$_sequence,$spid,$_options=array(), $manjkajoci) {
+ static function outputInvalidAnswerHeatmap($counter,$vkey,$vAnswer,$_sequence,$spid,$_options=array(), $manjkajoci=null) {
global $lang;
# opcije
$options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
@@ -4843,7 +5349,7 @@ class SurveyAnalysis {
return $counter;
}
- static function outputSumaInvalidAnswerHeatmap($counter,$_sequence,$spid,$_options = array(), $manjkajoci) {
+ static function outputSumaInvalidAnswerHeatmap($counter,$_sequence,$spid,$_options = array(), $manjkajoci=null) {
global $lang;
# opcije
$options = array( 'isTextAnswer' => false, # ali je tekstovni odgovor
@@ -4866,54 +5372,25 @@ class SurveyAnalysis {
$_sufix = '_loop'.self::$_CURRENT_LOOP['cnt'].$_sufix;
}
- echo '<tr id="click_missing_1_'.$_sequence.$_sufix.'" class="anl_dash_red_bb'.($_brez_MV ?' displayNone' : '').'">';
+ echo '<tr id="click_missing_1_'.$_sequence.$_sufix.'" name="missing_detail_'.$_sequence.'" class="anl_dash_red_bb'.($_brez_MV ?' displayNone' : '').'">';
echo '<td class="anl_bl anl_al anl_br gray anl_ti_20'.$cssBck.'">';
echo $lang['srv_anl_missing'];
echo '</td>';
echo '<td class="anl_br anl_ita red'.$cssBck.'" >';
- echo $lang['srv_analiza_manjkajocevrednosti'];
-
- // podrobno za missinge
- echo '<span id="single_missing_0'.$_sequence.$_sufix.'" class="printHide anl_ita anl_detail_percent'.($_hide_minus ? '' : ' displayNone').'">&nbsp;&nbsp;';
- echo '<a href="#single_missing_'.$_sequence.$_sufix.'" onclick="show_single_missing(\''.$_sequence.$_sufix.'\', 0);return false;" > ' ;
- //echo $lang['srv_analiza_missingSpremenljivke'] ;
- echo ' <span class="faicon plus_orange icon-orange_hover_red folder_plusminus"></span> </a>';
- echo '</span>';
- echo '<span id="single_missing_1'.$_sequence.$_sufix.'" class="printHide anl_ita anl_detail_percent'.($_hide_minus ? ' displayNone' : '').'">&nbsp;&nbsp;';
- echo '<a href="#single_missing_'.$_sequence.$_sufix.'" onclick="show_single_missing(\''.$_sequence.$_sufix.'\', 1);return false;" > ' ;
- // echo $lang['srv_analiza_missingSpremenljivke'] ;
- echo ' <span class="faicon minus_orange icon-orange_hover_red folder_plusminus"></span> </a>';
- echo '</span>';
-
- echo '<div id="single_missing_suma_'.$_sequence.$_sufix.'" class="floatRight anl_w50 anl_dash_bl anl_dash_bt anl_ac anl_detail_percent displayNone">100.0%</div>';
- //echo '<div id="single_missing_suma_freq_'.$_sequence.$_sufix.'" class="floatRight anl_w30 anl_dash_bt anl_ac anl_detail_percent displayNone">'.self::$_FREQUENCYS[$_sequence]['invalidCnt'].'</div>';
- echo '<div id="single_missing_suma_freq_'.$_sequence.$_sufix.'" class="floatRight anl_w30 anl_dash_bt anl_ac anl_detail_percent displayNone">'.$manjkajoci.'</div>';
+ echo $lang['srv_analiza_manjkajocevrednosti'];
echo '</td>';
+
if (self::$_SHOW_LEGENDA && $options['isOtherAnswer'] == false && $options['inline_legenda'] == true) {
echo '<th class="anl_ac anl_br anl_ita red'.$cssBck.'">&nbsp;</th>';
echo '<th class="anl_ac anl_br anl_ita red'.$cssBck.'">&nbsp;</th>';
}
- //Mankajoci - Skupaj
+ // Mankajoci - Skupaj
echo '<td class="anl_ac anl_br anl_detail_cnt anl_ita red'.$cssBck.'">';
- echo $manjkajoci;
- //$answer['cnt'] = self::$_FREQUENCYS[$_sequence]['invalidCnt'] > 0 ? self::$_FREQUENCYS[$_sequence]['invalidCnt'] : 0;
- //echo (int)$answer['cnt'];
- echo '</td>';
-
- //stolpec "Veljavni kliki"
-/* echo '<td class="anl_ar anl_br anl_ita red'.$cssBck.' anl_pr10">';
- echo self::formatNumber($_percent, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo $manjkajoci;
echo '</td>';
- */
-
-/* if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_br anl_ita red'.$cssBck.' anl_pr10">';
- echo '<span id="single_missing_percent_'.$_sequence.$_sufix.'" class="'.($detail ? 'displayNone' : '' ).'">&nbsp;</span>';
- echo '</td>';
- } */
echo '<td class="anl_ar anl_ita red'.$cssBck.' anl_pr10">&nbsp;</td>';
echo '</tr>';
@@ -4921,7 +5398,7 @@ class SurveyAnalysis {
return $counter;
}
- static function outputSumaHeatmap($counter,$_sequence,$spid, $_options = array(), $ustrezniHeatmapRegion) {
+ static function outputSumaHeatmap($counter,$_sequence,$spid, $_options = array(), $ustrezniHeatmapRegion=null) {
global $lang;
# opcije
@@ -4943,9 +5420,7 @@ class SurveyAnalysis {
$_sufix = '_loop'.self::$_CURRENT_LOOP['cnt'].$_sufix;
}
- echo '<tr id="click_missing_suma_'.$_sequence.$_sufix.'" class="'.($_brez_MV ? 'displayNone' : '').'">';
- //echo '<td class="anl_bl anl_ac anl_dash_bt anl_br anl_bb gray">&nbsp;</td>'; // $lang['srv_anl_appropriate']
- //echo '<td class="anl_al anl_dash_bt anl_br anl_bb red anl_ita'.$cssBck.'">'.$lang['srv_anl_suma2'].'</td>';
+ echo '<tr id="click_missing_suma_'.$_sequence.$_sufix.'" name="missing_detail_'.$_sequence.'" class="'.($_brez_MV ? 'displayNone' : '').'">';
echo '<td class="anl_bl anl_ac anl_dash_bt anl_bb red anl_ita'.$cssBck.'">'.$lang['srv_anl_suma2'].'</td>';
echo '<td class="anl_dash_bt anl_br anl_bb'.$cssBck.'">&nbsp;</td>';
@@ -4954,18 +5429,10 @@ class SurveyAnalysis {
echo '<td class="anl_ac anl_dash_bt anl_br anl_bb anl_ita'.$cssBck.'" >&nbsp;</td>';
}
- //SKUPAJ
+ // SKUPAJ
echo '<td class="anl_ac anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.'" >' .$ustrezniHeatmapRegion. '</td>';
-
- //echo '<td class="anl_ac anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.'" >' . (self::$_FREQUENCYS[$_sequence]['allCnt'] ? self::$_FREQUENCYS[$_sequence]['allCnt'] : 0) . '</td>';
-
- //echo '<td class="anl_ar anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.' anl_pr10">' . self::formatNumber('100', SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%') . '</td>';
- /*if (self::$_HEADERS[$spid]['show_valid_percent']) {
- echo '<td class="anl_ar anl_dash_bt anl_br anl_bb anl_ita red'.$cssBck.' anl_pr10">&nbsp;</td>';
- } */
- //echo '<td class="anl_ac anl_dash_bt anl_bb anl_ita red'.$cssBck.'">&nbsp;</td>';
- echo '</tr>';
+ echo '</tr>';
}
/** izpišemo tabelo z tekstovnimi odgovori drugo
@@ -5094,413 +5561,305 @@ class SurveyAnalysis {
}
- static public function showIcons($spid, $spremenljivka, $_from = 'freq', $additional=array()) {
+ // Ikone s povezavami na posamezno tabelo analize (popup)
+ static public function showIcons($spid, $spremenljivka, $_from='freq', $additional=array(), $onlyicons = false) {
global $lang;
-
- $sccFloat = 'taCenter ';
- #kateri skin
- $skin = 0;
- $options = array('sums'=>true,'sums*'=>true,'desc'=>true,'freq'=>true,'sums_spec'=>false);
+
+ // Javna povezava nima teh ikon
+ if (self::$printPreview != false)
+ return;
+
$from_navedbe = (isset($additional['navedbe']) && $additional['navedbe'] == true) ? true : false;
$showReport = (isset($additional['noReport']) && $additional['noReport'] == true) ? false: true;
$showChart = (isset($additional['showChart']) && $additional['showChart'] == false) ? false: true;
$printIcon = (isset($additional['printIcon']) && $additional['printIcon'] == true) ? true: false;
- if ($_from == 'para') {
- $showReport = false;
- }
-
- switch ($_from) {
- case 'freq':
- case 'para':
- case 'charts':
- switch ($spremenljivka['tip']) {
- case 1: # radio - prikjaže navpično
- if ($spremenljivka['show_valid_percent'] == true && $spremenljivka['skala'] != 1) {
- # če za ordinalno prikazujemo povprečje in st. oddklon
- $options['sums'] = true;
- $options['sums*'] = true;
- } else {
- # za nominalno ne prikazujemo povprečje in st. oddklon, zato je F == F*
- $options['sums'] = false;
- $options['sums*'] = false;
- }
- break;
- case 2: #checkbox če je dihotomna:
- break;
- case 3: # dropdown - prikjaže navpično
- break;
- case 6: # multigrid
- $options['sums*'] = false;
- if ( $spremenljivka['enota'] == 3 ) {
- $options['sums_spec'] = true;
- }
- break;
- case 7: # variabla tipa »število«
- $options['sums*'] = false;
- break;
- case 8: # datum
- $options['sums'] = false;
- $options['sums*'] = false;
- break;
- case 16: #multicheckbox če je dihotomna:
- break;
- case 17: #razvrščanje če je ordinalna
- $options['sums'] = false;
- break;
- case 18: # vsota
- $options['sums*'] = false;
- break;
- case 19: # multitext
- $options['sums*'] = false;
- break;
- case 20: # multi number
+ $options = array();
+
+ // Texti z ikono
+ $texts = $onlyicons ? array(
+ 'freq' => '<span class="faicon an_freq right8" title="'.$lang['srv_frequency'].'"></span>',
+ 'freq*' => '<span class="faicon an_freqx right8" title="'.$lang['srv_frequency*'].'"></span>',
+ 'desc' => '<span class="faicon an_desc right8" title="'.$lang['srv_descriptor'].'"></span>',
+ 'table' => '<span class="faicon an_sigma right8" title="'.$lang['srv_table'].'"></span>',
+ 'table*' => '<span class="faicon an_sigmax right8" title="'.$lang['srv_table*'].'"></span>',
+ 'table_ver' => '<span class="faicon an_sigma_ver right8" title="'.$lang['srv_table_ver'].'"></span>',
+ 'text' => '<span class="faicon an_text right8" title="'.$lang['srv_text_only'].'"></span>',
+ 'chart' => '<span class="faicon an_chart right8" title="'.$lang['srv_chart'].'"></span>',
+ ) :
+ array(
+ 'freq' => '<span class="faicon an_freq"></span> <span class="text">'.$lang['srv_frequency'].'</span>',
+ 'freq*' => '<span class="faicon an_freqx"></span> <span class="text">'.$lang['srv_frequency*'].'</span>',
+ 'desc' => '<span class="faicon an_desc"></span> <span class="text">'.$lang['srv_descriptor'].'</span>',
+ 'table' => '<span class="faicon an_sigma"></span> <span class="text">'.$lang['srv_table'].'</span>',
+ 'table*' => '<span class="faicon an_sigmax"></span> <span class="text">'.$lang['srv_table*'].'</span>',
+ 'table_ver' => '<span class="faicon an_sigma_ver"></span> <span class="text">'.$lang['srv_table_ver'].'</span>',
+ 'text' => '<span class="faicon an_text"></span> <span class="text">'.$lang['srv_text_only'].'</span>',
+ 'chart' => '<span class="faicon an_chart"></span> <span class="text">'.$lang['srv_chart'].'</span>',
+ );
- break;
- case 4: # text
- case 21: # besedilo*
- if ($spremenljivka['cnt_all'] == 1) {
- // če je enodimenzionalna prikažemo kot frekvence
- // predvsem zaradi vprašanj tipa: language, email...
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- break;
- case 26: # lokacija
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- break;
- case 27: # heatmap
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- break;
- case 22: # kalkulacija
- case 25: # kvota
- $options['sums*'] = false;
- break; # kalkulacija
+ // Parameter za odpiranje pravega popupa
+ $links = array(
+ 'freq' => M_ANALYSIS_FREQUENCY,
+ 'freq*' => M_ANALYSIS_SUMMARY,
+ 'desc' => M_ANALYSIS_DESCRIPTOR,
+ 'table' => M_ANALYSIS_SUMMARY_NEW,
+ 'table*' => M_ANALYSIS_SUMMARY_NEW,
+ 'table_ver' => M_ANALYSIS_SUMMARY_NEW,
+ 'text' => 'text',
+ 'chart' => M_ANALYSIS_CHARTS,
+ );
+
+
+ // Nastavimo katere opcije imamo glede na tip vprasanja
+ switch ($spremenljivka['tip']) {
+
+ // radio in dropdown
+ case 1:
+ case 3:
+ // ordinalna
+ if ($spremenljivka['skala'] != 1) {
+ $options['base'] = 'freq';
+ $options['additional'][0] = 'desc';
+ $options['additional'][1] = 'chart';
+ }
+ // nominalna
+ else {
+ $options['base'] = 'freq';
+ $options['additional'][1] = 'chart';
}
- $export = ($_from == 'charts') ? 'charts' : 'frequency';
break;
- case 'desc':
- switch ($spremenljivka['tip']) {
- case 1: # radio - prikjaže navpično
- if ($spremenljivka['skala'] == 1) {
- $options['sums'] = false;
- $options['sums*'] = false;
- }
- break;
- case 2: #checkbox če je dihotomna:
- break;
- case 3: # dropdown - prikjaže navpično
- break;
- case 6: # multigrid
- $options['sums*'] = false;
- if ( $spremenljivka['enota'] == 3 ) {
- $options['sums_spec'] = true;
- }
- break;
- case 7: # variabla tipa »število«
- $options['sums*'] = false;
- break;
- case 8: # datum
- $options['sums'] = false;
- $options['sums*'] = false;
- break;
- case 16: #multicheckbox če je dihotomna:
- break;
- case 17: #razvrščanje če je ordinalna
- $options['sums'] = false;
- break;
- case 18: # vsota
- $options['sums*'] = false;
- break;
- case 19: # multitext
- $options['sums*'] = false;
- break;
- case 20: # multi number
- break;
- case 4: # text
- case 21: # besedilo*
- if ($spremenljivka['cnt_all'] == 1) {
- // če je enodimenzionalna prikažemo kot frekvence
- // predvsem zaradi vprašanj tipa: language, email...
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- break;
- case 26: # Lokacija
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- break;
- case 27: # heatmap
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- break;
- case 22: # kalkulacija
- case 25: # kvota
- $options['sums*'] = false;
- break; # kalkulacija
+
+ // checkbox
+ case 2:
+ $options['base'] = 'freq*';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ $options['additional'][2] = 'table';
+ $options['additional'][3] = 'chart';
+ break;
+
+ // multigrid
+ case 6:
+ // ordinalna
+ if ($spremenljivka['skala'] != 1) {
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ $options['additional'][2] = 'chart';
+
+ // Dvojna tabela
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 3){
+ $options['additional'][2] = 'table_ver';
+ $options['additional'][3] = 'chart';
+
+ $links['table'] = M_ANALYSIS_SUMMARY;
+ }
+ }
+ // nominalna
+ else {
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'chart';
+
+ // Dvojna tabela
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 3){
+ $options['additional'][1] = 'table_ver';
+ $options['additional'][2] = 'chart';
+
+ $links['table'] = M_ANALYSIS_SUMMARY;
+ }
}
- $export = 'statistics';
break;
- case 'sums':
- switch ($spremenljivka['tip']) {
- case 1: # radio - prikjaže navpično
- if ($spremenljivka['skala'] == 1) {
- $options['sums'] = false;
- $options['sums*'] = false;
- $_from = 'freq';
- } else {
- $_from = 'sums*';
- }
- break;
- case 2: #checkbox če je dihotomna
- $_from = 'sums*';
- break;
- case 3: # dropdown - prikjaže navpično
- break;
- case 6: # multigrid
- $options['sums*'] = false;
- if ( $spremenljivka['enota'] == 3 ) {
- $options['sums_spec'] = true;
- $_from = 'sums*';
- }
- break;
- case 7: # variabla tipa »število«
- $options['sums*'] = false;
- break;
- case 8: # datum
- $options['sums'] = false;
- $options['sums*'] = false;
- $_from = 'freq';
- break;
- case 16: #multicheckbox če je dihotomna
- break;
- case 17: #razvrščanje če je ordinalna
- $options['sums'] = false;
- $_from = 'sums*';
- break;
- case 18: # vsota
- $options['sums*'] = false;
- break;
- case 19: # multitext
- $options['sums*'] = false;
- break;
- case 20: # multi number
- break;
- case 21: # besedilo*
- $_from = 'sums';
- if ($spremenljivka['cnt_all'] == 1) {
- // če je enodimenzionalna prikažemo kot frekvence
- // predvsem zaradi vprašanj tipa: language, email...
- $options['sums'] = false;
- $_from = 'freq';
- }
+ // number
+ case 7:
+ $options['base'] = 'desc';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'chart';
+ break;
- $options['sums*'] = false;
- break;
- case 26: # lokacija
- $_from = 'sums';
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- $_from = 'freq';
- }
+ // datum
+ case 8:
+ $options['base'] = 'freq';
+ $options['additional'][0] = 'desc';
+ break;
- $options['sums*'] = false;
- break;
- case 27: # heatmap
- $_from = 'sums';
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- $_from = 'freq';
- }
+ // multicheckbox
+ case 16:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ $options['additional'][2] = 'freq*';
+ $options['additional'][3] = 'chart';
+
+ $links['table'] = M_ANALYSIS_SUMMARY;
+ $links['freq*'] = M_ANALYSIS_SUMMARY_NEW;
- $options['sums*'] = false;
- break;
- case 4: # text
- $options['sums'] = false;
- $options['sums*'] = false;
- $_from = 'freq';
- break;
- case 22: # kalkulacija
- case 25: # kvota
- $options['sums*'] = false;
- break; # kalkulacija
- }
- $export = 'sums';
break;
- case 'sums*':
- switch ($spremenljivka['tip']) {
- case 1: # radio - prikjaže navpično
- if ($spremenljivka['skala'] == 1) {
- $options['sums'] = false;
- $options['sums*'] = false;
- $_from = 'freq';
- } else {
- $_from = 'sums';
- }
- break;
- case 2: #checkbox če je dihotomna:
- $_from = 'sums';
- break;
- case 3: # dropdown - prikjaže navpično
- break;
- case 6: # multigrid
- $options['sums*'] = false;
- if ( $spremenljivka['enota'] == 3 ) {
- $options['sums_spec'] = true;
- $_from = 'sums';
- }
- break;
- case 7: # variabla tipa »število«
- $options['sums*'] = false;
- $_from = 'sums';
- break;
- case 8: # datum
- $options['sums'] = false;
- $options['sums*'] = false;
- break;
-
- case 16: #multicheckbox če je dihotomna:
- break;
- case 17: #razvrščanje če je ordinalna
- $options['sums'] = false;
- break;
- case 18: # vsota
- $options['sums*'] = false;
- $_from = 'sums';
- break;
- case 19: # multitext
- $options['sums*'] = false;
- break;
- case 20: # multi number
- break;
- case 4: # text
- $options['sums'] = false;
- $options['sums*'] = false;
- $_from = 'freq';
- break;
- case 21: # besedilo*
- if ($spremenljivka['cnt_all'] == 1) {
- // če je enodimenzionalna prikažemo kot frekvence
- // predvsem zaradi vprašanj tipa: language, email...
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- $_from = 'freq';
- break;
- case 26: # lokacija
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- $_from = 'freq';
- break;
- case 27: # heatmap
- if ($spremenljivka['cnt_all'] == 1) {
- $options['sums'] = false;
- }
- $options['sums*'] = false;
- $_from = 'freq';
- break;
- case 22: # kalkulacija
- case 25: # kvota
- $options['sums*'] = false;
- $_from = 'sums';
- break; # kalkulacija
- }
- $export = 'sums';
+
+ // ranking
+ case 17:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ break;
+
+ // vsota
+ case 18:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ break;
+
+ // multitext
+ case 19:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+
+ $links['table'] = M_ANALYSIS_SUMMARY;
+
+ break;
+
+ // multinumber
+ case 20:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ $options['additional'][2] = 'chart';
+
+ $links['table'] = M_ANALYSIS_SUMMARY;
+
+ break;
+
+ // text
+ case 4:
+ case 21:
+ $options['base'] = 'freq';
+ $options['additional'][0] = 'text';
+ break;
+
+ // lokacija
+ case 26:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ break;
+
+ // heatmap
+ case 27:
+ $options['base'] = 'table';
+ $options['additional'][0] = 'freq';
+ $options['additional'][1] = 'desc';
+ break;
+
+ // kalkulacija
+ case 22:
+ $options['base'] = 'desc';
+ $options['additional'][0] = 'freq';
+
+ $links['desc'] = M_ANALYSIS_SUMMARY;
+ break;
+
+ // kvota
+ case 25:
+ $options['base'] = 'desc';
+ $options['additional'][0] = 'freq';
break;
- case 'none':
+
+ default:
break;
}
-
- // Javna povezava nima teh ikon
- if ($printIcon == false && self::$printPreview == false) {
+
+
+ if(!$onlyicons){
+ // Izrisemo vse ikone za vprasanje
+ echo '<div class="analysis_icons_holder">';
+
+ // Prva vrstica z linkom na osnovni prikaz
+ echo '<div class="icon_line icon_top_line">';
+ echo $lang['srv_analysis_icon_show'].': ';
+ echo ' <a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\', \''.$links[$options['base']].'\', \''.$from_navedbe.'\', \''.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : null).'\', this); return false;">';
+ echo $texts[$options['base']];
+ echo ' </a>';
+ echo '</div>';
- echo '<span class="'.$sccFloat.'printHide iconHide">';
+ echo '<div class="icon_line icon_other_line">';
+ echo $lang['srv_analysis_icon_show_other'];
+ echo '</div>';
- if ($options['sums'] == true) {
- if ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 2 || $spremenljivka['tip'] == 3 ) {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_SUMMARY_NEW.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- } else {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_SUMMARY.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- }
+ // Ostale vrstice - loop
+ foreach($options['additional'] as $line){
+
+ // Text ima drugo js funkcijo
+ if($links[$line] == 'text')
+ echo ' <div class="icon_line icon_line_standard" onclick="showSpremenljivkaTextAnswersPopup(\''.$spid.'\'); return false;">';
+ else
+ echo ' <div class="icon_line icon_line_standard" onclick="showAnalizaSingleVarPopup(\''.$spid.'\', \''.$links[$line].'\', \''.$from_navedbe.'\', \''.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : null).'\', this); return false;">';
+
+ echo '<div class="icon_line_left">'.$texts[$line].'</div>';
- echo '<span class="faicon an_sigma large '.($_from == 'sums' ? '' : 'icon-blue_soft_link').'" title="' . $lang['srv_analysis_icon_sumary'] . '"></span> ';
- echo '</a>';
- }
+ echo '<div class="icon_line_right"><span class="faicon open_icon"></span></div>';
- if ($options['sums_spec'] == true) {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_SUMMARY_NEW.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- echo '<span class="faicon an_sigmax large '.($_from == 'sums*' ? '' : 'icon-blue_soft_link').'" title="' . $lang['srv_analysis_icon_frequency*'] . '"></span> ';
- echo '</a>';
+ echo '</div>';
}
- if ($options['sums*'] == true) {
- if ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 2 || $spremenljivka['tip'] == 3) {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_SUMMARY.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- }else {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_SUMMARY_NEW.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- }
- echo '<span class="faicon an_freqx large '.($_from == 'sums*' ? '' : 'icon-blue_soft_link').'" title="' . $lang['srv_analysis_icon_frequency*'] . '"></span> ';
- echo '</a>';
- }
- if ($options['desc'] == true) {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_DESCRIPTOR.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- echo '<span class="faicon an_stat large '.($_from == 'desc' ? '' : 'icon-blue_soft_link').'" title="' . $lang['srv_analysis_icon_descriptor'] . '"></span> ';
- echo '</a>';
- }
- if ($options['freq'] == true) {
- echo '<a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\',\''.M_ANALYSIS_FREQUENCY.'\',\''.$from_navedbe.'\',\''.self::$_CURRENT_LOOP['cnt'].'\'); return false;">';
- echo '<span class="faicon an_freq large '.($_from == 'freq' ? '' : 'icon-blue_soft_link').'" title="' . $lang['srv_analysis_icon_frequency'] . '"></span> ';
- echo '</a>';
- }
+ echo '</div>';
+ }
+ else{
+ // Izrisemo vse ikone za vprasanje
+ echo '<div class="analysis_icons_holder">';
+
+ // Prva vrstica z linkom na osnovni prikaz
+ echo ' <a href="#" onclick="showAnalizaSingleVarPopup(\''.$spid.'\', \''.$links[$options['base']].'\', \''.$from_navedbe.'\', \''.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : null).'\', this); return false;">';
+ echo $texts[$options['base']];
+ echo ' </a>';
+
+ // Ostale vrstice - loop
+ foreach($options['additional'] as $line){
+
+ // Text ima drugo js funkcijo
+ if($links[$line] == 'text')
+ echo ' <a class="icon_line icon_line_standard" onclick="showSpremenljivkaTextAnswersPopup(\''.$spid.'\'); return false;">';
+ else
+ echo ' <a class="icon_line icon_line_standard" onclick="showAnalizaSingleVarPopup(\''.$spid.'\', \''.$links[$line].'\', \''.$from_navedbe.'\', \''.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : null).'\', this); return false;">';
+
+ echo $texts[$line];
- // Ikona za prikaz grafa
- if($showChart == true && in_array($spremenljivka['tip'],array(1,2,3,6,7,8,16,17,18,20,22)) && $_from != 'charts'){
- echo '<a href="#" onclick="showAnalizaSingleChartPopup(\''.$spid.'\',\''.M_ANALYSIS_CHARTS.'\'); return false;">';
- echo '<span class="faicon an_chart_bar icon-blue_soft_link" title="' . $lang['6'] . '"></span> ';
echo '</a>';
}
- // Ikona za vkljucitev v porocilo
- switch ($_from) {
- case 'sums':
- case 'sums*':
- $type=1;
- break;
- case 'freq':
- $type=2;
- break;
- case 'desc':
- $type=3;
- break;
- case 'charts':
- $type=4;
- break;
- }
- if ($showReport == true) {
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type, $sub_type=0, $spid);
- }
-
-
- echo '</span>';
- } else {
-
+ echo '</div>';
}
+
+ return;
}
+ // Preklop enote navedbe
+ static private function showEnoteNavedbe($spid, $status){
+ global $lang;
+
+ echo '<div class="enote-navedbe_holder">';
+
+ echo '<button class="small '.($status=='1' ? 'active' : '').'" title="'.$lang['srv_enote_navedbe_1'].'" onClick="show_navedbe(\''.$spid.'\',\'1\');">'.$lang['srv_analiza_opisne_units'].'</button>';
+ echo '<button class="small '.($status=='2' ? 'active' : '').'" title="'.$lang['srv_enote_navedbe_2'].'" onClick="show_navedbe(\''.$spid.'\',\'2\');">'.$lang['srv_analiza_opisne_arguments'].'</button>';
+
+ echo'</div>';
+ }
+
+ // Preklop frekvence odstotki
+ static private function showFreqPercent($spid){
+ global $lang;
+
+ echo '<div class="freq-p_holder">';
+
+ echo '<button id="freq-p_button_1_'.$spid.'" class="small left active" title="'.$lang['srv_frequency'].'" onClick="show_single_percent(\''.$spid.'\', \'1\');">'.$lang['srv_frequency'].'</button>';
+ echo '<button id="freq-p_button_2_'.$spid.'" class="small right active" title="'.$lang['srv_chart_percent'].'" onClick="show_single_percent(\''.$spid.'\', \'2\');">'.$lang['srv_chart_percent'].'</button>';
+
+ echo'</div>';
+ }
+
/** polovi opisne za vse spremenljivke
*
@@ -5571,7 +5930,7 @@ class SurveyAnalysis {
unlink($tmp_files['frequency']);
}
- if ($_GET['debug'] == 1) {
+ if (isset($_GET['debug']) && $_GET['debug'] == 1) {
print_r("<pre>");
print_r("cl:".$command);
print_r("<br>Out".$out);
@@ -5591,7 +5950,7 @@ class SurveyAnalysis {
# preverjamo da ni meta variabla
$vars_count = count(self::$_FILTRED_VARIABLES);
# frekvence delamo samo za izbrane variable
- if ($spremenljivka['tip'] != 'm'
+ if (isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
# filter po id spremenljivki
&& ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) )
# filter po tipu (kategorije, besedila, number, drugo)
@@ -5613,8 +5972,10 @@ class SurveyAnalysis {
#najprej odstranimo neveljavne, vse kaj ostane je veljavno
foreach ($_invalidAnswers AS $ikey =>$iAnswer) {
if (isset($_freq[$ikey])) {
- self::$_DESCRIPTIVES[$_sequence]['invalidCnt'] += $_freq[$ikey];
- self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $_freq[$ikey];
+ self::$_DESCRIPTIVES[$_sequence]['invalidCnt'] = (isset(self::$_DESCRIPTIVES[$_sequence]['invalidCnt']) ?
+ self::$_DESCRIPTIVES[$_sequence]['invalidCnt']+= $_freq[$ikey] : $_freq[$ikey]);
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] = (isset(self::$_DESCRIPTIVES[$_sequence]['allCnt']) ?
+ self::$_DESCRIPTIVES[$_sequence]['allCnt']+= $_freq[$ikey] : $_freq[$ikey]);
unset($_freq[$ikey]);
@@ -5624,34 +5985,55 @@ class SurveyAnalysis {
# opcijske odgovore dodamo samo vprašanjem ki niso tipa other in text
# zloopamo skozi vse opcije in jih dodamo k veljavnim
- if ($variable['text'] != true && $variable['other'] != true && count($spremenljivka['options']) > 0) {
+ if ($variable['text'] != true && $variable['other'] != true && isset($spremenljivka['options']) && count($spremenljivka['options']) > 0) {
if (count($_freq) > 0) {
foreach($_freq AS $fKey => $fCnt) {
$flKey = (float)$fKey;
- if (is_numeric($flKey) && trim($flkey) != '' ) {
+ if (is_numeric($flKey) && trim($flKey) != '' ) {
+
+ if(isset(self::$_DESCRIPTIVES[$_sequence]['validCnt']))
+ self::$_DESCRIPTIVES[$_sequence]['validCnt'] += $fCnt;
+ else
+ self::$_DESCRIPTIVES[$_sequence]['validCnt'] = $fCnt;
- self::$_DESCRIPTIVES[$_sequence]['validCnt'] += $fCnt;
- self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $fCnt;
+ if(isset(self::$_DESCRIPTIVES[$_sequence]['allCnt']))
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $fCnt;
+ else
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] = $fCnt;
$min = $min === null ? $flKey : min($min,$flKey) ;
$max = $max === null ? $flKey : max($max,$flKey) ;
+
self::$_DESCRIPTIVES[$_sequence]['sum_xi_fi'] += $flKey * $fCnt;
+
#vrednosti si shranimo za računanje divergence
$_tmp_div[$flKey] = $fCnt;
+
unset($_freq[$fKey]);
- } else if (is_numeric($fKey) ) {
- self::$_DESCRIPTIVES[$_sequence]['validCnt'] += $fCnt;
- self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $fCnt;
+ }
+ else if (is_numeric($fKey) ) {
+
+ if(isset(self::$_DESCRIPTIVES[$_sequence]['validCnt']))
+ self::$_DESCRIPTIVES[$_sequence]['validCnt'] += $fCnt;
+ else
+ self::$_DESCRIPTIVES[$_sequence]['validCnt'] = $fCnt;
+
+ if(isset(self::$_DESCRIPTIVES[$_sequence]['allCnt']))
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $fCnt;
+ else
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] = $fCnt;
$min = $min === null ? $fKey : min($min,$fKey) ;
$max = $max === null ? $fKey : max($max,$fKey) ;
+
self::$_DESCRIPTIVES[$_sequence]['sum_xi_fi'] += $fKey * $fCnt;
+
#vrednosti si shranimo za računanje divergence
$_tmp_div[$fKey] = $fCnt;
+
unset($_freq[$fKey]);
-
}
}
}
@@ -5663,10 +6045,13 @@ class SurveyAnalysis {
if (count($_freq) > 0) {
foreach ($_freq AS $nkey => $nCnt) {
$fnkey = (float)$nkey; # popravimo morebitne .
-
+
if (is_numeric($nkey) && is_numeric($fnkey) && trim($fnkey) != '') {
- self::$_DESCRIPTIVES[$_sequence]['validCnt'] += $nCnt;
- self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $nCnt;
+ self::$_DESCRIPTIVES[$_sequence]['validCnt'] = (isset(self::$_DESCRIPTIVES[$_sequence]['validCnt']) ?
+ self::$_DESCRIPTIVES[$_sequence]['validCnt']+= $nCnt : $nCnt);
+
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] = (isset(self::$_DESCRIPTIVES[$_sequence]['allCnt']) ?
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $nCnt : $nCnt);
$min = $min != null ? min($min,$fnkey) : $fnkey;
$max = $max != null ? max($max,$fnkey) : $fnkey;
@@ -5692,8 +6077,13 @@ class SurveyAnalysis {
self::$_DESCRIPTIVES[$_sequence]['valid'][$tkey] = array('text'=>$text,'cnt'=>$tCnt);
# samo prištejemo veljavne
- self::$_DESCRIPTIVES[$_sequence]['validCnt'] += $tCnt;
- self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $tCnt;
+ self::$_DESCRIPTIVES[$_sequence]['validCnt'] = (isset(self::$_DESCRIPTIVES[$_sequence]['validCnt']) ?
+ self::$_DESCRIPTIVES[$_sequence]['validCnt']+= $tCnt : $tCnt);
+
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] = (isset(self::$_DESCRIPTIVES[$_sequence]['allCnt']) ?
+ self::$_DESCRIPTIVES[$_sequence]['allCnt'] += $tCnt : $tCnt);
+
+
unset($_freq[$tkey]);
}
}
@@ -5762,15 +6152,14 @@ class SurveyAnalysis {
{
foreach (self::$_HEADERS AS $skey => $spremenljivka)
{
- $tip = $spremenljivka['tip'];
- if (is_numeric($tip)) {
+ if (isset($spremenljivka['tip']) && is_numeric($spremenljivka['tip'])) {
if (count($spremenljivka['grids'] ) > 0) {
foreach ($spremenljivka['grids'] as $gid => $grid ){
- if (is_countable($grid['variables']) && count($grid['variables']) > 0) {
+ if (isset($grid['variables']) && count($grid['variables']) > 0) {
foreach ($grid['variables'] as $vid => $variable ){
$end_sequence = max($end_sequence, (int)$variable['sequence']);
@@ -5836,7 +6225,7 @@ class SurveyAnalysis {
# preverjamo da ni meta variabla
$vars_count = count(self::$_FILTRED_VARIABLES);
# frekvence delamo samo za izbrane variable
- if ($spremenljivka['tip'] != 'm'
+ if (isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
# filter po id spremenljivki
&& ($vars_count == 0 || ($vars_count > 0 && isset(self::$_FILTRED_VARIABLES[$spid]) ) )
# filter po tipu (kategorije, besedila, number, drugo)
@@ -5846,6 +6235,7 @@ class SurveyAnalysis {
if ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3) {
self::$_HEADERS[$spid]['show_valid_percent'] = true;
}
+
if (count ($spremenljivka['grids']) > 0)
foreach ($spremenljivka['grids'] AS $gid => $grid) {
if (count ($grid['variables']) > 0)
@@ -5861,8 +6251,16 @@ class SurveyAnalysis {
if (isset($_freq[$ikey])) {
if (self::$frequencyAddInvalid) {
self::$_FREQUENCYS[$_sequence]['invalid'][$ikey]['cnt'] = $_freq[$ikey];
- self::$_FREQUENCYS[$_sequence]['invalidCnt'] += $_freq[$ikey];
- self::$_FREQUENCYS[$_sequence]['allCnt'] += $_freq[$ikey];
+
+ if (isset(self::$_FREQUENCYS[$_sequence]['invalidCnt']))
+ self::$_FREQUENCYS[$_sequence]['invalidCnt'] += $_freq[$ikey];
+ else
+ self::$_FREQUENCYS[$_sequence]['invalidCnt'] = $_freq[$ikey];
+
+ if (isset(self::$_FREQUENCYS[$_sequence]['allCnt']))
+ self::$_FREQUENCYS[$_sequence]['allCnt'] += $_freq[$ikey];
+ else
+ self::$_FREQUENCYS[$_sequence]['allCnt'] = $_freq[$ikey];
}
unset($_freq[$ikey]);
@@ -5872,17 +6270,25 @@ class SurveyAnalysis {
}
# opcijske odgovore dodamo samo vprašanjem ki niso tipa other in text
# zloopamo skozi vse opcije in jih dodamo k veljavnim
- if ($variable['text'] != true && $variable['other'] != true && is_countable($spremenljivka['options']) && count($spremenljivka['options']) > 0) {
+ if ($variable['text'] != true && $variable['other'] != true && isset($spremenljivka['options']) && is_countable($spremenljivka['options']) && count($spremenljivka['options']) > 0) {
foreach ($spremenljivka['options'] AS $okey => $oAnswer) {
self::$_FREQUENCYS[$_sequence]['valid'][$okey]['text'] = $oAnswer;
- self::$_FREQUENCYS[$_sequence]['valid'][$okey]['text_graf'] = $spremenljivka['options_graf'][$okey];
+ self::$_FREQUENCYS[$_sequence]['valid'][$okey]['text_graf'] = isset($spremenljivka['options_graf'][$okey]) ? isset($spremenljivka['options_graf'][$okey]) : '';
self::$_FREQUENCYS[$_sequence]['valid'][$okey]['cnt'] = 0;
if (isset($_freq[$okey])) {
self::$_FREQUENCYS[$_sequence]['valid'][$okey]['cnt'] = $_freq[$okey];
- self::$_FREQUENCYS[$_sequence]['validCnt'] += $_freq[$okey];
- self::$_FREQUENCYS[$_sequence]['allCnt'] += $_freq[$okey];
+
+ if (isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ self::$_FREQUENCYS[$_sequence]['validCnt'] += $_freq[$okey];
+ else
+ self::$_FREQUENCYS[$_sequence]['validCnt'] = $_freq[$okey];
+
+ if (isset(self::$_FREQUENCYS[$_sequence]['allCnt']))
+ self::$_FREQUENCYS[$_sequence]['allCnt'] += $_freq[$okey];
+ else
+ self::$_FREQUENCYS[$_sequence]['allCnt'] = $_freq[$okey];
unset($_freq[$okey]);
}
@@ -5893,17 +6299,26 @@ class SurveyAnalysis {
# vse kaj ostane so textovni ali numerični odgovori
if (is_countable($_freq) && count($_freq) > 0) {
$_ifreq = array();
+
# nardimo case-insensitive
foreach ($_freq AS $tkey => $tCnt) {
- //if($spremenljivka['tip'] != 26)
- if($spremenljivka['tip'] != 26 && $spremenljivka['tip'] != 27)
- $tkey = mb_strtolower($tkey,'UTF-8');
- $_ifreq[$tkey] += $tCnt;
+
+ //if($spremenljivka['tip'] != 26)
+ if($spremenljivka['tip'] != 26 && $spremenljivka['tip'] != 27)
+ $tkey = mb_strtolower($tkey,'UTF-8');
+
+ if(isset($_ifreq[$tkey]))
+ $_ifreq[$tkey] += $tCnt;
+ else
+ $_ifreq[$tkey] = $tCnt;
}
- $_average = array();
+ $_average = array(
+ 'cnt' => 0,
+ 'product' => 0
+ );
- if(is_countable($spremenljivka['options']))
+ if(isset($spremenljivka['options']) && is_countable($spremenljivka['options']))
$i = count($spremenljivka['options']) + 1;
else
$i = 0;
@@ -5918,12 +6333,24 @@ class SurveyAnalysis {
$text = $tkey;
}
- self::$_FREQUENCYS[$_sequence]['valid'][$tkey] = array('text'=>$text,'cnt'=>$tCnt,'text_graf'=>$spremenljivka['options_graf'][$i]);
- self::$_FREQUENCYS[$_sequence]['validCnt'] += $tCnt;
- self::$_FREQUENCYS[$_sequence]['allCnt'] += $tCnt;
- //Uros dodal, ker se drugace pri radio ne ve, kaksen je text opcije drugo
- if($variable['other'])
- self::$_FREQUENCYS[$_sequence]['valid'][$tkey]['other'] = $variable['naslov'];
+ self::$_FREQUENCYS[$_sequence]['valid'][$tkey] = array('text'=>$text,'cnt'=>$tCnt);
+
+ if(isset($spremenljivka['options_graf'][$i]))
+ self::$_FREQUENCYS[$_sequence]['valid'][$tkey]['text_graf'] = $spremenljivka['options_graf'][$i];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ self::$_FREQUENCYS[$_sequence]['validCnt'] += $tCnt;
+ else
+ self::$_FREQUENCYS[$_sequence]['validCnt'] = $tCnt;
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['allCnt']))
+ self::$_FREQUENCYS[$_sequence]['allCnt'] += $tCnt;
+ else
+ self::$_FREQUENCYS[$_sequence]['allCnt'] = $tCnt;
+
+ //Uros dodal, ker se drugace pri radio ne ve, kaksen je text opcije drugo
+ if($variable['other'])
+ self::$_FREQUENCYS[$_sequence]['valid'][$tkey]['other'] = $variable['naslov'];
# povprečje
if (is_numeric($tkey)) {
@@ -5942,7 +6369,6 @@ class SurveyAnalysis {
} // end if tip != m
}
unset($frequency);
-
return self::$_FREQUENCYS;
}
@@ -6044,10 +6470,11 @@ class SurveyAnalysis {
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
$_result_answers = array();
$_result_answers['validCnt'] = 0;
+ $_result_answers['allCnt'] = 0;
+ $_result_answers['invalidCnt'] = 0;
if (count($answers) > 0) {
foreach ($answers AS $akey => $answer) {
- $cnt++;
$all_invalid = true; # ali je vse neveljavno
foreach ($answer AS $seq => $value) {
# preverimo ali je kateri odgovor od userja vlejaven
@@ -6081,6 +6508,7 @@ class SurveyAnalysis {
public static function showspremenljivkaSingleVarPopup($id) {
global $lang;
+ global $site_url;
self::$_forceShowEmpty = true;
header('Cache-Control: no-cache');
@@ -6098,20 +6526,23 @@ class SurveyAnalysis {
$lang_admin = $row['value'];
}
+ $zaPodstran = $_POST['zaPodstran'];
+ $id = $_POST['id'];
+ $spremenljivka = self::$_HEADERS[$id];
+ $_tip = self::getSpremenljivkaLegenda($spremenljivka,'tip');
+
#izpišemo HTML
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />';
- echo '<script type="text/javascript" src="script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
- echo '<script type="text/javascript" src="minify/g=jsnew"></script>';
- echo '<link type="text/css" href="minify/g=css" media="screen" rel="stylesheet" />';
- echo '<link type="text/css" href="minify/g=cssPrint" media="print" rel="stylesheet" />';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<!--[if lt IE 7]>';
+ echo '<script type="text/javascript" src="'.$site_url.'admin/survey/script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
+ echo '<script type="text/javascript" src="'.$site_url.'admin/survey/minify/g=jsnew"></script>';
+ echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=css" media="screen" rel="stylesheet" />';
+ echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=cssPrint" media="print" rel="stylesheet" />';
+
+ echo '<!--[if lt IE 7]>';
echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie6hacks.css" type="text/css" />';
echo '<![endif]-->';
echo '<!--[if IE 7]>';
@@ -6120,10 +6551,8 @@ class SurveyAnalysis {
echo '<!--[if IE 8]>';
echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie8hacks.css" type="text/css" />';
echo '<![endif]-->';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<script>';
+
+ echo '<script>';
echo 'function chkstate(){';
echo ' if(document.readyState=="complete"){';
echo ' window.close()';
@@ -6146,13 +6575,10 @@ class SurveyAnalysis {
echo "</script>";
echo '</head>';
- echo '<body onBlur="window.close()" style="margin:5px; padding:5px;">';
+ echo '<body onBlur="window.close()" class="analysis_popup single_var">';
+
echo '<input type="hidden" name="podstran" id="srv_meta_podstran" value="' . $zaPodstran . '" />';
echo '<input type="hidden" name="anketa_id" id="srv_meta_anketa_id" value="' . $_REQUEST['anketa'] . '" />';
- $id = $_POST['id'];
- $spremenljivka = self::$_HEADERS[$id];
- $_tip = self::getSpremenljivkaLegenda($spremenljivka,'tip');
- $zaPodstran = $_POST['zaPodstran'];
$legend = Cache::spremenljivkaLegenda($id);
@@ -6168,281 +6594,213 @@ class SurveyAnalysis {
echo '<div id="div_analiza_single_var" class="container"> ';
self:: showPreviewSpremenljivka($id);
echo '</div>';
+
echo '<div id="navigationBottom" class="printHide">';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="close_win(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="window.print();return false;"><span><img src="icons/icons/printer.png" alt="'.$lang['hour_print2'].'" vartical-align="middle" /> '.$lang['hour_print2'].'</span></a></div></span>';
- echo '<div class="clr"></div>';
+ echo ' <button class="medium blue" onclick="close_win(); return false;">'.$lang['srv_zapri'].'</button>';
echo '</div>';
+
echo '</body>';
echo '</html>';
}
- public static function showSpremenljivkaTextAnswersPopup($id,$seq) {
+ public static function showSpremenljivkaTextAnswersPopup($id) {
global $lang;
+ global $site_url;
+
self::$_forceShowEmpty = true;
- header('Cache-Control: no-cache');
- header('Pragma: no-cache');
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
$anketa = $_REQUEST['anketa'];
- #izpišemo HTML
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
- echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
- echo '<head>';
- echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
- echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />';
- echo '<script type="text/javascript" src="script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
- echo '<script type="text/javascript" src="minify/g=jsnew"></script>';
- echo '<link type="text/css" href="minify/g=css" media="screen" rel="stylesheet" />';
- echo '<link type="text/css" href="minify/g=cssPrint" media="print" rel="stylesheet" />';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<!--[if lt IE 7]>';
- echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie6hacks.css" type="text/css" />';
- echo '<![endif]-->';
- echo '<!--[if IE 7]>';
- echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie7hacks.css" type="text/css" />';
- echo '<![endif]-->';
- echo '<!--[if IE 8]>';
- echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie8hacks.css" type="text/css" />';
- echo '<![endif]-->';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<script>';
- echo 'function chkstate(){';
- echo ' if(document.readyState=="complete"){';
- echo ' window.close()';
- echo ' }';
- echo ' else{';
- echo ' setTimeout("chkstate()",2000)';
- echo ' }';
- echo '}';
- echo 'function print_win(){';
- echo ' window.print();';
- echo ' chkstate();';
- echo '}';
- echo 'function close_win(){';
- echo ' window.close();';
- echo '}';
- echo '</script>';
- echo '</head>';
-
- echo '<body onBlur="window.close()" style="margin:5px; padding:5px;">';
-
- echo '<input type="hidden" name="podstran" id="srv_meta_podstran" value="' . $zaPodstran . '" />';
- echo '<input type="hidden" name="anketa_id" id="srv_meta_anketa_id" value="' . $_REQUEST['anketa'] . '" />';
- echo '<div id="div_analiza_single_var" class="container">';
$id = $_POST['id'];
- $seq = $_POST['seq'];
$zaPodstran = $_POST['zaPodstran'];
$spremenljivka = self::$_HEADERS[$id];
+
# koliko zapisov prikažemo naenkrat
- $num_show_records = self::getNumRecords();
-
+ //$num_show_records = self::getNumRecords();
$num_show_records = 9999999;
+
# poiščemo navedbe textovne spremenljivke tako kot v grafih
- $_answers = self::getAnswers($spremenljivka,$num_show_records);
- if (count($_answers['valid']) > 0) {
- echo '<table class="anl_tbl anl_bl anl_bt tbl_clps">';
- foreach ($_answers['valid'] AS $vkey => $valid) {
- $_valid = $valid[$seq];
+ $_answers = self::getAnswers($spremenljivka, $num_show_records);
+
+
+ // Naslovna vrstica
+ echo '<div class="popup_close"><a href="#" onclick="closeAnalizaPopup(); return false;">✕</a></div>';
+ echo '<h2>'.$spremenljivka['variable'].' - '.$lang['srv_text_only'].'</h2>';
+
+
+ echo '<div id="div_analiza_single_var" class="container">';
+
+ echo '<table>';
+
+ $_answersOther = array();
+
+ # dodamo opcijo kje izrisujemo legendo
+ $options=array('inline_legenda' => isset($inline_legenda)?$inline_legenda:null, 'isTextAnswer' => false, 'isOtherAnswer' => false, 'num_show_records' => $num_show_records);
+
+ # izpišemo vlejavne odgovore
+ $_current_grid = null;
+ if (count($spremenljivka['grids']) > 0)
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+ $_variables_count = count($grid['variables']);
+
+ # dodamo dodatne vrstice z albelami grida
+ if ($_variables_count > 0 )
+ foreach ($grid['variables'] AS $vid => $variable){
+
+ $_sequence = $variable['sequence']; # id kolone z podatki
+
+ // Naslovna vrstica - lahko jih je vec, ce je text z vec polji
+ echo '<tr class="row_question">';
+
+ echo '<td class="cell_var">';
+ echo $variable['variable'];
+ echo '</td>';
+ echo '<td class="cell_question">';
+ echo $variable['naslov'];
+ echo '</td>';
+
+ echo '</tr>';
+
- echo '<tr><td class="anl_bck_0_1 anl_br anl_bb anl_user_text">';
- echo $_valid;
- echo '</td></tr>';
+ // Vrstice z responsi
+ foreach ($_answers['valid'] AS $vkey => $valid) {
+ $_valid = $valid[$_sequence];
+
+ echo '<tr>';
+ echo ' <td></td>';
+ echo ' <td colspan="2" class="anl_user_text">'.$_valid.'</td>';
+ echo '</tr>';
+ }
}
- echo '</table>';
- echo '<br />';
}
+
+ echo '</table>';
+
echo '</div>';
- echo '<div id="navigationBottom" class="printHide">';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="close_win(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="window.print();return false;"><span><img src="icons/icons/printer.png" alt="'.$lang['hour_print2'].'" vartical-align="middle" /> '.$lang['hour_print2'].'</span></a></div></span>';
- echo '<div class="clr"></div>';
+
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium blue" onclick="closeAnalizaPopup(); return false;">'.$lang['srv_zapri'].'</button>';
echo '</div>';
- echo '</body>';
- echo '</html>';
}
/** Prikaže opsine, frekvence, sumarnik, za samo eno variablo
*
* @param unknown_type $id
*/
- public static function DisplaySingleVarPopup ($id,$zaPodstran)
- {
+ public static function DisplaySingleVarPopup ($id, $zaPodstran){
global $site_url, $lang;
+
self::$_forceShowEmpty = true;
- header('Cache-Control: no-cache');
- header('Pragma: no-cache');
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
$anketa = $_REQUEST['anketa'];
- if ($anketa > 0) {
- $sql = sisplet_query("SELECT lang_admin FROM srv_anketa WHERE id = '$anketa'");
- $row = mysqli_fetch_assoc($sql);
- $lang_admin = $row['lang_admin'];
- } else {
- $sql = sisplet_query("SELECT value FROM misc WHERE what = 'SurveyLang_admin'");
- $row = mysqli_fetch_assoc($sql);
- $lang_admin = $row['value'];
- }
-
- #izpišemo HTML
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
- echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
- echo '<head>';
- echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
- echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />';
- echo '<script type="text/javascript" src="script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
- echo '<script type="text/javascript" src="minify/g=jsnew"></script>';
- echo '<link type="text/css" href="minify/g=css" media="screen" rel="stylesheet" />';
- echo '<link type="text/css" href="minify/g=cssPrint" media="print" rel="stylesheet" />';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;} .chart_settings {display: none;} .chart_holder{width: 800px;}';
- echo '</style>';
- echo '<!--[if lt IE 7]>';
- echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie6hacks.css" type="text/css" />';
- echo '<![endif]-->';
- echo '<!--[if IE 7]>';
- echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie7hacks.css" type="text/css" />';
- echo '<![endif]-->';
- echo '<!--[if IE 8]>';
- echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie8hacks.css" type="text/css" />';
- echo '<![endif]-->';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<script>';
- echo 'function chkstate(){';
- echo ' if(document.readyState=="complete"){';
- echo ' window.close()';
- echo ' }';
- echo ' else{';
- echo ' setTimeout("chkstate()",2000)';
- echo ' }';
- echo '}';
- echo 'function print_win(){';
- echo ' window.print();';
- echo ' chkstate();';
- echo '}';
- echo 'function close_win(){';
- echo ' window.close();';
- echo '}';
- echo '</script>';
- echo '</head>';
-
- #echo '<body onBlur="window.close()" style="margin:5px; padding:5px;">';
- echo '<body style="margin:5px; padding:5px;">';
- echo '<input type="hidden" name="podstran" id="srv_meta_podstran" value="' . $zaPodstran . '" />';
- echo '<input type="hidden" name="anketa_id" id="srv_meta_anketa_id" value="' . $_REQUEST['anketa'] . '" />';
-
- echo '<div id="div_analiza_single_var" class="container">';
$id = $_POST['id'];
$zaPodstran = $_POST['zaPodstran'];
+ $title = urldecode($_POST['title']);
+
+ $spremenljivka = self::$_HEADERS[$id];
# polovimo nastavtve missing profila
self::$missingProfileData = SurveyMissingProfiles::getProfile(self::$currentMissingProfile);
- if (self::$podstran != M_ANALYSIS_ARCHIVE)
- {
+ if (self::$podstran != M_ANALYSIS_ARCHIVE){
self::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
}
- if (!is_array(self::$_LOOPS))
- {
+
+ if (!is_array(self::$_LOOPS)){
self::$_LOOPS[] = array('filter'=>null,'text'=>null);
}
$loop_cnt = 0;
- # ce mamo zanke
- foreach ( self::$_LOOPS AS $loop)
- {
- if ($loop['filter'] != null)
- {
- $loop_cnt++;
- $loop['cnt'] = $loop_cnt;
- self::$_CURRENT_LOOP = $loop;
- if ((int)$loop_cnt == (int)$_POST['loop'])
- {
- echo '<h2 data-loopId="'.self::$_CURRENT_LOOP['cnt'].'">'.$lang['srv_zanka_note'].$loop['text'].'</h2>';
+
+ // Naslovna vrstica
+ echo '<div class="popup_close"><a href="#" onclick="closeAnalizaPopup(); return false;">✕</a></div>';
+ echo '<h2>';
+ echo '<div class="var">'.$spremenljivka['variable'].'</div>';
+ echo '<div class="prikaz">'.$lang['srv_analysis_icon_show'].': '.$title.'</div>';
+ echo '</h2>';
+
+ echo '<div id="div_analiza_single_var" class="container">';
+
+ # ce mamo zanke
+ if(count(self::$_LOOPS) > 0){
+ foreach ( self::$_LOOPS AS $loop){
+
+ if ($loop['filter'] != null){
+
+ $loop_cnt++;
+ $loop['cnt'] = $loop_cnt;
+ self::$_CURRENT_LOOP = $loop;
+
+ if ((int)$loop_cnt == (int)$_POST['loop']){
+ echo '<h2 class="filter_box" data-loopId="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'">'.$lang['srv_zanka_note'].$loop['text'].'</h2>';
+ }
}
- }
- if ((int)$loop_cnt == (int)$_POST['loop'])
- {
- switch ($zaPodstran)
- {
- case M_ANALYSIS_SUMMARY_NEW :
- self::displaySumsNew($id);
- $export = 'sums';
- break;
- case M_ANALYSIS_SUMMARY :
- self::displaySums($id);
- $export = 'sums';
- break;
- case M_ANALYSIS_DESCRIPTOR :
- self::displayDescriptives($id);
- $export = 'statistics';
- break;
- case M_ANALYSIS_FREQUENCY :
- self::displayFrequency($id);
- $export = 'frequency';
- break;
- case M_ANALYSIS_CHARTS :
- $chartClass = new SurveyChart();
- $chartClass->Init($anketa);
- $chartClass->displaySingle($id);
- $export = 'charts';
- break;
+
+ if ((int)$loop_cnt == (int)$_POST['loop']){
+
+ switch ($zaPodstran){
+ case M_ANALYSIS_SUMMARY_NEW :
+ self::displaySumsNew($id);
+ $export = 'sums';
+ break;
+ case M_ANALYSIS_SUMMARY :
+ self::displaySums($id);
+ $export = 'sums';
+ break;
+ case M_ANALYSIS_DESCRIPTOR :
+ self::displayDescriptives($id);
+ $export = 'statistics';
+ break;
+ case M_ANALYSIS_FREQUENCY :
+ self::displayFrequency($id);
+ $export = 'frequency';
+ break;
+ case M_ANALYSIS_CHARTS :
+ $chartClass = new SurveyChart();
+ $chartClass->Init($anketa);
+ $chartClass->displaySingle($id);
+ $export = 'charts';
+ break;
+ }
}
- //Izvoz v PDF/RTF
- $loop_exp = (isset(self::$_CURRENT_LOOP)) ? self::$_CURRENT_LOOP['cnt'] : 'undefined';
- $_url1 = $site_url.'admin/survey/izvoz.php?dc='.base64_encode(
- serialize(
- array( 'b'=>'export',
- 'm'=>$export,
- 'anketa'=>$anketa,
- 'sprID'=>$id,
- 'loop'=>$loop_exp)));
- $_url2 = $site_url.'admin/survey/izvoz.php?dc='.base64_encode(
- serialize(
- array( 'b'=>'export',
- 'm'=>$export.'_rtf',
- 'anketa'=>$anketa,
- 'sprID'=>$id,
- 'loop'=>$loop_exp)));
- $_url3 = $site_url.'admin/survey/izvoz.php?dc='.base64_encode(
- serialize(
- array( 'b'=>'export',
- 'm'=>$export.'_xls',
- 'anketa'=>$anketa,
- 'sprID'=>$id,
- 'loop'=>$loop_exp)));
- echo '<div id="single_export" class="printHide">';
- echo '<a href="'.$_url1.'" target="_blank"><span class="faicon pdf"></span></a>';
- echo '&nbsp;&nbsp;<a href="'.$_url2.'" target="_blank"><span class="faicon rtf"></span>&nbsp;</a>';
- //if($export == 'frequency')
- if($zaPodstran != M_ANALYSIS_CHARTS )
- {
- echo '&nbsp;&nbsp;<a href="'.$_url3.'" target="_blank"><span class="faicon xls"></span>&nbsp;</a>';
- }
}
-
+ }
+ else{
+ switch ($zaPodstran){
+ case M_ANALYSIS_SUMMARY_NEW :
+ self::displaySumsNew($id);
+ $export = 'sums';
+ break;
+ case M_ANALYSIS_SUMMARY :
+ self::displaySums($id);
+ $export = 'sums';
+ break;
+ case M_ANALYSIS_DESCRIPTOR :
+ self::displayDescriptives($id);
+ $export = 'statistics';
+ break;
+ case M_ANALYSIS_FREQUENCY :
+ self::displayFrequency($id);
+ $export = 'frequency';
+ break;
+ case M_ANALYSIS_CHARTS :
+ $chartClass = new SurveyChart();
+ $chartClass->Init($anketa);
+ $chartClass->displaySingle($id);
+ $export = 'charts';
+ break;
+ }
}
echo '</div>';
- echo '<div class="clr"></div>';
- echo '<div id="navigationBottom" class="printHide">';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="close_win(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="window.print();return false;"><span><img src="icons/icons/printer.png" alt="'.$lang['hour_print2'].'" vartical-align="middle" /> '.$lang['hour_print2'].'</span></a></div></span>';
- echo '<div class="clr"></div>';
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium blue" onclick="closeAnalizaPopup(); return false;">'.$lang['srv_zapri'].'</button>';
echo '</div>';
- echo '</body>';
- echo '</html>';
}
/** Sestavi array nepravilnih odgovorov
@@ -6520,13 +6878,13 @@ class SurveyAnalysis {
self :: Display();
break;
case 'showAnalizaSingleVarPopup' :
- self :: DisplaySingleVarPopup($_POST['id'],$_POST['zaPodstran']);
+ self :: DisplaySingleVarPopup($_POST['id'], $_POST['zaPodstran']);
break;
case 'showspremenljivkaSingleVarPopup' :
self :: showspremenljivkaSingleVarPopup($_POST['id']);
break;
case 'showSpremenljivkaTextAnswersPopup' :
- self :: showSpremenljivkaTextAnswersPopup($_POST['id'],$_POST['seq']);
+ self :: showSpremenljivkaTextAnswersPopup($_POST['id'], $_POST['seq']);
break;
case 'show_crostabs_dropdowns' :
self :: displayDropdowns($corssVar1, $corssVar2, $corssZanka);
@@ -6578,89 +6936,94 @@ class SurveyAnalysis {
echo '<div id="custom_report_switch"><a href="index.php?anketa='.self::$sid.'&a=analysis&m=analysis_creport"><span>'.$lang['srv_custom_report'].'</span></a></div>';
*/
- echo '<table class="analysis_reports"><tr>';
+ echo '<div class="reports_holder">';
// ANALIZE
- echo '<td>';
echo '<fieldset>';
echo '<legend>'.$lang['srv_analiza'].'</legend>';
+ echo '<ul>';
+
# linki - analize sumarnik
- echo '<span class="subtitle">' . $lang['srv_sumarnik'] . '</span>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums&anketa='.self::$sid).'" target="_blank">' .
- '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_rtf&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_xls&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon xls" title="' . $lang['srv_reporti'] . '"></span>&nbsp;XLS - (Microsoft Excel)</a>';
+ echo '<li class="title">' . $lang['srv_sumarnik'] . '</li>';
+
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums&anketa='.self::$sid).'" target="_blank">' .
+ '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_rtf&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_xls&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon xls" title="' . $lang['srv_reporti'] . '"></span>&nbsp;XLS - (Microsoft Excel)</a></li>';
# linki - analize opisne statistike
- echo '<span class="subtitle">' . $lang['srv_descriptor'] . '</span>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_rtf&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_xls&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon xls" title="' . $lang['srv_reporti'] . '"></span>&nbsp;XLS - (Microsoft Excel)</a>';
+ echo '<li class="title">' . $lang['srv_descriptor'] . '</li>';
+
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_rtf&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_xls&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon xls" title="' . $lang['srv_reporti'] . '"></span>&nbsp;XLS - (Microsoft Excel)</a></li>';
# linki - analize frekvence
- echo '<span class="subtitle">' . $lang['srv_frequency'] . '</span>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_rtf&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_xls&anketa=' . self::$sid).'" target="_blank">' .
- '<span class="faicon xls" title="' . $lang['srv_reporti'] . '"></span>&nbsp;XLS - (Microsoft Excel)</a>';
+ echo '<li class="title">' . $lang['srv_frequency'] . '</li>';
+
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_rtf&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_xls&anketa=' . self::$sid).'" target="_blank">' .
+ '<span class="faicon xls" title="' . $lang['srv_reporti'] . '"></span>&nbsp;XLS - (Microsoft Excel)</a></li>';
+
+ echo '</ul>';
echo '</fieldset>';
// VPRASALNIK
- echo '</td><td>';
- echo '<fieldset style="padding-top: 10px;">';
+ echo '<fieldset>';
echo '<legend>'.$lang['srv_analysis_links_survey'].'</legend>';
+ echo '<ul>';
+
# linki - vprašalnik
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=' . A_REPORT_VPRASALNIK_PDF . '&anketa=' . self::$sid) . '" target="_blank">' .
- '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=' . A_REPORT_VPRASALNIK_RTF . '&anketa=' . self::$sid) . '" target="_blank">' .
- '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?a=' . A_REPORT_VPRASALNIK_PDF . '&anketa=' . self::$sid) . '" target="_blank">' .
+ '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?a=' . A_REPORT_VPRASALNIK_RTF . '&anketa=' . self::$sid) . '" target="_blank">' .
+ '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a></li>';
+
+ echo '</ul>';
echo '</fieldset>';
// IZPIS
- echo '</td><td>';
echo '<fieldset>';
echo '<legend>'.$lang['srv_statistic'].'</legend>';
+ echo '<ul>';
+
# linki - vpogled
- echo '<span class="subtitle">' . $lang['srv_analysis_links_vpogled'] . '</span>';
- echo '<a href="index.php?anketa='.self::$sid.'&a=data&m=quick_edit&quick_view=1" >' .
- '<span title="' . $lang['srv_link_data_view'] . '"></span>' . $lang['srv_link_data_view'] . '</a>';
+ echo '<li class="title">' . $lang['srv_analysis_links_vpogled'] . '</li>';
+ echo '<li><a class="hasline" href="index.php?anketa='.self::$sid.'&a=data&m=quick_edit&quick_view=1" >' .
+ '<span title="' . $lang['srv_link_data_view'] . '"></span>' . $lang['srv_link_data_view'] . '</a></li>';
# linki - izpis vseh odgovorov
- echo '<span class="subtitle">' . $lang['srv_analysis_links_allAnswers'] . '</span>';
- echo '<span class="clr">' . $lang['srv_analysis_links_allAnswers_note'] . '</span><br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=pdf_results&anketa=' . self::$sid) . '" target="_blank">' .
- '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a>';
- echo '<br/>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?a=rtf_results&anketa=' . self::$sid) . '" target="_blank">' .
- '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a>';
+ echo '<li class="title">' . $lang['srv_analysis_links_allAnswers'] . '</li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?a=pdf_results&anketa=' . self::$sid) . '" target="_blank">' .
+ '<span class="faicon pdf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;PDF - (Adobe Acrobat)</a></li>';
+ echo '<li><a href="'.makeEncodedIzvozUrlString('izvoz.php?a=rtf_results&anketa=' . self::$sid) . '" target="_blank">' .
+ '<span class="faicon rtf" title="' . $lang['srv_reporti'] . '"></span>&nbsp;DOC - (Microsoft Word)</a></li>';
+ echo '<li>' . $lang['srv_analysis_links_allAnswers_note'] . '</li>';
+
+ echo '</ul>';
+
echo '</fieldset>';
- echo '</td>';
- echo '</tr></table>';
+ echo '</div>';
}
private static function printAnalizaSingleVar() {
global $lang;
+ global $site_url;
header('Cache-Control: no-cache');
header('Pragma: no-cache');
@@ -6682,14 +7045,12 @@ class SurveyAnalysis {
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />';
- echo '<script type="text/javascript" src="script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
- echo '<script type="text/javascript" src="minify/g=jsnew"></script>';
- echo '<link type="text/css" href="minify/g=css" media="screen" rel="stylesheet" />';
- echo '<link type="text/css" href="minify/g=cssPrint" media="print" rel="stylesheet" />';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<!--[if lt IE 7]>';
+ echo '<script type="text/javascript" src="'.$site_url.'admin/survey/script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
+ echo '<script type="text/javascript" src="'.$site_url.'admin/survey/minify/g=jsnew"></script>';
+ echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=css" media="screen" rel="stylesheet" />';
+ echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=cssPrint" media="print" rel="stylesheet" />';
+
+ echo '<!--[if lt IE 7]>';
echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie6hacks.css" type="text/css" />';
echo '<![endif]-->';
echo '<!--[if IE 7]>';
@@ -6717,8 +7078,10 @@ class SurveyAnalysis {
echo '</script>';
echo '</head>';
- echo '<body onBlur="window.close()" style="margin:5px; padding:5px;">';
+ echo '<body onBlur="window.close()" class="analysis_popup print_single_var">';
+
echo '<div class="container"> ';
+
$id = $_POST['id'];
$zaPodstran = $_POST['zaPodstran'];
switch ($zaPodstran) {
@@ -6735,12 +7098,13 @@ class SurveyAnalysis {
self::displayFrequency($id);
break;
}
+
echo '</div>';
+
echo '<div id="navigationBottom" class="printHide">';
- echo '<span class="floatRight spaceLeft"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="close_win(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="print_win(); return false;"><span><img src="icons/icons/printer.png" alt="'.$lang['hour_print2'].'" vartical-align="middle" /> '.$lang['hour_print2'].'</span></a></div></span>';
- echo '<br class="clr"/>';
+ echo ' <button class="medium blue" onclick="close_win(); return false;">'.$lang['srv_zapri'].'</button>';
echo '</div>';
+
echo '</body>';
echo '</html>';
@@ -6808,6 +7172,8 @@ class SurveyAnalysis {
function printPreviewSpremenljivka($spremenljivka) {
global $lang;
+ global $site_url;
+
header('Cache-Control: no-cache');
header('Pragma: no-cache');
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
@@ -6829,14 +7195,12 @@ class SurveyAnalysis {
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />';
- echo '<script type="text/javascript" src="script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
- echo '<script type="text/javascript" src="minify/g=jsnew"></script>';
- echo '<link type="text/css" href="minify/g=css" media="screen" rel="stylesheet" />';
- echo '<link type="text/css" href="minify/g=cssPrint" media="print" rel="stylesheet" />';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<!--[if lt IE 7]>';
+ echo '<script type="text/javascript" src="'.$site_url.'admin/survey/script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
+ echo '<script type="text/javascript" src="'.$site_url.'admin/survey/minify/g=jsnew"></script>';
+ echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=css" media="screen" rel="stylesheet" />';
+ echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=cssPrint" media="print" rel="stylesheet" />';
+
+ echo '<!--[if lt IE 7]>';
echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie6hacks.css" type="text/css" />';
echo '<![endif]-->';
echo '<!--[if IE 7]>';
@@ -6863,7 +7227,7 @@ class SurveyAnalysis {
echo '}';
echo '</script>';
echo '</head>';
- echo '<body onBlur="window.close()" style="margin:5px; padding:5px;" >';
+ echo '<body onBlur="window.close()" class="analysis_popup print_preview">';
global $lang, $site_path;
@@ -6916,28 +7280,33 @@ class SurveyAnalysis {
}
echo '</div>';// id="spremenljivka_preview"
+
echo '<div id="navigationBottom" class="printHide">';
- echo '<span class="floatRight spaceLeft"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="close_win(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="print_win(); return false;"><span><img src="icons/icons/printer.png" alt="'.$lang['hour_print2'].'" vartical-align="middle" /> '.$lang['hour_print2'].'</span></a></div></span>';
- echo '<br class="clr"/>';
+ echo ' <button class="medium blue" onclick="close_win(); return false;">'.$lang['srv_zapri'].'</button>';
echo '</div>';
+
echo '</body>';
echo '</html>';
}
static function show_sum_more_table() {
+
self :: $show_spid_div = false;
self::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
- if (count(self::$_LOOPS) == 0 ) {
+
+ if (count(self::$_LOOPS) == 0 ) {
if ($_POST['podstran'] == M_ANALYSIS_SUMMARY) {
self :: displaySums($_POST['spid']);
- } else if ($_POST['podstran'] == M_ANALYSIS_SUMMARY_NEW) {
+ }
+ else if ($_POST['podstran'] == M_ANALYSIS_SUMMARY_NEW) {
self :: displaySumsNew($_POST['spid']);
- } else if ($_POST['podstran'] == M_ANALYSIS_FREQUENCY) {
+ }
+ else if ($_POST['podstran'] == M_ANALYSIS_FREQUENCY) {
self :: displayFrequency($_POST['spid']);
}
- } else {
+ }
+ else {
# če mamo zanke
$loop_cnt = 0;
foreach ( self::$_LOOPS AS $loop) {
@@ -7002,13 +7371,14 @@ class SurveyAnalysis {
* # odstranimo sistemske variable tipa email, ime, priimek, geslo oz. ce imamo vklopljeno nastavitev da skrivamo vse sistemske skrijemo vse sistem == 1
*/
static function removeSystemVariables() {
- if (!empty(self::$_HEADERS))
- {
+
+ if (!empty(self::$_HEADERS)){
+
foreach (self::$_HEADERS AS $skey => $spremenljivka) {
- if ((int)$spremenljivka['hide_system'] == 1 && in_array($spremenljivka['variable'],array('email','ime','priimek','telefon','naziv','drugo'))) {
+ if (isset($spremenljivka['hide_system']) && (int)$spremenljivka['hide_system'] == 1 && in_array($spremenljivka['variable'],array('email','ime','priimek','telefon','naziv','drugo'))) {
unset(self::$_HEADERS[$skey]);
}
- else if ((int)$spremenljivka['sistem'] == 1 && SurveyDataSettingProfiles :: getSetting('hideAllSystem') == 1) {
+ else if (isset($spremenljivka['sistem']) && (int)$spremenljivka['sistem'] == 1 && SurveyDataSettingProfiles :: getSetting('hideAllSystem') == 1) {
unset(self::$_HEADERS[$skey]);
}
}
@@ -7093,7 +7463,7 @@ class SurveyAnalysis {
}
static function addCustomReportElement($type, $sub_type, $spr1, $spr2=''){
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type, $sub_type=0, $spid);
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type, $sub_type=0, $spr1);
}
// Nastavitve na dnu
@@ -7111,58 +7481,73 @@ class SurveyAnalysis {
$lan_xls = ' title="'.$lang['XLS_Izpis'].'"';
echo '<div class="analysis_bottom_settings printHide">';
+
+
+ // Klik izven treh pikic/settingsov pri vprasanju - zapremo okno
+ echo '<script>
+ $(document).mouseup(function(e){
+ var container = $(".cell_icons, .options");
+
+ if (!container.is(e.target) && container.has(e.target).length === 0){
+ $(".options").hide();
+ }
+ });
+ </script>';
+
// Pri javni povezavi nimamo tega
if(self::$printPreview == false){
+
// Nastavitve na dnu pri sumarniku
if($page == 'sums'){
-
- echo '<a href="#" onClick="addCustomReportAllElementsAlert(1);" title="'.$lang['srv_custom_report_comments_add_hover'].'" class="'.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport" style="margin-right: 40px;"><span class="spaceRight faicon comments_creport" ></span><span class="bold">'.$lang['srv_custom_report_comments_add'].'</span></a>';
-
- echo '<a href="#" onClick="printAnaliza(\'Sumarnik\'); return false;"'.$lan_print.' class="srv_ico"><span class="faicon print icon-grey_dark_link"></span></a>';
-
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums&anketa=' . self::$sid) . '" target="_blank"'.$lan_pdf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon pdf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_rtf&anketa=' . self::$sid) . '" target="_blank"'.$lan_rtf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon rtf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_xls&anketa=' . self::$sid) . '" target="_blank"'.$lan_xls.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon xls black very_large"></span></a>';
+
+ echo '<div class="comment_holder">';
+ echo ' <a href="#" class="comment" onClick="addCustomReportAllElementsAlert(1);" title="'.$lang['srv_custom_report_comments_add_hover'].'" class="'.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport"><span class="faicon comments" ></span><span>'.$lang['srv_custom_report_comments_add'].'</span></a>';
+ echo '</div>';
+
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_xls&anketa=' . self::$sid) . '" target="_blank"'.$lan_xls.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon xls"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums_rtf&anketa=' . self::$sid) . '" target="_blank"'.$lan_rtf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon rtf"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=sums&anketa=' . self::$sid) . '" target="_blank"'.$lan_pdf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon pdf"></span></a>';
- echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv black very_large"></span></a>';
- echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv_mail black very_large"></span></a>';
+ echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv"></span></a>';
+ echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv_mail"></span></a>';
}
// Nastavitve na dnu pri frekvencah
elseif($page == 'freq'){
- echo '<a href="#" onClick="addCustomReportAllElementsAlert(2);" title="'.$lang['srv_custom_report_comments_add_hover'].'" class="'.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport" style="margin-right: 40px;"><span class="spaceRight faicon comments_creport" ></span><span class="bold">'.$lang['srv_custom_report_comments_add'].'</span></a>';
-
- echo '<a href="#" onClick="printAnaliza(\'Frekvence\'); return false;"'.$lan_print.' class="srv_ico"><span class="faicon print icon-grey_dark_link"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency&anketa=' . self::$sid) . '" target="_blank"'.$lan_pdf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon pdf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_rtf&anketa=' . self::$sid) . '" target="_blank"'.$lan_rtf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon rtf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_xls&anketa=' . self::$sid) . '" target="_blank"'.$lan_xls.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon xls black very_large"></span></a>';
+ echo '<div class="comment_holder">';
+ echo ' <a href="#" class="comment" onClick="addCustomReportAllElementsAlert(2);" title="'.$lang['srv_custom_report_comments_add_hover'].'" class="'.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport"><span class="spaceRight faicon comments" ></span><span>'.$lang['srv_custom_report_comments_add'].'</span></a>';
+ echo '</div>';
+
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_xls&anketa=' . self::$sid) . '" target="_blank"'.$lan_xls.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon xls"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency_rtf&anketa=' . self::$sid) . '" target="_blank"'.$lan_rtf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon rtf"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=frequency&anketa=' . self::$sid) . '" target="_blank"'.$lan_pdf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon pdf"></span></a>';
- echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv black very_large"></span></a>';
- echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv_mail black very_large"></span></a>';
+ echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv"></span></a>';
+ echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv_mail"></span></a>';
}
// Nastavitve na dnu pri opisnih statistikah
else{
- echo '<a href="#" onClick="addCustomReportAllElementsAlert(3);" title="'.$lang['srv_custom_report_comments_add_hover'].'" class="'.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport" style="margin-right: 40px;"><span class="spaceRight faicon comments_creport" ></span><span class="bold">'.$lang['srv_custom_report_comments_add'].'</span></a>';
-
- echo '<a href="#" onClick="printAnaliza(\'Opisne statistike\'); return false;"'.$lan_print.' class="srv_ico"><span class="faicon print icon-grey_dark_link"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics&anketa=' . self::$sid) . '" target="_blank"'.$lan_pdf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon pdf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_rtf&anketa=' . self::$sid) . '" target="_blank"'.$lan_rtf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon rtf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_xls&anketa=' . self::$sid) . '" target="_blank"'.$lan_xls.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon xls black very_large"></span></a>';
+ echo '<div class="comment_holder">';
+ echo ' <a href="#" class="comment" onClick="addCustomReportAllElementsAlert(3);" title="'.$lang['srv_custom_report_comments_add_hover'].'" class="'.(!$userAccess->checkUserAccess('analysis_analysis_creport') ? 'user_access_locked' : '').'" user-access="analysis_analysis_creport"><span class="spaceRight faicon comments" ></span><span>'.$lang['srv_custom_report_comments_add'].'</span></a>';
+ echo '</div>';
+
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_xls&anketa=' . self::$sid) . '" target="_blank"'.$lan_xls.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon xls"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics_rtf&anketa=' . self::$sid) . '" target="_blank"'.$lan_rtf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon rtf"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?b=export&m=statistics&anketa=' . self::$sid) . '" target="_blank"'.$lan_pdf.' class="srv_ico '.(!$userAccess->checkUserAccess('analysis_export') ? 'user_access_locked' : '').'" user-access="analysis_export"><span class="faicon pdf"></span></a>';
- echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv black very_large"></span></a>';
- echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv_mail black very_large"></span></a>';
+ echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv"></span></a>';
+ echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '" class="'.(!$userAccess->checkUserAccess('archive') ? 'user_access_locked' : '').'" user-access="archive"><span class="faicon arhiv_mail"></span></a>';
}
}
echo '</div>';
// Javascript s katerim povozimo urlje za izvoze, ki niso na voljo v paketu
- global $app_settings;
- if($app_settings['commercial_packages'] == true){
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
echo '<script> userAccessExport(); </script>';
}
}
@@ -7171,6 +7556,9 @@ class SurveyAnalysis {
global $site_url;
global $global_user_id;
+ // Patrik - Izvoz posameznih analiz je začasno ugasnjen dokler se ne popravi
+ //return;
+
$return = '<span class="" style="">';
$anketa = self::$sid;
switch (self::$podstran) {
@@ -7221,7 +7609,8 @@ class SurveyAnalysis {
'sprID'=>$id,
'loop'=>$loop)));
- $return = '<span class="faicon print_small icon-grey_dark_link" onclick="printCurrentAnalysis(\''.$id.'\');"></span>&nbsp;&nbsp';
+
+ $return = '';
$userAccess = UserAccess::getInstance($global_user_id);
if($userAccess->checkUserAccess($what='data_export')){
@@ -7268,54 +7657,40 @@ class SurveyAnalysis {
static function displaySpremenljivkaIcons($spid) {
if (self::$isArchive == false){
- echo '<div class="div_analiza_icons">'.self::displayQuickIcons($spid).'</div>';
-
+
+ echo '<div class="analiza_table_top_settings">';
+
+ echo ' <div class="div_analiza_icons">'.self::displayQuickIcons($spid).'</div>';
+
// Javna povezava nima js preklopov
- if(self::$printPreview == false)
+ if(self::$printPreview == false && self::$podstran != M_ANALYSIS_DESCRIPTOR && self::$podstran != M_ANALYSIS_CHARTS){
self::displayQuickScale($spid);
+ }
+
+ echo '</div>';
}
}
static function displayQuickScale($spid) {
global $lang;
- $spr_id = self::$_HEADERS[$spid]['spr_id'];
+ $spr_id = isset(self::$_HEADERS[$spid]['spr_id'])?self::$_HEADERS[$spid]['spr_id']:null;
# pokličemo objekt SpremenljivkaSkala
$objectSkala = new SpremenljivkaSkala($spr_id);
+ echo '<div class="div_analiza_scale">';
+
if ($objectSkala->canChangeSkala()) {
- echo '<div class="div_analiza_scale">';
- if ($objectSkala->is(SpremenljivkaSkala::ORD)) {
- echo '<a href="#" onclick="changeSpremenljivkaLestvica(\''.$spid.'\',\''.SpremenljivkaSkala::NOM.'\'); return false;">';
- echo '<span class="strong" title="'.$lang['srv_skala_long_'.SpremenljivkaSkala::ORD].'">';
- echo $lang['srv_skala_'.SpremenljivkaSkala::ORD];
- echo '</span>';
- echo ' / ';
- echo '<span title="'.$lang['srv_skala_long_'.SpremenljivkaSkala::NOM].'">';
- echo $lang['srv_skala_'.SpremenljivkaSkala::NOM];
- echo '</span>';
- echo '</a>';
- }
- if ($objectSkala->is(SpremenljivkaSkala::NOM)) {
- echo '<a href="#" onclick="changeSpremenljivkaLestvica(\''.$spid.'\',\''.SpremenljivkaSkala::ORD.'\'); return false;">';
- echo '<span title="'.$lang['srv_skala_long_'.SpremenljivkaSkala::ORD].'">';
- echo $lang['srv_skala_'.SpremenljivkaSkala::ORD];
- echo '</span>';
- echo ' / ';
- echo '<span class="strong" title="'.$lang['srv_skala_long_'.SpremenljivkaSkala::NOM].'">';
- echo $lang['srv_skala_'.SpremenljivkaSkala::NOM];
- echo '</span>';
- echo '</a>';
- }
- echo '</div>';
- } else {
- echo '<div class="div_analiza_scale">';
- echo '<span title="'.$lang['srv_skala_long_'.$objectSkala->getSkala()].'">';
- echo $lang['srv_skala_'.$objectSkala->getSkala()];
- echo '</span>';
- echo '</div>';
+ echo '<button class="small '.($objectSkala->is(SpremenljivkaSkala::ORD) ? 'active' : '').'" title="'.$lang['srv_skala_long_'.SpremenljivkaSkala::ORD].'" onclick="changeSpremenljivkaLestvica(\''.$spid.'\',\''.SpremenljivkaSkala::ORD.'\'); return false;">'.$lang['srv_skala_'.SpremenljivkaSkala::ORD].'</button>';
+ echo '<button class="small '.($objectSkala->is(SpremenljivkaSkala::NOM) ? 'active' : '').'" title="'.$lang['srv_skala_long_'.SpremenljivkaSkala::NOM].'" onclick="changeSpremenljivkaLestvica(\''.$spid.'\',\''.SpremenljivkaSkala::NOM.'\'); return false;">'.$lang['srv_skala_'.SpremenljivkaSkala::NOM].'</button>';
+ }
+ else {
+ echo '<button class="small single active" title="'.(isset($lang['srv_skala_long_'.$objectSkala->getSkala()])?$lang['srv_skala_long_'.$objectSkala->getSkala()]:'').
+ '">'.(isset($lang['srv_skala_'.$objectSkala->getSkala()])?$lang['srv_skala_'.$objectSkala->getSkala()]:'').'</button>';
}
+
+ echo '</div>';
}
static function displayPublicAnalysis($properties = array()) {
@@ -7348,10 +7723,8 @@ class SurveyAnalysis {
echo '<script type="text/javascript" src="'.$site_url.'admin/survey/minify/g=jsnew"></script>';
echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=css" media="screen" rel="stylesheet" />';
echo '<link type="text/css" href="'.$site_url.'admin/survey/minify/g=cssPrint" media="print" rel="stylesheet" />';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<!--[if lt IE 7]>';
+
+ echo '<!--[if lt IE 7]>';
echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie6hacks.css" type="text/css" />';
echo '<![endif]-->';
echo '<!--[if IE 7]>';
@@ -7360,10 +7733,8 @@ class SurveyAnalysis {
echo '<!--[if IE 8]>';
echo '<link rel="stylesheet" href="<?=$site_url?>admin/survey/css/ie8hacks.css" type="text/css" />';
echo '<![endif]-->';
- echo '<style>';
- echo '.container {margin-bottom:45px;} #navigationBottom {width: 100%; background-color: #f2f2f2; border-top: 1px solid gray; height:25px; padding: 10px 30px 10px 0px !important; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;}';
- echo '</style>';
- echo '<script>';
+
+ echo '<script>';
echo 'function chkstate(){';
echo ' if(document.readyState=="complete"){';
echo ' window.close()';
@@ -7382,10 +7753,15 @@ class SurveyAnalysis {
echo '</script>';
echo '</head>';
- echo '<body style="margin:5px; padding:5px;" >';
+
+ echo '<body class="public_link analysis" style="margin:5px; padding:5px;">';
+
echo '<h2>'.$lang['srv_publc_analysis_title_for'].self::$survey['naslov'].'</h2>';
+ echo '<input type="hidden" name="podstran" id="srv_meta_podstran" value="' . self::$podstran . '" />';
echo '<input type="hidden" name="anketa_id" id="srv_meta_anketa_id" value="' . $anketa . '" />';
+ echo '<input type="hidden" name="srv_site_url" id="srv_site_url" value="' . $site_url . '" />';
+
echo '<div id="analiza_data">';
if (isset($properties['profile_id_variable']))
@@ -7408,18 +7784,6 @@ class SurveyAnalysis {
# ponastavimo nastavitve- filter
self::Display();
echo '</div>';
-
- echo '<div id="navigationBottom" class="printHide">';
-
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="window.print();return false;"><span><img src="'.$site_url.'admin/survey/icons/icons/printer.png" vartical-align="middle" /> '.$lang['hour_print2'].'</span></a></div></span>';
- echo '<span class="spaceRight floatRight printHide" style="margin-top:6px;">';
- echo '<a href="'.$_url1.'" target="_blank"><span class="faicon pdf"></span></a>&nbsp;&nbsp;';
- echo '<a href="'.$_url2.'" target="_blank"><span class="faicon rtf"></span></a>&nbsp;&nbsp;';
- echo '<a href="'.$_url3.'" target="_blank"><span class="faicon xls"></span></a>';
- echo '</span>';
-
- echo '<br class="clr" />';
- echo '</div>';
echo '</body>';
echo '</html>';
@@ -7439,7 +7803,9 @@ class SurveyAnalysis {
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -7463,63 +7829,63 @@ class SurveyAnalysis {
$_valid_answers = $_answers['valid'];
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
- //self::displaySpremenljivkaIcons($spid);
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
- //echo '<div class="heatmapGrapshContainer" style=" width: 800px; text-align:center; margin-left:auto; margin-right:auto;">';
- echo '<div class="heatmapGrapshContainer" style=" width: 600px; text-align:center; margin-left:auto; margin-right:auto;">';
- # tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_bb tbl_clps">';
- # naslovna vrstica
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
- //echo self::showVariable($spid, $spremenljivka['variable']);
- echo $spremenljivka['variable'].' - '.$spremenljivka['naslov'];
- echo '</td>';
-
- echo '</tr>';
- echo '<tr>';
- #variabla
-
- // konec naslovne vrstice
-
- $_answersOther = array();
- $_grids_count = count($spremenljivka['grids']);
- if ($_grids_count > 0) {
-
- $_css_bck = 'anl_bck_desc_2 anl_ac anl_bt_dot ';
- $last = 0;
- //anl_bck_desc_2 anl_bl anl_br anl_variabla_sub
- foreach ($spremenljivka['grids'] AS $gid => $grid) {
- $_variables_count = count($grid['variables']);
- echo '<tr class="'.$_css_bck.'">';
- echo '<td class="anl_bl anl_br anl_variabla_sub">';
- if($heatmap){
- //echo $grid['naslov'].'<br>';//ni potrebno, ker je ze v glavi?
- $sprid = explode('_',$spid);
- $loopid = $sprid[1];
- $sprid = $sprid[0];
- SurveyUserSession::Init($anketa);
-
- $heatmapId = 'heatmap'.$sprid;
- //echo $heatmapId;
-
- echo '<a class="fHeatMap" id="heatmap_'.$sprid.'" title="'.$lang['srv_view_data_on_map'].
- '" href="javascript:void(0);" onclick="passHeatMapData('.$sprid.', -1, '.$loopid.', '.$anketa.');">';
- //echo '<img src="img_0/Google_Maps_Icon.png" alt="Smiley face" height="24" width="24" />';
- echo 'Heatmap';
- echo '</a>';
- }
- echo '</td>';
+ echo '<div class="heatmapGrapshContainer" style=" width: 600px; text-align:center; margin-left:auto; margin-right:auto;">';
+
+ # tekst vprašanja
+ echo '<table class="anl_tbl anl_bt anl_bb tbl_clps">';
+
+ # naslovna vrstica
+ echo '<tr>';
+
+ #variabla
+ echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
+ echo $spremenljivka['variable'].' - '.$spremenljivka['naslov'];
+ echo '</td>';
+
+ echo '</tr>';
+ // konec naslovne vrstice
+
+
+ echo '<tr>';
+ #variabla
+
+ $_answersOther = array();
+ $_grids_count = count($spremenljivka['grids']);
+ if ($_grids_count > 0) {
+
+ $_css_bck = 'anl_bck_desc_2 anl_ac anl_bt_dot ';
+ $last = 0;
+ //anl_bck_desc_2 anl_bl anl_br anl_variabla_sub
+ foreach ($spremenljivka['grids'] AS $gid => $grid) {
+
+ $_variables_count = count($grid['variables']);
+ echo '<tr class="'.$_css_bck.'">';
+ echo '<td class="anl_bl anl_br anl_variabla_sub">';
+ if($heatmap){
+ //echo $grid['naslov'].'<br>';//ni potrebno, ker je ze v glavi?
+ $sprid = explode('_',$spid);
+ $loopid = $sprid[1];
+ $sprid = $sprid[0];
+ SurveyUserSession::Init($anketa);
+
+ $heatmapId = 'heatmap'.$sprid;
+
+ echo '<a class="fHeatMap" id="heatmap_'.$sprid.'" title="'.$lang['srv_view_data_on_map'].
+ '" href="javascript:void(0);" onclick="passHeatMapData('.$sprid.', -1, '.$loopid.', '.$anketa.');">';
+ echo 'Heatmap';
+ echo '</a>';
+ }
+ echo '</td>';
- echo '</tr>';
- }
- }
- echo '</table>';
+ echo '</tr>';
+ }
+ }
+ echo '</table>';
echo '</div>';
# izpišemo še tekstovne odgovore za polja drugo
@@ -7533,7 +7899,6 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -7582,8 +7947,10 @@ class SurveyAnalysis {
# dodamo dodatne vrstice z albelami grida
if (count($grid['variables']) > 0 )
foreach ($grid['variables'] AS $vid => $variable ){
- $_sequence = $variable['sequence']; # id kolone z podatki
- $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
+ $_sequence = $variable['sequence']; # id kolone z podatki
+
+ if(isset(self::$_FREQUENCYS[$_sequence]['validCnt']))
+ $only_valid += (int)self::$_FREQUENCYS[$_sequence]['validCnt'];
}
}
}
@@ -7607,169 +7974,177 @@ class SurveyAnalysis {
$_valid_answers = $_answers['valid'];
if (self :: $show_spid_div == true) {
- echo '<div id="sum_'.$spid.'" loop="'.self::$_CURRENT_LOOP['cnt'].'" class="div_sum_variable div_analiza_holder">';
+ echo '<div id="sum_'.$spid.'" loop="'.(isset(self::$_CURRENT_LOOP['cnt']) ? self::$_CURRENT_LOOP['cnt'] : '').'" class="div_sum_variable div_analiza_holder">';
}
self::displaySpremenljivkaIcons($spid);
+
# tekst vprašanja
echo '<table class="anl_tbl anl_bt anl_bb tbl_clps">'; //zacetek tabele
+
# 1. vrstica - naslovna vrstica
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck_freq_1 anl_w110">';
- echo self::showVariable($spid, $spremenljivka['variable']);
- echo '</td>';
- #odgovori
- //echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="'.(!$lokacija ? (self::$_SHOW_LEGENDA ? 3+$_cols : 1+$_cols) : 3+$_cols).'"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
- echo '<td class="anl_br anl_bb anl_al anl_bck_freq_1" colspan="6"><span class="anl_variabla_label">'.$spremenljivka['naslov'].'</span>';
+ echo '<tr class="row1">';
+
+ #variabla
+ echo '<td class="cell_var">';
+ echo self::showVariable($spid, $spremenljivka['variable']);
+ echo '</td>';
+
+ #odgovori
+ echo '<td class="cell_question" colspan="6">'.$spremenljivka['naslov'].'</span>';
+
+ echo '</td>';
- echo '</td>';
echo '</tr>';
//konec 1. vrstice
+
//2. vrstica - prikazovanje povezave do heatmap
- echo '<tr>';
- #variabla
- echo '<td class="anl_bl anl_br anl_bb anl_ac anl_bck anl_w110">';
- //self::showIcons($spid,$spremenljivka,$_from); //za enkrat skrijem ikone za izvoze in druge moznosti
- echo '</td>';
- echo '<td class="anl_br anl_bb anl_ac" colspan="6">';
- //echo $grid['naslov'].'<br>';//ni potrebno, ker je ze v glavi?
- $sprid = explode('_',$spid);
- $loopid = $sprid[1];
- $sprid = $sprid[0];
- SurveyUserSession::Init($anketa);
-
- $heatmapId = 'heatmap'.$sprid;
- //echo $heatmapId;
- //SurveyChart::displayExportIcons($sprid);
- echo '<a class="fHeatMap" id="heatmap_'.$sprid.'" title="'.$lang['srv_view_data_heatmap'].
- '" href="javascript:void(0);" onclick="passHeatMapData('.$sprid.', -1, '.$loopid.', '.$anketa.');">';
- //echo '<img src="img_0/Google_Maps_Icon.png" alt="Smiley face" height="24" width="24" />';
- echo 'Heatmap ';
- echo '</a>';
+ echo '<tr class="row2">';
+
+ #variabla
+ echo '<td>';
+ //self::showIcons($spid,$spremenljivka,$_from); //za enkrat skrijem ikone za izvoze in druge moznosti
+ echo '</td>';
+
+ echo '<td class="cell_subquestion" colspan="6">';
+ $sprid = explode('_',(is_string($spid)?$spid:''));
+ $loopid = $sprid[1];
+ $sprid = $sprid[0];
+ SurveyUserSession::Init($anketa);
+
+ $heatmapId = 'heatmap'.$sprid;
- echo '</td>';
+ echo '<a class="fHeatMap" id="heatmap_'.$sprid.'" title="'.$lang['srv_view_data_heatmap'].
+ '" href="javascript:void(0);" onclick="passHeatMapData('.$sprid.', -1, '.$loopid.', '.$anketa.');">';
+ echo 'Heatmap ';
+ echo '</a>';
+
+ echo '</td>';
echo '</tr>';
//konec - 2. vrstice
+
//Koordinate
//naslovna vrstica za koordinate
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bck anl_bb anl_ac" colspan="7">';
- echo '<b>'.$lang['srv_analiza_heatmap_clicked_coords'].'</b>';
- echo '</td>';
+ echo '<tr class="row1">';
+ echo '<td class="cell_question" colspan="7">';
+ echo $lang['srv_analiza_heatmap_clicked_coords'];
+ echo '</td>';
echo '</tr>';
//naslovna vrstica za koordinate - konec
+
+
//vrstica s podnaslovi celic
- echo '<tr>';
- echo '<td class="anl_variabla_line anl_bl anl_br anl_bb anl_bck anl_ac">';
- echo $lang['coordinates'];
- echo '</td>';
-
- echo '<td class="anl_variabla_line anl_bl anl_br anl_bb anl_bck anl_ac anl_w70">';
- echo $lang['srv_analiza_opisne_valid_heatmap'];
- echo '</td>';
-
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac anl_w70">';
- echo $lang['srv_analiza_num_units_valid_heatmap'];
- echo '</td>';
-
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac anl_w70">';
- echo $lang['srv_means_label'];
- echo '</td>';
-
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac anl_w70">';
- echo $lang['srv_analiza_opisne_odklon'];
- echo '</td>';
-
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac anl_w70">';
- echo $lang['srv_analiza_opisne_min'];
- echo '</td>';
-
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac anl_w70">';
- echo $lang['srv_analiza_opisne_max'];
- echo '</td>';
+ echo '<tr class="row2">';
+ echo '<td class="cell_value">';
+ echo $lang['coordinates'];
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo $lang['srv_analiza_opisne_valid_heatmap'];
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo $lang['srv_analiza_num_units_valid_heatmap'];
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo $lang['srv_means_label'];
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo $lang['srv_analiza_opisne_odklon'];
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo $lang['srv_analiza_opisne_min'];
+ echo '</td>';
+
+ echo '<td class="cell_value">';
+ echo $lang['srv_analiza_opisne_max'];
+ echo '</td>';
echo '</tr>';
//vrstica s podnaslovi celic - konec
+
//vrstica za x
echo '<tr>';
- //1. stolpcev z imenom koordinate
- echo '<td class="anl_bl anl_br anl_bb anl_ac">';
- echo 'x';
- echo '</td>';
- //1. stolpcev z imenom koordinate - konec
-
- //2. stolpec - Veljavni
- $validHeatmapRegion = self::validHeatmapRegion($spremenljivka['grids'], $spid, $_valid_answers);
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$validHeatmapRegion.'</td>';
- //2. stolpec - Veljavni - konec
-
- //3. stolpec - Ustrezni
- $ustrezniHeatmapRegion = self::ustrezniHeatmapRegion($spid, $_valid_answers, $_sequence); //vsi mozni kliki
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$ustrezniHeatmapRegion.'</td>';
- //3. stolpec - Ustrezni - konec
-
- //4. stolpec - Povprecje
- $povprecjeHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'povprecje'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$povprecjeHeatmapClicksX.'</td>';
- //4. stolpec - Povprecje - konec
-
- //5. stolpec - Standardni odklon
- $stdevHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'stdev'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$stdevHeatmapClicksX.'</td>';
- //5. stolpec - Standardni odklon - konec
-
- //6. stolpec - Minimum
- $minHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'min'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$minHeatmapClicksX.'</td>';
- //6. stolpec - Minimum - konec
-
- //7. stolpec - Max
- $maxHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'max'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$maxHeatmapClicksX.'</td>';
- //7. stolpec - Max - konec
+ //1. stolpcev z imenom koordinate
+ echo '<td class="cell_value">';
+ echo 'x';
+ echo '</td>';
+ //1. stolpcev z imenom koordinate - konec
+
+ //2. stolpec - Veljavni
+ $validHeatmapRegion = self::validHeatmapRegion($spremenljivka['grids'], $spid, $_valid_answers);
+ echo '<td class="cell_value">'.$validHeatmapRegion.'</td>';
+ //2. stolpec - Veljavni - konec
+
+ //3. stolpec - Ustrezni
+ $ustrezniHeatmapRegion = self::ustrezniHeatmapRegion($spid, $_valid_answers, $_sequence); //vsi mozni kliki
+ echo '<td class="cell_value">'.$ustrezniHeatmapRegion.'</td>';
+ //3. stolpec - Ustrezni - konec
+
+ //4. stolpec - Povprecje
+ $povprecjeHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'povprecje'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$povprecjeHeatmapClicksX.'</td>';
+ //4. stolpec - Povprecje - konec
+
+ //5. stolpec - Standardni odklon
+ $stdevHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'stdev'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$stdevHeatmapClicksX.'</td>';
+ //5. stolpec - Standardni odklon - konec
+
+ //6. stolpec - Minimum
+ $minHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'min'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$minHeatmapClicksX.'</td>';
+ //6. stolpec - Minimum - konec
+
+ //7. stolpec - Max
+ $maxHeatmapClicksX = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'x', $validHeatmapRegion, 'max'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$maxHeatmapClicksX.'</td>';
+ //7. stolpec - Max - konec
echo '</tr>';
//vrstica za x - konec
//vrstica za y
echo '<tr>';
- //1. stolpcev z imenom koordinate
- echo '<td class="anl_bl anl_br anl_bb anl_ac">';
- echo 'y';
- echo '</td>';
- //1. stolpcev z imenom koordinate - konec
-
- //2. stolpec - Veljavni
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$validHeatmapRegion.'</td>';
- //2. stolpec - Veljavni - konec
-
- //3. stolpec - Ustrezni
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$ustrezniHeatmapRegion.'</td>';
- //3. stolpec - Ustrezni - konec
-
- //4. stolpec - Povprecje
- $povprecjeHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'povprecje'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$povprecjeHeatmapClicksY.'</td>';
- //4. stolpec - Povprecje - konec
-
- //5. stolpec - Standardni odklon
- $stdevHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'stdev'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$stdevHeatmapClicksY.'</td>';
- //5. stolpec - Standardni odklon - konec
-
- //6. stolpec - Minimum
- $minHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'min'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$minHeatmapClicksY.'</td>';
- //6. stolpec - Minimum - konec
-
- //7. stolpec - Max
- $maxHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'max'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$maxHeatmapClicksY.'</td>';
- //7. stolpec - Max - konec
+ //1. stolpcev z imenom koordinate
+ echo '<td class="cell_value">';
+ echo 'y';
+ echo '</td>';
+ //1. stolpcev z imenom koordinate - konec
+
+ //2. stolpec - Veljavni
+ echo '<td class="cell_value">'.$validHeatmapRegion.'</td>';
+ //2. stolpec - Veljavni - konec
+
+ //3. stolpec - Ustrezni
+ echo '<td class="cell_value">'.$ustrezniHeatmapRegion.'</td>';
+ //3. stolpec - Ustrezni - konec
+
+ //4. stolpec - Povprecje
+ $povprecjeHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'povprecje'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$povprecjeHeatmapClicksY.'</td>';
+ //4. stolpec - Povprecje - konec
+
+ //5. stolpec - Standardni odklon
+ $stdevHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'stdev'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$stdevHeatmapClicksY.'</td>';
+ //5. stolpec - Standardni odklon - konec
+
+ //6. stolpec - Minimum
+ $minHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'min'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$minHeatmapClicksY.'</td>';
+ //6. stolpec - Minimum - konec
+
+ //7. stolpec - Max
+ $maxHeatmapClicksY = self::formatNumber(self::heatmapClicksCalc($spremenljivka['grids'], $spid, $_valid_answers, 'y', $validHeatmapRegion, 'max'),SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">'.$maxHeatmapClicksY.'</td>';
+ //7. stolpec - Max - konec
echo '</tr>';
//vrstica za y - konec
@@ -7780,89 +8155,95 @@ class SurveyAnalysis {
$RegionPresent = self::HeatmapRegionPresence($spremenljivka['grids'], $spid, $_valid_answers);
//preveri, ali je prisotno kaksno obmocje, nadaljuj izris tabele - konec
- if($RegionPresent){ //ce imamo obmocja
+ //ce imamo obmocja
+ if($RegionPresent){
+
//3. vrstica - naslovna za obmocja
- echo '<tr>';
- echo '<td class="anl_bl anl_br anl_bck anl_bb anl_ac" colspan="7">';
- echo '<b>'.$lang['srv_analiza_heatmap_clicked_regions'].'</b>';
- echo '</td>';
+ echo '<tr class="row1">';
+ echo '<td class="cell_question" colspan="7">';
+ echo '<b>'.$lang['srv_analiza_heatmap_clicked_regions'].'</b>';
+ echo '</td>';
echo '</tr>';
//konec - 3. vrstice
+
$_answersOther = array();
$_grids_count = count($spremenljivka['grids']);
- $_css_bck = 'anl_bck_desc_2 anl_ac anl_bt_dot ';
$last = 0;
if ($_grids_count > 0) {
$_row = $spremenljivka['grids'][0];
$indeks = 0;
- //$veljavnaSkupnaFreq = 0;
+
if (count($_row['variables'])>0)
foreach ($_row['variables'] AS $rid => $_col ){
$_sequence = $_col['sequence']; # id kolone z podatki
if ($_col['other'] != true) {
- echo '<tr>';
- if($indeks == 0) //4. vrstica, naslovna vrstica
- {
- echo '<td class="anl_variabla_line anl_bl anl_br anl_bb anl_bck anl_ac" colspan="2">';
+
+ //4. vrstica, naslovna vrstica
+ echo '<tr class="row2">';
+
+ if($indeks == 0){
+ echo '<td class="cell_value" colspan="2">';
echo $lang['srv_hot_spot_regions_menu'];
echo '</td>';
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac">';
+ echo '<td class="cell_value">';
echo $lang['srv_analiza_opisne_frequency_heatmap'];
echo '</td>';
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac">';
+ echo '<td class="cell_value">';
echo $lang['srv_analiza_opisne_valid_heatmap'];
echo '</td>';
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac">';
+ echo '<td class="cell_value">';
echo '% - '.$lang['srv_analiza_opisne_valid_heatmap'];
echo '</td>';
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac">';
+ echo '<td class="cell_value">';
echo $lang['srv_analiza_num_units_valid_heatmap'];
echo '</td>';
- echo '<td class="anl_variabla_line anl_br anl_bb anl_bck anl_ac">';
+ echo '<td class="cell_value">';
echo '% - '.$lang['srv_analiza_num_units_valid_heatmap'];
echo '</td>';
- }else //od 5. vrstice dalje, kjer so po vrsticah obmocja in njihovi podatki
- {
+ }
+ //od 5. vrstice dalje, kjer so po vrsticah obmocja in njihovi podatki
+ else{
+
//1. stolpcev z imenom obmocja
- echo '<td class="anl_bl anl_br anl_bb anl_ac" colspan="2">';
+ echo '<td class="cell_value" colspan="2">';
echo $_col['naslov'];
echo '</td>';
//1. stolpcev z imenom obmocja - konec
//2. stolpec - Frekvenca
$freqHeatmapRegion = self::freqHeatmapRegion($spremenljivka['grids'], $spid, $_valid_answers, $indeks);
- $veljavnaSkupnaFreq = $veljavnaSkupnaFreq + $freqHeatmapRegion;
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$freqHeatmapRegion.'</td>';
+
+ echo '<td class="cell_value">'.$freqHeatmapRegion.'</td>';
//2. stolpec - Frekvenca - konec
//3. stolpec - Veljavni
//$validHeatmapRegion = self::validHeatmapRegion($spremenljivka['grids'], $spid, $_valid_answers);
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$validHeatmapRegion.'</td>';
+ echo '<td class="cell_value">'.$validHeatmapRegion.'</td>';
//3. stolpec - Veljavni - konec
//4. stolpec - % Veljavni
$_procentValidHeatmapRegion = ($validHeatmapRegion > 0 ) ? 100*$freqHeatmapRegion / $validHeatmapRegion : 0;
$_procentValidHeatmapRegion = self::formatNumber($_procentValidHeatmapRegion, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$_procentValidHeatmapRegion.'</td>';
+ echo '<td class="cell_value">'.$_procentValidHeatmapRegion.'</td>';
//4. stolpec - % Veljavni - konec
//5. stolpec - Ustrezni
$ustrezniHeatmapRegion = self::ustrezniHeatmapRegion($spid, $_valid_answers, $_sequence); //vsi mozni kliki
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$ustrezniHeatmapRegion.'</td>';
+ echo '<td class="cell_value">'.$ustrezniHeatmapRegion.'</td>';
//5. stolpec - Ustrezni - konec
//6. stolpec - % Ustrezni
$_procentUstrezniHeatmapRegion = ($ustrezniHeatmapRegion > 0 ) ? 100*$freqHeatmapRegion / $ustrezniHeatmapRegion : 0;
$_procentUstrezniHeatmapRegion = self::formatNumber($_procentUstrezniHeatmapRegion, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'),'%');
- echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$_procentUstrezniHeatmapRegion.'</td>';
+ echo '<td class="cell_value">'.$_procentUstrezniHeatmapRegion.'</td>';
//6. stolpec - % Ustrezni - konec
}
@@ -7870,27 +8251,29 @@ class SurveyAnalysis {
echo '</tr>';
//*********** Izris veljavnih in manjkajocih vrednosti
- if($indeks != 0) //ce ni naslovna vrsticam je potrebno dodati se dodatne poglede veljavnih in manjkajocih vrednosti
- {
+ //ce ni naslovna vrsticam je potrebno dodati se dodatne poglede veljavnih in manjkajocih vrednosti
+ if($indeks != 0){
+
echo '<tr>';
- $counter = 0;
- $options['isTextAnswer'] = false;
- $manjkajoci = $ustrezniHeatmapRegion - $validHeatmapRegion;
- $counter = self::outputSumaValidAnswerHeatmap($counter,$_sequence,$spid,$options, $validHeatmapRegion);
-
- if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
- foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
- if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki niso 0
- $counter = self::outputInvalidAnswerHeatmap($counter,$ikey,$iAnswer,$_sequence,$spid,$options, $manjkajoci);
- }
- }
- # izpišemo sumo veljavnih
- $counter = self::outputSumaInvalidAnswerHeatmap($counter,$_sequence,$spid,$options, $manjkajoci);
+
+ $counter = 0;
+ $options['isTextAnswer'] = false;
+ $manjkajoci = $ustrezniHeatmapRegion - $validHeatmapRegion;
+ $counter = self::outputSumaValidAnswerHeatmap($counter,$_sequence,$spid,$options, $validHeatmapRegion);
+
+ if (count(self::$_FREQUENCYS[$_sequence]['invalid'])> 0 ) {
+ foreach (self::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
+ if ($iAnswer['cnt'] > 0 ) { # izpisujemo samo tiste ki niso 0
+ $counter = self::outputInvalidAnswerHeatmap($counter,$ikey,$iAnswer,$_sequence,$spid,$options, $manjkajoci);
+ }
}
- #izpišemo še skupno sumo
- $counter = self::outputSumaHeatmap($counter,$_sequence,$spid,$options, $ustrezniHeatmapRegion);
+ # izpišemo sumo veljavnih
+ $counter = self::outputSumaInvalidAnswerHeatmap($counter,$_sequence,$spid,$options, $manjkajoci);
+ }
+ #izpišemo še skupno sumo
+ $counter = self::outputSumaHeatmap($counter,$_sequence,$spid,$options, $ustrezniHeatmapRegion);
+
echo '</tr>';
- $veljavnaSkupnaFreq = 0;
}
//*********** Izris veljavnih in manjkajocih vrednosti - konec
@@ -7904,7 +8287,7 @@ class SurveyAnalysis {
echo '</table>';
# izpišemo še tekstovne odgovore za polja drugo
- if (count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
+ if (is_countable($_answersOther) && count($_answersOther) > 0 && self::$_FILTRED_OTHER) {
foreach ($_answersOther AS $oAnswers) {
echo '<div class="div_other_text">';
self::outputOtherAnswers($oAnswers);
@@ -7914,7 +8297,6 @@ class SurveyAnalysis {
if (self :: $show_spid_div == true) {
echo '</div>';
- echo '<br/>';
}
}
@@ -7925,17 +8307,7 @@ class SurveyAnalysis {
{
$_variables_count = count($grid['variables']);
if ($_variables_count > 0)
- {
- # preštejemo max vrstic na grupo
- $_max_i = 0;
- //$numObmocij = 0;
- foreach ($grid['variables'] AS $vid => $variable )
- {
- $_sequence = $variable['sequence']; # id kolone z podatki
- $_max_i = max($_max_i,min($num_show_records,self::$_FREQUENCYS[$_sequence]['validCnt']));
- //$numObmocij++;
- }
-
+ {
$indeksZaObmocja = 0;
foreach ($grid['variables'] AS $vid => $variable )
{
@@ -8023,28 +8395,20 @@ class SurveyAnalysis {
}
static function HeatmapRegionPresence($spremenljivkaGrids, $spid, $_valid_answers){
+
$HeatmapRegionPresence = false;
- foreach ($spremenljivkaGrids AS $gid => $grid)
- {
+
+ foreach ($spremenljivkaGrids AS $gid => $grid){
+
$_variables_count = count($grid['variables']);
- if ($_variables_count > 0)
- {
- # preštejemo max vrstic na grupo
- $_max_i = 0;
- //$numObmocij = 0;
- foreach ($grid['variables'] AS $vid => $variable )
- {
- $_sequence = $variable['sequence']; # id kolone z podatki
- $_max_i = max($_max_i,min($num_show_records,self::$_FREQUENCYS[$_sequence]['validCnt']));
- //$numObmocij++;
- }
-
+
+ if ($_variables_count > 0){
+
$indeksZaObmocja = 0;
- foreach ($grid['variables'] AS $vid => $variable )
- {
+ foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- if ($variable['other'] != true)
- {
+
+ if ($variable['other'] != true){
if (count($_valid_answers) > 0) {
foreach ($_valid_answers AS $answer) {
@@ -8057,11 +8421,10 @@ class SurveyAnalysis {
}
}
}
-
- }
-
+ }
}
}
+
return $HeatmapRegionPresence;
}
@@ -8070,48 +8433,39 @@ class SurveyAnalysis {
$stdevCoordsArray = array();
$minCoords = 0;
$maxCoords = 0;
- foreach ($spremenljivkaGrids AS $gid => $grid)
- {
+
+ foreach ($spremenljivkaGrids AS $gid => $grid){
+
$_variables_count = count($grid['variables']);
- if ($_variables_count > 0)
- {
- # preštejemo max vrstic na grupo
- $_max_i = 0;
- //$numObmocij = 0;
- foreach ($grid['variables'] AS $vid => $variable )
- {
- $_sequence = $variable['sequence']; # id kolone z podatki
- $_max_i = max($_max_i,min($num_show_records,self::$_FREQUENCYS[$_sequence]['validCnt']));
- //$numObmocij++;
- }
+
+ if ($_variables_count > 0){
$indeksZaObmocja = 0;
- foreach ($grid['variables'] AS $vid => $variable )
- {
+
+ foreach ($grid['variables'] AS $vid => $variable ){
+
$_sequence = $variable['sequence']; # id kolone z podatki
- if ($variable['other'] != true)
- {
- #$_valid_cnt = count(self::$_FREQUENCYS[$_sequence]['valid']);
+
+ if ($variable['other'] != true){
if (count($_valid_answers) > 0) {
foreach ($_valid_answers AS $answer) {
$_ans = $answer[$_sequence];
- if ($_ans != null && $_ans != '' && $_ans >= 0 && $indeksZaObmocja < count($_valid_answers))
- {
- //$validHeatmapRegion = $validHeatmapRegion + $_ans;
- //echo '<td>'.$_ans.'</td>';
+
+ if ($_ans != null && $_ans != '' && $_ans >= 0 && $indeksZaObmocja < count($_valid_answers)){
+
$_ans = substr($_ans, 4); //odstrani <br> iz zacetka koordinat
$coordinates = explode('<br>',$_ans);
+
foreach($coordinates AS $key => $coordinate){
$coordinate = explode(',',$coordinate);
foreach($coordinate AS $coordskey => $subcoords)
{
- if($coords == 'x' && ($coordskey == 0 || $coordskey%2 == 0) )
- {
+ if($coords == 'x' && ($coordskey == 0 || $coordskey%2 == 0) ){
array_push($stdevCoordsArray, $subcoords);
- }else if($coords == 'y' && ($coordskey != 0 || $coordskey%2 != 0) )
- {
+ }
+ else if($coords == 'y' && ($coordskey != 0 || $coordskey%2 != 0) ){
array_push($stdevCoordsArray, $subcoords);
}
}
@@ -8122,6 +8476,7 @@ class SurveyAnalysis {
echo '&nbsp;';
}
}
+
$indeksZaObmocja++;
}
}