summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/surveyAnalysis
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/surveyAnalysis')
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyAnalysis.php6443
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php570
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php88
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyBreak.php783
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyChart.php1125
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyCrosstabs.php977
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyEditsAnalysis.php24
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyMeans.php368
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyMultiCrosstabs.php363
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyTTest.php309
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php229
11 files changed, 5982 insertions, 5297 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++;
}
}
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php
index 6d937c5..cc5237e 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php
@@ -21,9 +21,17 @@
*/
-define("SAA_FOLDER", "AnalysisArchive");
+if(!defined("SAA_FOLDER")) define("SAA_FOLDER", "AnalysisArchive");
+
define("DEFAULT_DURATION", " +3 month"); // privzet čas trajanja athiva
+define("M_ANALIZA_SUMS", "sums");
+define("M_ANALIZA_DESCRIPTOR", "descriptor");
+define("M_ANALIZA_FREQUENCY", "frequency");
+define("M_ANALIZA_CROSSTAB", "crosstabs");
+define("M_ANALIZA_STATISTICS", "statistics");
+
+
class SurveyAnalysisArchive {
@@ -32,7 +40,7 @@ class SurveyAnalysisArchive {
// konstrutor
protected function __construct() {}
// kloniranje
- final private function __clone() {}
+ private function __clone() {}
/**
* Inicializacija
@@ -78,7 +86,9 @@ class SurveyAnalysisArchive {
'edit' => true #stolpec spreminajl
);
+
$ArchiveTypes = array(M_ANALIZA_SUMS => 0, M_ANALIZA_DESCRIPTOR=>1, M_ANALIZA_FREQUENCY=>2, M_ANALIZA_CROSSTAB=>3, M_ANALYSIS_MEANS=>4, M_ANALYSIS_TTEST=>5, M_ANALYSIS_BREAK=>6, M_ANALYSIS_CHARTS=>7, M_ANALYSIS_CREPORT=>8);
+
#ponastavimo želene vrednosti
foreach ($fields AS $key => $value) {
$defaultFields[$key] = $value;
@@ -86,7 +96,7 @@ class SurveyAnalysisArchive {
$users = array();
$qry = "SELECT saa.*, UNIX_TIMESTAMP(saa.date) as insert_date, UNIX_TIMESTAMP(saa.duration) as duration_d, DATEDIFF(saa.duration, CURDATE()) as days_left"
- # da ne delamo vlkege poizvedbe kadar ni potrebno
+ # da ne delamo velike poizvedbe, kadar ni potrebno
. ($defaultFields['insert'] ? " , us1.name as iname, us1.surname as isurname, us1.email as iemail " : "" )
. ($defaultFields['edit'] ? " , us2.name as ename, us2.surname as esurname, us2.email as eemail " : "" )
. " FROM srv_analysis_archive as saa "
@@ -96,73 +106,68 @@ class SurveyAnalysisArchive {
$s = sisplet_query($qry);
if (mysqli_num_rows($s) > 0 ) {
-
- if($defaultFields['create_new']){
+
echo '<fieldset>';
echo '<legend>'.$lang['srv_archive_analysis'].'</legend>';
- echo $lang['srv_analiza_archive_generate_quick'];
-
- echo '</fieldset>';
+ echo '<p>'.$lang['srv_analiza_archive_note1'].'</p>';
+ echo '<p class="top16 bottom16">'.$lang['srv_analiza_archive_generate_quick'].'</p>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" type="button" onclick="doArchiveAnaliza();">'.$lang['srv_analiza_archive_generate_quick_button'].'</button>';
+ echo '</div>';
+
+ echo '<p class="bold">'.$lang['srv_analiza_archive_list'].'</p>';
+
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
+
+ echo '<table>';
+ echo '<tr>';
- echo '<br />';
- }
+ //Stolpec za ikone - prazen header
+ echo '<th></th>';
- echo '<table class="arch_tbl anl_bt anl_bl" style="width:100%">';
- echo '<tr>';
- if ($defaultFields['delete'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_delete'].'</td>';
- if ($defaultFields['edit'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_edit'].'</td>';
- if ($defaultFields['email'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_send'].'</td>';
if ($defaultFields['name'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_name'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_name'].'</th>';
if ($defaultFields['note'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_note'].'</td>';
- if ($defaultFields['access'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_access'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_note'].'</th>';
if ($defaultFields['type'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_type'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_type'].'</th>';
if ($defaultFields['date'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_date'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_date'].'</th>';
if ($defaultFields['duration'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_duration'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_duration'].'</th>';
if ($defaultFields['insert'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_author'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_author'].'</th>';
if ($defaultFields['edit'])
- echo '<td class="anl_bck gray anl_bb anl_br anl_ac">'.$lang['srv_analiza_archive_lbl_editor'].'</td>';
+ echo '<th>'.$lang['srv_analiza_archive_lbl_editor'].'</th>';
+ if ($defaultFields['access'])
+ echo '<th>'.$lang['srv_analiza_archive_lbl_access'].'</th>';
+
echo '</tr>';
while ($row = mysqli_fetch_assoc($s)) {
echo '<tr id="AnalysisArchiveRow_'.$row['id'].'">';
- if ($defaultFields['delete']) {
- echo '<td class="anl_bb anl_br anl_ac">';
- echo '<span>';
- echo '<a href="/" onclick="AnalysisArchiveDelete(\'' . $row['id'] . '\'); return false;" title="">';
- echo '<img src="img_0/delete_red.png" alt="" />';
- echo '</a>';
- echo '</span>';
- echo '</td>';
- }
- if ($defaultFields['edit']) {
- echo '<td class="anl_bb anl_br anl_ac">';
- echo '<span>';
- echo '<a href="/" onclick="AnalysisArchiveEdit(\'' . $row['id'] . '\'); return false;" title="">';
- echo '<img src="img_0/edit.png" alt="" />';
- echo '</a>';
- echo '</span>';
- echo '</td>';
- }
- if ($defaultFields['email']) {
- echo '<td class="anl_bb anl_br anl_ac">';
- echo '<span>';
- echo '<a href="/" onclick="emailArchiveAnaliza(\'' . $row['id'] . '\'); return false;" title="">';
- echo '<img src="icons/icons/email_link.png" alt="" />';
- echo '</a>';
- echo '</span>';
- echo '</td>';
- }
+
+ //Stolpec za ikone - vrstice
+ echo '<td>';
+ echo '<div class="icon_holder multiple">';
+
+ echo '<span class="faicon open_icon blue aslink" onclick="window.open(\''.$site_url.'admin/survey/AnalysisArchive.php?anketa='.self::$sid.'&aid='. $row['id']. '\', \'_blank\'); return false;"></span>';
+
+ if ($defaultFields['email'])
+ echo '<span class="faicon fa-share-alt blue aslink" onclick="emailArchiveAnaliza(\'' . $row['id'] . '\'); return false;"></span>';
+ if ($defaultFields['edit'])
+ echo '<span class="faicon edit blue aslink" onclick="AnalysisArchiveEdit(\'' . $row['id'] . '\'); return false;"></span>';
+ if ($defaultFields['delete'])
+ echo '<span class="faicon trash empty blue aslink" onclick="AnalysisArchiveDelete(\'' . $row['id'] . '\'); return false;"></span>';
+
+ echo '</div>';
+ echo '</td>';
+
+
+
if ($defaultFields['name']) {
echo '<td class="anl_bb anl_br">';
echo '<span>';
@@ -180,9 +185,6 @@ class SurveyAnalysisArchive {
if ($defaultFields['note']) {
echo '<td class="anl_bb anl_br">'.$row['note'].'</td>';
}
- if ($defaultFields['access']) {
- echo '<td class="anl_bb anl_br">'.$lang['srv_analiza_arhiviraj_access_'.$row['access']].'</td>';
- }
if ($defaultFields['type']) {
$key = $lang['srv_analiza_arhiviraj_type_'.$row['type']];
echo '<td class="anl_bb anl_br anl_ac">'.$key.'</td>';
@@ -212,17 +214,30 @@ class SurveyAnalysisArchive {
echo $row['eemail'];
echo '</td>';
}
+ if ($defaultFields['access']) {
+ echo '<td class="anl_bb anl_br">'.$lang['srv_analiza_arhiviraj_access_'.$row['access']].'</td>';
+ }
echo '</tr>';
}
echo '</table>';
+
+ echo '</div>';
+ echo '</div>';
+
+ echo '</fieldset>';
+
}
else {
echo '<fieldset>';
echo '<legend>'.$lang['srv_archive_analysis'].'</legend>';
- echo $lang['srv_analiza_archive_note_no_archive'];
- echo '<br/><br/>';
- echo $lang['srv_analiza_archive_generate_quick'];
+ echo '<p class="bold bottom16">'.$lang['srv_analiza_archive_note_no_archive'].'</p>';
+ echo '<p>'.$lang['srv_analiza_archive_note1'].'</p>';
+ echo '<p class="top16 bottom16">'.$lang['srv_analiza_archive_generate_quick'].'</p>';
+
+ echo '<div class="button_holder bottom0">';
+ echo '<button class="medium blue" type="button" onclick="doArchiveAnaliza();">'.$lang['srv_analiza_archive_generate_quick_button'].'</button>';
+ echo '</div>';
echo '</fieldset>';
}
@@ -297,7 +312,7 @@ class SurveyAnalysisArchive {
$text .= $creport_title;
}
else{
- $text .= $lang['srv_analiza_archive_title'].$lang['srv_analiza_arhiviraj_type_'.$type];
+ $text .= $lang['srv_analiza_archive_title'].($type!==null?$lang['srv_analiza_arhiviraj_type_'.$type]:'');
}
$text .= ($survey_hide_title == 1) ? '</h2>' : '</h3>';
@@ -317,98 +332,129 @@ class SurveyAnalysisArchive {
static function DisplayDoArchive() {
global $lang, $site_url;
- echo '<div id="div_analiza_archive_name" class="divPopUp">'."\n";
+ echo '<div id="div_analiza_archive_name" class="divPopUp">';
echo '<div class="popup_close"><a href="#" onClick="cancleArchiveAnaliza(); return false;">✕</a></div>';
- echo '<h2>'.$lang['srv_analiza_arhiv'].'</h2>';
-
- echo $lang['srv_analiza_arhiviraj_ime'];
- echo ':&nbsp;<input id="newAnalysisArchiveName" name="newAnalysisArchiveName" type="text" size="60" />'."\n";
+ echo '<h2><span class="faicon arhiv blue"></span>'.$lang['srv_analiza_archive_generate_quick_button'].'</h2>';
- echo '<br class="clr" />';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_arhiviraj_ime'].':</span>';
+ echo '<input id="newAnalysisArchiveName" class="text large" name="newAnalysisArchiveName" type="text"/>';
+ echo '</div>';
- echo '<div>';
- echo $lang['srv_analiza_archive_note'].':';
- echo '<textarea name="newAnalysisArchiveNote" id="newAnalysisArchiveNote" style="height:50px; width:100%"></textarea>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_archive_note'].':</span>';
+ echo '<textarea class="textarea" name="newAnalysisArchiveNote" id="newAnalysisArchiveNote"></textarea>';
echo '</div>';
- echo '<br class="clr" />';
- echo '<div>';
+
+ echo '<div class="alaysis_archive_wrap">';
// dostop
- echo '<div class="floatLeft">';
- echo $lang['srv_analiza_archive_access'].':';
- echo '<br/><input type="radio" name="newAnalysisArchiveAccess" value="0" checked="true" onchange="toggleAnalysisArchiveAccessPassword();"/>&nbsp;'.$lang['srv_analiza_archive_access_all'];
- echo '<br/><input type="radio" name="newAnalysisArchiveAccess" value="1" onchange="toggleAnalysisArchiveAccessPassword();"/>&nbsp;'.$lang['srv_analiza_archive_access_admins'];
- echo '<br/><input type="radio" name="newAnalysisArchiveAccess" value="2" onchange="toggleAnalysisArchiveAccessPassword();"/>&nbsp;'.$lang['srv_analiza_archive_access_password'];
- echo '<br/><div id="newAnalysisArchiveAccessPasswordDiv" style="visibility: hidden;">'.$lang['srv_analiza_archive_access_password_label'].'<input type="text" name="newAnalysisArchiveAccessPassword" id="newAnalysisArchiveAccessPassword" maxlength="25" />';
- echo '</div></div>';
- echo '<div class="floatLeft anl_w110" >&nbsp;</div>';
-
+ echo '<div class="alaysis_archive_left">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_archive_access'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="newAnalysisArchiveAccess0" name="newAnalysisArchiveAccess" value="0" checked="true" onchange="toggleAnalysisArchiveAccessPassword();"/>';
+ echo '<label for="newAnalysisArchiveAccess0">'.$lang['srv_analiza_archive_access_all'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="newAnalysisArchiveAccess1" name="newAnalysisArchiveAccess" value="1" onchange="toggleAnalysisArchiveAccessPassword();"/>';
+ echo '<label for="newAnalysisArchiveAccess1">'.$lang['srv_analiza_archive_access_admins'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="newAnalysisArchiveAccess2" name="newAnalysisArchiveAccess" value="2" onchange="toggleAnalysisArchiveAccessPassword();"/>';
+ echo '<label for="newAnalysisArchiveAccess2">'.$lang['srv_analiza_archive_access_password'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item indent" id="newAnalysisArchiveAccessPasswordDiv">';
+ echo $lang['srv_analiza_archive_access_password_label'].':';
+ echo '<input type="text" class="text large" name="newAnalysisArchiveAccessPassword" id="newAnalysisArchiveAccessPassword" maxlength="25" />';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>'; //left
+
// trajanje
- echo '<div class="floatLeft">';
- echo $lang['srv_analiza_archive_duration'].':';
- echo '<br/>';
+ echo '<div class="alaysis_archive_right">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_archive_duration'].':</span>';
+
$date = date("Y-m-d");// current date
$duration = strtotime(date("Y-m-d", strtotime($date)) . " +3 month");
$duration = date("d.m.Y",$duration);
+
+ echo '<div class="setting_item">';
echo '<input type="radio" name="newAADurationType" id="newAADurationFixed" value="0" checked="true" />';
+ echo '<label for="newAADurationFixed">';
printf ($lang['srv_analiza_archive_duration_default'], $duration);
- echo '<br/>';
- echo '<input type="radio" name="newAADurationType" id="newAADurationUser" value="1" />'.$lang['srv_analiza_archive_duration_custom'].'&nbsp;<input id="newAnalysisArchiveDuration" type="text" name="newAnalysisArchiveDuration" value="' . $duration . '" disabled/>
- <span class="faicon calendar_icon icon-as_link" id="duration_img"></span>
- <script type="text/javascript">
- Calendar.setup({
- inputField : "newAnalysisArchiveDuration",
- ifFormat : "%d.%m.%Y",
- button : "duration_img",
- singleClick : true
- });
- </script>
- ';
- echo '<br/>';
- echo '<input type="radio" name="newAADurationType" id="newAADurationPermanent" value="2" />'.$lang['srv_permanent_archive'];
+ echo '</label>';
echo '</div>';
-
- echo '<div class="clr"></div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="newAADurationType" id="newAADurationUser" value="1" />';
+ echo '<label for="newAADurationUser">'.$lang['srv_analiza_archive_duration_custom'].'</label>';
+ echo '<input id="newAnalysisArchiveDuration" class="text medium" type="text" name="newAnalysisArchiveDuration" value="' . $duration . '" readonly/>';
+ echo '<span class="faicon calendar_icon blue pointer" id="duration_img"></span>
+ <script type="text/javascript">
+ Calendar.setup({
+ inputField : "newAnalysisArchiveDuration",
+ ifFormat : "%d.%m.%Y",
+ button : "duration_img",
+ singleClick : true
+ });
+ </script>
+ ';
echo '</div>';
-
- echo '<div class="div_curent_archives">'."\n";
- echo $lang['srv_analiza_current_archives'];
- if (true) {
- self :: ListArchive(array('create_new'=>false, 'delete'=>false, 'edit'=>false, 'email'=>false, 'access'=>false, 'note'=>false, 'type'=>true, 'access'=>false, 'name_link'=>true,'duration'=>false, 'insert'=>true, 'edit'=>false));
- #self :: ListArchive(array('delete'=>false, 'edit'=>false, 'email'=>false, 'access'=>false, 'note'=>false, 'type'=>false, 'access'=>false, 'name_link'=>true, 'duration'=>false, 'insert'=>false, 'edit'=>false));
- } else {
- echo $lang['srv_analiza_no_current_archives'];
- }
-
- echo '</div>'."\n"; // end: div_curent_archives
-
-
- if ($_GET['podstran'] == M_ANALYSIS_CROSSTAB || $_POST['podstran'] == M_ANALYSIS_CROSSTAB) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveCrosstabs(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- } else if ($_GET['podstran'] == M_ANALYSIS_MEANS || $_POST['podstran'] == M_ANALYSIS_MEANS) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveMeans(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- } else if ($_GET['podstran'] == M_ANALYSIS_TTEST || $_POST['podstran'] == M_ANALYSIS_TTEST) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveTTest(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- } else if ($_GET['podstran'] == M_ANALYSIS_BREAK || $_POST['podstran'] == M_ANALYSIS_BREAK) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveBreak(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- } else if ($_GET['podstran'] == M_ANALYSIS_CHARTS || $_POST['podstran'] == M_ANALYSIS_CHARTS) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveChart(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- } else if ($_GET['podstran'] == M_ANALYSIS_CREPORT || $_POST['podstran'] == M_ANALYSIS_CREPORT) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveCReport(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- } else {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_create'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="submitArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_create'].'</span></a></span></span>'."\n";
- }
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_cancle'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="cancleArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_cancle'].'</span></a></span></span>'."\n";
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="newAADurationType" id="newAADurationPermanent" value="2" />';
+ echo '<label for="newAADurationPermanent">'.$lang['srv_permanent_archive'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</div>'; //right
- echo '</div>'."\n"; // end div_analiza_archive_name
+ echo '</div>'; //wrap
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" title="'.$lang['srv_analiza_arhiviraj_cancle'].'" onClick="cancleArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</button>';
+
+ $action = '';
+
+ if(isset($_GET['podstran'])){
+ if ($_GET['podstran'] == M_ANALYSIS_CROSSTAB || $_POST['podstran'] == M_ANALYSIS_CROSSTAB) {
+ $action = 'submitArchiveCrosstabs();';
+ } else if ($_GET['podstran'] == M_ANALYSIS_MEANS || $_POST['podstran'] == M_ANALYSIS_MEANS) {
+ $action = 'submitArchiveMeans();';
+ } else if ($_GET['podstran'] == M_ANALYSIS_TTEST || $_POST['podstran'] == M_ANALYSIS_TTEST) {
+ $action = 'submitArchiveTTest();';
+ } else if ($_GET['podstran'] == M_ANALYSIS_BREAK || $_POST['podstran'] == M_ANALYSIS_BREAK) {
+ $action = 'submitArchiveBreak();';
+ } else if ($_GET['podstran'] == M_ANALYSIS_CHARTS || $_POST['podstran'] == M_ANALYSIS_CHARTS) {
+ $action = 'submitArchiveChart();';
+ } else if ($_GET['podstran'] == M_ANALYSIS_CREPORT || $_POST['podstran'] == M_ANALYSIS_CREPORT) {
+ $action = 'submitArchiveCReport();';
+ } else {
+ $action = 'submitArchiveAnaliza();';
+ }
+ }
+ else {
+ $action = 'submitArchiveAnaliza();';
+ }
+
+ echo '<button class="medium blue" title="'.$lang['srv_analiza_arhiviraj_create'].'" onclick="'.$action.' return false;">'.$lang['srv_analiza_arhiviraj_create'].'</button>';
+
+ echo '</div>';
+
+ echo '</div>'; // end div_analiza_archive_name
}
static function DisplayCreatedArchive($aid=null, $name) {
global $lang, $site_url;
- echo '<div id="div_analiza_archive_name" class="divPopUp">'."\n";
+ echo '<div id="div_analiza_archive_name" class="divPopUp">';
echo '<div class="popup_close"><a href="#" onClick="closeArchiveAnaliza(); return false;">✕</a></div>';
@@ -416,39 +462,29 @@ class SurveyAnalysisArchive {
$CAE = self::CheckArchiveExistance($aid);
if ( $CAE > 0) {
- echo '<div>';
+ echo '<p class="bottom16">';
printf( $lang['srv_analiza_arhiviraj_success'],$name);
- echo '</div>';
- echo '<br/>';
+ echo '</p>';
- echo '<div>';
+ $archive_link = $site_url.'admin/survey/AnalysisArchive.php?anketa='.self::$sid.'&aid='. $aid;
+
+ echo '<p>';
echo $lang['srv_analiza_arhiviraj_success_note'];
- echo '<br/>';
- echo '<span>';
- echo '<a href="'.$site_url.'admin/survey/AnalysisArchive.php?anketa='.self::$sid.'&aid='. $aid . '" target="_blank" title="">';
- echo $site_url.'admin/survey/AnalysisArchive.php?anketa='.self::$sid.'&aid='. $aid;
+ echo ': <a href="'.$site_url.'admin/survey/AnalysisArchive.php?anketa='.self::$sid.'&aid='. $aid . '" target="_blank" title="">';
+ echo $archive_link;
echo '</a>';
- echo '</span>';
+ echo '<span class="faicon copy empty pointer blue link-left" onClick="CopyToClipboard(\''.$archive_link.'\'); actionNotePopup(\'text_copied\', \'success\');"></span>';
+ echo '</p>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" title="'.$lang['srv_analiza_arhiviraj_close'].'" onClick="closeArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_close'].'</button>';
+ //echo '<button class="medium blue" title="'.$lang['srv_analiza_arhiviraj_send_mail'].'" onclick="emailArchiveAnaliza(\''.$aid.'\'); return false;">'.$lang['srv_analiza_arhiviraj_send_mail'].'</button>';
echo '</div>';
-
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_close'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="closeArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_close'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_send_mail'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="emailArchiveAnaliza(\''.$aid.'\'); return false;" ><span><img src="icons/icons/email_link.png" alt="" /> '.$lang['srv_analiza_arhiviraj_send_mail'].'</span></a></span></span>'."\n";
} else {
self::DisplayError($CAE);
}
-
- # seznam arhivov
- echo '<br class="clr" />';
- echo '<div class="div_curent_archives">'."\n";
- echo $lang['srv_analiza_current_archives'];
- if (true) {
- self :: ListArchive(array('delete'=>false, 'edit'=>false, 'email'=>false, 'access'=>false, 'note'=>false, 'type'=>true, 'access'=>false, 'name_link'=>true,'duration'=>false, 'insert'=>true, 'edit'=>false));
- } else {
- echo $lang['srv_analiza_no_current_archives'];
- }
- echo '</div>'."\n"; // end: div_curent_archives
- echo '</div>'."\n"; // end div_analiza_archive_name
+ echo '</div>'; // end div_analiza_archive_name
}
static function EmailArchive($aid) {
@@ -458,63 +494,74 @@ class SurveyAnalysisArchive {
echo '<div class="popup_close"><a href="#" onClick="cancleArchiveAnaliza(); return false;">✕</a></div>';
- echo '<h2>'.$lang['srv_analiza_arhiv'].'</h2>';
+ echo '<h2>'.$lang['srv_export_hover_archive_mail'].'</h2>';
# preverimo obstoj datoteke, in dostop
$CAE = self::CheckArchiveExistance($aid);
if ( $CAE > 0) {
# vsebina emaila in naslovi
- echo '<div id="div_archives_email_left">'."\n";
-
- echo '<p>'.$lang['srv_analiza_archive_message_note'].'</p>';
-
- echo '<div ><label for="email_archive_list">'.$lang['srv_analiza_archive_message_emails'].':</label>'."\n";
- echo '<textarea name="email_archive_list" rows="4" id="email_archive_list" ></textarea>'."\n";
- echo '</div>';
-
- echo '<br>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="email_archive_list">'.$lang['srv_analiza_archive_message_emails'].'</label>';
+ echo '<textarea class="textarea email" name="email_archive_list" id="email_archive_list" ></textarea>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="subject">' . $lang['srv_inv_archive_subject_text'] . ': </label>';
+ echo '<input type="text" class="text large wauto" name="email_archive_subject" id="email_archive_subject" value="'.$lang['srv_analiza_arhiviraj_mail_subject'].'"/>';
+ echo '</div>';
- echo '<div class="anl_dash_bt">';
- echo '<br/><label for="subject">' . $lang['subject'] . ': </label>';
- echo '<input type="text" name="email_archive_subject" id="email_archive_subject" value="'.$lang['srv_analiza_arhiviraj_mail_subject'].'" size="90"/></p>';
- echo '<p><label for="email_archive_text">' . $lang['text'] . ':</label>'."\n";
+ echo '<labelfor="email_archive_text">' . $lang['message'] . ':</label>';
+
+ echo '<div id="div_archives_email_wrap">';
+ echo '<div id="div_archives_email_left">';
$signature = Common::getEmailSignature();
echo '<textarea name="email_archive_text" id="email_archive_text" rows="2" >' . nl2br($lang['srv_analiza_arhiviraj_mail_text'].$signature). '</textarea>'."\n";
- echo '</div>';
+
echo '<script type="text/javascript">'."\n";
echo 'if ($("#email_archive_text")) {'."\n";
echo ' create_editor(\'email_archive_text\', false);'."\n";
echo '}'."\n";
echo '</script>'."\n";
-
- echo '</div>'."\n";
- #gumbi
+
+ echo '</div>'; #left
+
echo '<div id="div_archives_email_right" >'."\n";
+
+ //Navodila
+ echo '<div class="message_instructions">';
+
+ echo '<p class="bold caps bottom32">'.$lang['srv_alert_instruction1'].'</p>';
+ echo '<p class="bottom32">'.$lang['srv_alert_instruction1c'].'</p>';
- echo '<div id="div_archives_email_buttons">';
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_do_send_mail'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="sendEmailArchiveAnaliza(\''.$aid.'\'); return false;"><span>'.$lang['srv_analiza_arhiviraj_do_send_mail'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_close'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="cancleArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_close'].'</span></a></span></span>'."\n";
- echo '<br class="clr" />';
+ echo '<div class="sistemske">';
+ echo '<p>'.$lang['srv_alert_instruction_link_archive'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_URL_archive'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_name_archive'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_survey'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_date'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_site'].'</p>';
echo '</div>';
- echo '<div id="div_error">';
- # navodila
- echo $lang['srv_analiza_arhiviraj_mail_note_0'];
- echo '</div>';
- echo '<br/>';
- echo '<br/>';
- echo '<div id="div_error">';
- # navodila
- echo $lang['srv_analiza_arhiviraj_mail_note_1'];
+
echo '</div>';
+
+ echo '</div>'; //right
+
+ echo '</div>'; //wrap
+
+ #gumbi
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="cancleArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_close'].'</button>';
+ echo '<button class="medium blue" onclick="sendEmailArchiveAnaliza(\''.$aid.'\'); return false;">'.$lang['srv_analiza_arhiviraj_do_send_mail'].'</button>';
echo '</div>';
- echo '<br class="clr" />';
+
} else {
self::DisplayError($CAE);
}
- echo '</div>'."\n"; // end div_analiza_archive_name
+ echo '</div>'; // end div_analiza_archive_name
}
static function SendEmailArchive($aid = null, $subject, $text, $emails) {
@@ -524,7 +571,7 @@ class SurveyAnalysisArchive {
echo '<div class="popup_close"><a href="#" onClick="cancleArchiveAnaliza(); return false;">✕</a></div>';
- echo '<h2>'.$lang['srv_analiza_arhiv'].'</h2>';
+ echo '<h2>'.$lang['srv_export_hover_archive_mail'].'</h2>';
$CAE = self::CheckArchiveExistance($aid);
if ( $CAE > 0) {
@@ -625,19 +672,21 @@ class SurveyAnalysisArchive {
echo 'Pri pošiljanju e-mailov je prišlo do napake!';
}
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_close'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="cancleArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_close'].'</span></a></span></span>'."\n";
- echo '<br class="clr" />';
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" onclick="closeArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_close'].'</button>';
+ echo '</div>';
+
} else {
self::DisplayError($CAE);
}
- echo '</div>'."\n"; // end div_analiza_archive_name
+ echo '</div>'; // end div_analiza_archive_name
}
static function EditArchive($aid) {
global $lang, $site_url, $site_path, $global_user_id;
- echo '<div id="div_analiza_archive_name" class="divPopUp">'."\n";
+ echo '<div id="div_analiza_archive_name" class="divPopUp PopUpNarrow">'."\n";
echo '<div class="popup_close"><a href="#" onClick="cancleArchiveAnaliza(); return false;">✕</a></div>';
@@ -649,31 +698,53 @@ class SurveyAnalysisArchive {
$s = sisplet_query("SELECT *, UNIX_TIMESTAMP(duration) as duration_d FROM srv_analysis_archive WHERE id='".$aid."' AND sid='".self::$sid."'");
$row = mysqli_fetch_assoc($s);
- echo $lang['srv_analiza_arhiviraj_ime'];
- echo ':&nbsp;<input id="newAnalysisArchiveName" name="newAnalysisArchiveName" type="text" size="60" value="'.$row['name'].'"/>'."\n";
- echo '<br class="clr" />';
- echo '<div>';
- echo $lang['srv_analiza_archive_note'].':';
- echo '<textarea name="newAnalysisArchiveNote" id="newAnalysisArchiveNote" style="height:50px; width:100%">'.$row['note'].'</textarea>';
- echo '</div>';
- echo '<div>';
- // dostop
- echo '<div class="floatLeft">';
- echo $lang['srv_analiza_archive_access'].':';
- echo '<br/><input type="radio" name="newAnalysisArchiveAccess" value="0"'.((int)$row['access'] == 0 ? ' checked="true"' : '').' onchange="toggleAnalysisArchiveAccessPassword();"/>&nbsp;'.$lang['srv_analiza_archive_access_all'];
- echo '<br/><input type="radio" name="newAnalysisArchiveAccess" value="1"'.((int)$row['access'] == 1 ? ' checked="true"' : '').' onchange="toggleAnalysisArchiveAccessPassword();"/>&nbsp;'.$lang['srv_analiza_archive_access_admins'];
- echo '<br/><input type="radio" name="newAnalysisArchiveAccess" value="2"'.((int)$row['access'] == 2 ? ' checked="true"' : '').' onchange="toggleAnalysisArchiveAccessPassword();"/>&nbsp;'.$lang['srv_analiza_archive_access_password'];
- echo '<br/><div id="newAnalysisArchiveAccessPasswordDiv" style="visibility: '.((int)$row['access'] == 2 ? 'visible' : 'hidden').';">'.$lang['srv_analiza_archive_access_password_label'].'<input type="text" name="newAnalysisArchiveAccessPassword" id="newAnalysisArchiveAccessPassword" maxlength="25" value="'.$row['access_password'].'"/>';
- echo '</div></div>';
-
- echo '<div class="floatLeft anl_w110" >&nbsp;</div>';
- // trajanje
- echo '<div class="floatLeft">';
- echo $lang['srv_analiza_archive_duration'].':';
- echo '<br/>';
- echo '<input id="newAnalysisArchiveDuration" type="text" name="newAnalysisArchiveDuration" value="' . date('d.m.Y',$row['duration_d']) . '" disabled/>
- <span class="faicon calendar_icon icon-as_link" id="duration_img"></span>
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_arhiviraj_ime'].':</span>';
+ echo '<input id="newAnalysisArchiveName" class="text large" name="newAnalysisArchiveName" type="text" value="'.$row['name'].'"/>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_archive_note'].':</span>';
+ echo '<textarea class="textarea" name="newAnalysisArchiveNote" id="newAnalysisArchiveNote">'.$row['note'].'</textarea>';
+ echo '</div>';
+
+ echo '<div class="alaysis_archive_wrap">';
+ // dostop
+ echo '<div class="alaysis_archive_left">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_archive_access'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="newAnalysisArchiveAccess0" name="newAnalysisArchiveAccess" value="0" '.((int)$row['access'] == 0 ? ' checked="true"' : '').' onchange="toggleAnalysisArchiveAccessPassword();"/>';
+ echo '<label for="newAnalysisArchiveAccess0">'.$lang['srv_analiza_archive_access_all'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="newAnalysisArchiveAccess1" name="newAnalysisArchiveAccess" value="1" '.((int)$row['access'] == 1 ? ' checked="true"' : '').' onchange="toggleAnalysisArchiveAccessPassword();"/>';
+ echo '<label for="newAnalysisArchiveAccess1">'.$lang['srv_analiza_archive_access_admins'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="newAnalysisArchiveAccess2" name="newAnalysisArchiveAccess" value="2" '.((int)$row['access'] == 2 ? ' checked="true"' : '').' onchange="toggleAnalysisArchiveAccessPassword();"/>';
+ echo '<label for="newAnalysisArchiveAccess2">'.$lang['srv_analiza_archive_access_password'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item indent" id="newAnalysisArchiveAccessPasswordDiv">';
+ echo $lang['srv_analiza_archive_access_password_label'].':';
+ echo '<input type="text" class="text large" name="newAnalysisArchiveAccessPassword" id="newAnalysisArchiveAccessPassword" maxlength="25" />';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>'; //left
+
+ // trajanje
+ echo '<div class="alaysis_archive_right">';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_analiza_archive_duration'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input id="newAnalysisArchiveDuration" class="text medium" type="text" name="newAnalysisArchiveDuration" value="' . date('d.m.Y',$row['duration_d']) . '" readonly/>';
+ echo '<span class="faicon calendar_icon blue pointer" id="duration_img"></span>
<script type="text/javascript">
Calendar.setup({
inputField : "newAnalysisArchiveDuration",
@@ -683,14 +754,20 @@ class SurveyAnalysisArchive {
});
</script>
';
-
- echo '</div>';
- echo '<div class="clr"></div>';
- echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ echo '</div>'; //right
+
+ echo '</div>'; //wrap
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-black" title="'.$lang['srv_analiza_arhiviraj_cancle'].'" onClick="cancleArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_close'].'</button>';
+ echo '<button class="medium blue" title="'.$lang['srv_analiza_arhiviraj_create'].'" onclick="saveArchiveAnaliza(\''.$aid.'\'); return false;">'.$lang['srv_analiza_arhiviraj_save'].'</button>';
+ echo '</div>';
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_save'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="saveArchiveAnaliza(\''.$aid.'\'); return false;"><span>'.$lang['srv_analiza_arhiviraj_save'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_close'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="cancleArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_close'].'</span></a></span></span>'."\n";
- echo '<br class="clr" />';
} else {
self::DisplayError($CAE);
}
@@ -744,7 +821,7 @@ class SurveyAnalysisArchive {
#podtki profila
$s = sisplet_query("SELECT filename, access FROM srv_analysis_archive WHERE id='".$aid."' AND sid='".self::$sid."'");
- if ($_GET['debug'] == 1) {
+ if (isset($_GET['debug'])&&$_GET['debug'] == 1) {
print_r("SELECT * FROM srv_analysis_archive WHERE id='".$aid."' AND sid='".self::$sid."'");
}
if (mysqli_num_rows($s)) {
@@ -811,10 +888,6 @@ class SurveyAnalysisArchive {
static function ViewArchive($aid) {
global $site_path, $global_user_id, $lang, $site_url;
- #izpišemo osnovni html
- $sql = sisplet_query("SELECT * FROM misc WHERE what='name'");
- $row = mysqli_fetch_array($sql);
-
// nastavimo jezik
if (self::$sid > 0) {
$sql = sisplet_query("SELECT lang_admin FROM srv_anketa WHERE id = '".self::$sid."'");
@@ -836,10 +909,10 @@ class SurveyAnalysisArchive {
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n";
echo '<head>'."\n";
- echo '<title>'.$row['value'].'</title>'."\n";
+ echo '<title>'.(isset($row['value'])?$row['value']:'').'</title>'."\n";
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
echo '<script type="text/javascript" src="script/js-lang.php?lang='.($lang_admin==1?'si':'en').'"></script>';
- if ($_GET['mode'] != 'old') {
+ if (isset($_GET['mode'])&&$_GET['mode'] != 'old') {
echo '<script type="text/javascript" src="minify/g=jsnew"></script>'."\n";
} else {
echo '<script type="text/javascript" src="minify/g=js"></script>'."\n";
@@ -933,8 +1006,9 @@ class SurveyAnalysisArchive {
echo '</div>';
if ($showButton) {
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_close'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="closeArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_close'].'</span></a></span></span>'."\n";
- echo '<br class="clr" />';
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" onclick="closeArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_close'].'</button>';
+ echo '</div>';
}
}
@@ -990,11 +1064,14 @@ class SurveyAnalysisArchive {
$CAE = self::CheckArchiveExistance($aid);
if ( $CAE > 0) {
- echo '<h2>Ali ste prepričani?</h2>';
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_delete'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="doDeleteArchiveAnaliza(\''.$aid.'\'); return false;"><span>'.$lang['srv_analiza_arhiviraj_delete'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper" title="'.$lang['srv_analiza_arhiviraj_cancle'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="cancleArchiveAnaliza(); return false;"><span>'.$lang['srv_analiza_arhiviraj_cancle'].'</span></a></span></span>'."\n";
-
- echo '<br class="clr" />';
+ echo '<h2>'.$lang['srv_analiza_archive_list_delete'].'</h2>';
+
+ echo '<p class="bottom16">'.$lang['srv_analiza_archive_list_delete_text'].'</p>';
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" title="'.$lang['srv_analiza_arhiviraj_cancle'].'" onclick="cancleArchiveAnaliza(); return false;">'.$lang['srv_analiza_arhiviraj_cancle'].'</button>';
+ echo ' <button class="medium blue" title="'.$lang['srv_analiza_arhiviraj_delete'].'" onclick="doDeleteArchiveAnaliza(\''.$aid.'\'); return false;">'.$lang['srv_analiza_arhiviraj_delete'].'</button>';
+ echo '</div>';
}
else {
#izpišemo error
@@ -1208,7 +1285,10 @@ class SurveyAnalysisArchive {
*
*/
static function createArchiveFromAnaliza() {
+
$content = null;
+ $settings = array();
+
if($_POST['podstran'] == 'charts'){
# kreiramo arhiv za grafe
$SC = new SurveyChart();
@@ -1229,13 +1309,15 @@ class SurveyAnalysisArchive {
if ($_POST['podstran'] == 'anal_arch') {
$_POST['podstran'] = 'sumarnik';
}
+
if (!isset($_POST['content'])) {
SurveyAnalysis::Init(self::$sid);
SurveyAnalysis::setUpIsForArchive(true);
SurveyAnalysis::setUpReturnAsHtml(true);
$content = SurveyAnalysis::Display();
- } else {
+ }
+ else {
$content = $_POST['content'];
}
}
@@ -1249,13 +1331,13 @@ class SurveyAnalysisArchive {
$ArchiveTypes = array(M_ANALIZA_SUMS => 0, M_ANALIZA_DESCRIPTOR=>1, M_ANALIZA_FREQUENCY=>2, M_ANALIZA_CROSSTAB=>3, M_ANALYSIS_MEANS=>4, M_ANALYSIS_TTEST=>5, M_ANALYSIS_BREAK=>6, M_ANALYSIS_CHARTS=>7, M_ANALYSIS_CREPORT=>8);
if (isset($_POST['podstran']))
- $type = $ArchiveTypes[$_POST['podstran']];
- if (isset($content) && trim($content) != null && self::$sid > 0) {
+ $type = isset($ArchiveTypes[$_POST['podstran']])?$ArchiveTypes[$_POST['podstran']]:null;
+ if (isset($content) && trim($content) != null && self::$sid > 0) {
SurveyAnalysisArchive :: Init(self::$sid);
- SurveyAnalysisArchive :: CreateArchive($content,$name,$note,$access,$type,$duration,$durationType,$settings,$access_password);
-
- } else {
+ SurveyAnalysisArchive :: CreateArchive($content,$name,$note,$access,$type,$duration,$durationType,$settings,$access_password);
+ }
+ else {
echo 'Error! (SurveyAnalysisArchive :: CreateArchive)';
}
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php
index 5c0a562..9e944a7 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php
@@ -28,9 +28,8 @@ class SurveyAnalysisHelper {
self::$anketa = $anketa;
SurveyInfo::getInstance()->SurveyInit(self::$anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- self::$db_table = '_active';
-
+
+ self::$db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
}
}
@@ -38,7 +37,7 @@ class SurveyAnalysisHelper {
global $lang;
global $global_user_id;
- if($_GET['m'] != 'analysis_creport' && $_GET['t'] != 'custom_report'){
+ if((!isset($_GET['m']) || $_GET['m'] != 'analysis_creport') && $_GET['t'] != 'custom_report'){
$creportProfile = SurveyUserSetting :: getInstance()->getSettings('default_creport_profile');
$creportProfile = isset($creportProfile) ? $creportProfile : 0;
@@ -48,15 +47,17 @@ class SurveyAnalysisHelper {
$sql = sisplet_query("SELECT id FROM srv_custom_report WHERE ank_id='".self::$anketa."' AND usr_id='".$creportAuthor."' AND type='$type' AND sub_type='$sub_type' AND spr1='$spr1' AND spr2='$spr2' AND profile='$creportProfile'");
$insert = (mysqli_num_rows($sql)) ? 0 : 1;
$id = $type.'-'.$sub_type.'-'.$spr1.'-'.$spr2;
+
// Samo zvezdica (sums, grafi, freq...)
if($type < 5)
- echo '<a href="#" title="'.($insert == 0 ? $lang['srv_custom_report_inserted_title'] : $lang['srv_custom_report_insert_title']).'" onClick="addCustomReportElement(\''.$type.'\', \''.$sub_type.'\', \''.$spr1.'\', \''.$spr2.'\', 0); return false;"><span style="margin-left: 3px;" id="'.$id.'" class="faicon pointer '.($insert == 0 ? ' star_on' : ' star_off').'"></span></a>';
+ echo '<a href="#" title="'.($insert == 0 ? $lang['srv_custom_report_inserted_title'] : $lang['srv_custom_report_insert_title']).'" onClick="addCustomReportElement(\''.$type.'\', \''.$sub_type.'\', \''.$spr1.'\', \''.$spr2.'\', 0); return false;"><span id="'.$id.'" class="faicon pointer '.($insert == 0 ? ' star_on' : ' star_off').'"></span> <div class= "icon_text star_icon">'.$lang['srv_custom_report_insert_title'].'</div></a>';
+
// Zvezdica s textom
else{
echo '<div class="custom_report_include">';
echo '<a href="#" title="'.($insert == 0 ? $lang['srv_custom_report_inserted_title'] : $lang['srv_custom_report_insert_title']).'" onClick="addCustomReportElement(\''.$type.'\', \''.$sub_type.'\', \''.$spr1.'\', \''.$spr2.'\', 1); return false;">';
- echo '<span id="'.$id.'" class="faicon pointer '.($insert == 0 ? ' star_on' : ' star_off').'"></span>';
+ echo '<span id="'.$id.'" class="faicon pointer '.($insert == 0 ? ' star_on' : ' star_off').'"> </span>';
echo '<span id="'.$id.'_insert" '.($insert == 0 ? ' style="display:none;" ' : '').'> '.$lang['srv_custom_report_insert'].'</span>';
echo '<span id="'.$id.'_inserted" '.($insert == 0 ? '' : ' style="display:none;" ').'> '.$lang['srv_custom_report_inserted'].'</span>';
echo '</a>';
@@ -69,58 +70,67 @@ class SurveyAnalysisHelper {
function displayMissingLegend(){
global $lang;
- echo '<div id="bottom_data_legend" class="floatLeft">';
- echo '<div>';
- echo '<div id="bdld1" class="as_link strong" onclick="$(\'#bottom_data_legend_detail, #bdld1, #bdld2\').toggle();"><span class="faicon plus"></span></div>';
- echo '<div id="bdld2" class="as_link strong" style="display:none" onclick="$(\'#bottom_data_legend_detail, #bdld1, #bdld2\').toggle();"><span class="faicon minus"></span></div> '.$lang['srv_bottom_data_legend_note'];
+ echo '<div id="bottom_data_legend_missing" class="legend_box">';
+
+ echo '<div class="legend_title" onclick="$(\'#bottom_data_legend_detail_missing\').toggle(\'fast\');">';
+ echo '<span class="faicon arrow2_r"></span>'.$lang['srv_bottom_data_legend_note'];
echo '</div>';
- echo '<div id="bottom_data_legend_detail" style="display:none">';
- echo '<ul>';
- echo '<li>'.$lang['srv_bottom_data_legend_note_li1'].'</li>';
- echo '<li>'.$lang['srv_bottom_data_legend_note_li2'].'</li>';
- echo '<li>'.$lang['srv_bottom_data_legend_note_li3'].'</li>';
- echo '<li>'.$lang['srv_bottom_data_legend_note_li4'].'</li>';
- echo '<li>'.$lang['srv_bottom_data_legend_note_li5'].'</li>';
- echo '<li>'.$lang['srv_bottom_data_legend_note_li0'].'</li>';
- echo '</ul>';
+
+ echo '<div id="bottom_data_legend_detail_missing" class="legend_details">';
+ echo ' <ul>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li1'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li2'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li3'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li4'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li5'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li99'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li98'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li97'].'</li>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li0'].'</li>';
+ echo ' </ul>';
echo '</div>';
+
echo '</div>';
}
function displayStatusLegend(){
global $lang;
-
- echo '<div id="bottom_data_legend" class="floatLeft bg_blue">';
- echo '<div>';
- echo '<div id="bdlds1" class="as_link strong" onclick="$(\'#bottom_data_legend_detail_status, #bdlds1, #bdlds2\').toggle();"><span class="faicon plus"></span></div>';
- echo '<div id="bdlds2" class="as_link strong" style="display:none" onclick="$(\'#bottom_data_legend_detail_status, #bdlds1, #bdlds2\').toggle();"><span class="faicon minus"></span></div> '.$lang['srv_bottom_data_legend_status_note'];
+
+ echo '<div id="bottom_data_legend_status" class="legend_box">';
+
+ echo '<div class="legend_title">';
+ echo ' <span onclick="$(\'#bottom_data_legend_detail_status\').toggle(\'fast\');"><span class="faicon arrow2_r"></span>'.$lang['srv_bottom_data_legend_status_note'].'</span>';
echo '</div>';
- echo '<div id="bottom_data_legend_detail_status" style="display:none">';
- echo '<ul>';
+
+ echo '<div id="bottom_data_legend_detail_status" class="legend_details">';
+ echo ' <ul>';
for ($i = 0; $i <= 6; $i++) {
- echo '<li>'.$i.' - '.$lang['srv_userstatus_'.$i].'</li>';
+ echo ' <li>'.$i.' - '.$lang['srv_userstatus_'.$i].'</li>';
}
- echo '<li>'.$lang['srv_bottom_data_legend_note_li0'].'</li>';
- echo '</ul>';
+ echo ' <li>'.$lang['srv_bottom_data_legend_note_li0'].'</li>';
+ echo ' </ul>';
echo '</div>';
+
echo '</div>';
}
function displayTestLegend(){
global $lang;
- echo '<div id="bottom_data_legend" class="floatLeft test">';
- echo '<div>';
- echo '<div id="bdldt1" class="as_link strong" onclick="$(\'#bottom_data_legend_detail_test, #bdldt1, #bdldt2\').toggle();"><span class="faicon plus"></span></div>';
- echo '<div id="bdldt2" class="as_link strong" style="display:none" onclick="$(\'#bottom_data_legend_detail_test, #bdldt1, #bdldt2\').toggle();"><span class="faicon minus"></span></div> '.$lang['srv_bottom_data_legend_test_note'];
+ echo '<div id="bottom_data_legend_test" class="legend_box">';
+
+ echo '<div class="legend_title">';
+ echo ' <span onclick="$(\'#bottom_data_legend_detail_test\').toggle(\'fast\');"><span class="faicon arrow2_r"></span>'.$lang['srv_bottom_data_legend_test_note'].'</span>';
echo '</div>';
- echo '<div id="bottom_data_legend_detail_test" style="display:none">';
- echo '<ul>';
- echo '<li>0 - '.$lang['srv_bottom_data_legend_test_note_li0'].'</li>';
- echo '<li>1 - '.$lang['srv_bottom_data_legend_test_note_li1'].'</li>';
- echo '<li>2 - '.$lang['srv_bottom_data_legend_test_note_li2'].'</li>';
- echo '</ul>';
+
+ echo '<div id="bottom_data_legend_detail_test" class="legend_details">';
+ echo ' <ul>';
+ echo ' <li>0 - '.$lang['srv_bottom_data_legend_test_note_li0'].'</li>';
+ echo ' <li>1 - '.$lang['srv_bottom_data_legend_test_note_li1'].'</li>';
+ echo ' <li>2 - '.$lang['srv_bottom_data_legend_test_note_li2'].'</li>';
+ echo ' </ul>';
echo '</div>';
+
echo '</div>';
}
} \ No newline at end of file
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php b/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php
index aa2a829..e510b2a 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyBreak.php
@@ -8,8 +8,8 @@
*
*/
-define("EXPORT_FOLDER", "admin/survey/SurveyData");
-define("BREAK_OPTION_LIMIT", 15);
+if(!defined("EXPORT_FOLDER"))define("EXPORT_FOLDER", "admin/survey/SurveyData");
+if(!defined("BREAK_OPTION_LIMIT"))define("BREAK_OPTION_LIMIT", 15);
class SurveyBreak
{
@@ -42,17 +42,24 @@ class SurveyBreak
private $num_digit_percent = NUM_DIGIT_PERCENT;
function __construct($sid) {
+ global $global_user_id;
+
if ((int)$sid > 0) {
+
$this->sid = $sid;
SurveyAnalysisHelper::getInstance()->Init($this->sid);
# polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->sid);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
+
+ // Pri glasovanju tega ne pustimo
+ if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
+ die();
+ }
#inicializiramo class za datoteke
$this->SDF = SurveyDataFile::get_instance();
@@ -204,16 +211,9 @@ class SurveyBreak
$SSH -> displayTestDataBar(true);
}
- /*echo '<div id="dataOnlyValid">';
- SurveyStatusProfiles::displayOnlyValidCheckbox();
- echo '</div>';*/
-
# ali prikazujemo tabele ali grafe
$this->break_charts = (isset($this->sessionData['break']['break_show_charts']) && (int)$this->sessionData['break']['break_show_charts'] == 1) ? 1 : 0;
- //$this->DisplayLinks();
- //$this->DisplayFilters();
-
echo '<div id="div_break_data">';
$this->displayData();
echo '</div>'; #id="div_break_data"
@@ -256,43 +256,58 @@ class SurveyBreak
function displayData() {
global $lang;
- echo '<div id="break_variables">';
+
$variables = $this->getVariableList(2);
-
- echo '<span id="breakSpremenljivkaSpan" class="floatLeft spaceRight">';
- echo $lang['srv_break_label1'];
- echo '<br />';
- echo '<select id="breakSpremenljivka" name="breakSpremenljivka" onchange="breakSpremenljivkaChange();" autocomplete="off">';
+
+ echo '<div id="break_variables">';
+
+ // Dropdown
+ echo '<div id="breakSpremenljivkaSpan" class="breakDropdownHolder">';
+
+ echo '<span class="title">'.$lang['srv_break_label1'].':</span>';
+
+ echo '<select id="breakSpremenljivka" name="breakSpremenljivka" class="dropdown large" onchange="breakSpremenljivkaChange();" autocomplete="off">';
echo '<option value="0" selected="selected" >'. $lang['srv_break_select1_option'] . '</option>';
if (count($variables)) {
foreach ($variables as $variable) {
- echo '<option value="'.$variable['spr_id'].'"'
- . ( isset($variable['sequence']) ? ' seq="'.$variable['sequence'].'" ' : '')
+ echo '<option value="'.(isset($variable['spr_id'])?$variable['spr_id']:'').'"'
+ . ( isset($variable['sequence']) ? ' seq="'.(isset($variable['spr_id'])?$variable['sequence']:'').'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- .($this->sessionData['break']['seq'] == $variable['sequence'] && (int)$variable['canChoose'] == 1 ? ' selected="selected"':'')
+ .(isset($this->sessionData['break']['seq'])&&isset($variable['sequence'])&&isset($variable['canChoose'])&&$this->sessionData['break']['seq'] == $variable['sequence'] && (int)$variable['canChoose'] == 1 ? ' selected="selected"':'')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
. $variable['variableNaslov'] . '</option>';
}
}
- echo '</select>'; # name="breakSpremenljivka"
- echo '</span>';
+ echo '</select>';
- echo '<span id="div_crossCheck" class="floatLeft spaceLeft" style="margin-top:14px;">' ;
+ echo '</div>';
+
+ // Dodatne nastavitve
+ echo '<div id="div_crossCheck" class="breakSubSetting">' ;
+
+ echo '<span class="title">'.$lang['settings'].':</span>';
+
+ echo '<span class="setting_line">';
$this->displayLinePercent();
- $this->displayLineCharts(); // V DELU...
- echo '</span>';
+ echo '</span>';
+
+ echo '<span class="setting_line">';
+ $this->displayLineCharts();
+ echo '</span>';
+
+ echo '</div>';
- echo '<br class="clr" />';
- echo '</div>'; # id="break_variables"
+ echo '</div>';
+
+
+ echo '<div id="breakResults">';
if (isset($this->sessionData['break']['spr']) && (int)$this->sessionData['break']['spr'] > 0
&& isset($this->sessionData['break']['seq']) && (int)$this->sessionData['break']['seq'] > 0) {
- echo '<div id="breakResults" >';
+
$this->doBreakForSpremenljivka();
- echo '</div>'; # id="breakResults"
- } else {
- echo '<div id="breakResults" />';
- }
+ }
+ echo '</div>'; # id="breakResults"
}
/** funkcija vrne seznam primern variabel za crostabe
@@ -304,7 +319,7 @@ class SurveyBreak
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($this->_HEADERS AS $skey => $spremenljivka) {
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip'])?$spremenljivka['tip']:null;
{
#drugi dropdown
# tekstovnih in numeričnih tipov ne dodajamo
@@ -410,7 +425,7 @@ class SurveyBreak
if (count($spremenljivka['grids']) == 1 ) {
# če imamo samo en grid ( lahko je več variabel zaradi polja drugo.
$grid = $spremenljivka['grids'][0];
- if (count ($grid['variables']) > 0) {
+ if (isset($grid['variables'])&&count ($grid['variables']) > 0) {
foreach ($grid['variables'] AS $vid => $variable ){
if ($variable['other'] != 1) {
$this->variablesList[] = array(
@@ -428,7 +443,7 @@ class SurveyBreak
# imamo multicheckbox
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable'])&&$grid['variable'] != '') {
$sub++;
$this->variablesList[] = array(
'tip'=>$tip,
@@ -444,7 +459,7 @@ class SurveyBreak
# imamo več gridov - tabele
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable'])&&$grid['variable'] != '') {
$sub++;
$this->variablesList[] = array(
'tip'=>$tip,
@@ -525,10 +540,10 @@ class SurveyBreak
}
}
}
+
$this->displayBreak($spr,$frequencys);
-
- } else {
- echo '<br class="clr">';
+ }
+ else {
echo '<p class="red strong">'.$lang['srv_break_error_note_1'].'</p>';
}
}
@@ -574,11 +589,8 @@ class SurveyBreak
}
function displayBreak($forSpr, $frequencys) {
-
-
+
ob_start(); // outer buffer
- # če imamo filter spremenljivk ga izpišemo
- echo '<br/>';
# če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
SurveyTimeProfiles :: printIsDefaultProfile(false);
@@ -592,13 +604,16 @@ class SurveyBreak
# filtriranje po spremenljivkah
$_FILTRED_VARIABLES = SurveyVariablesProfiles::getProfileVariables(SurveyVariablesProfiles::checkDefaultProfile(), true);
+
+
foreach ($this->_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'))) {
continue;
}
+
$spremenljivka['id'] = $skey;
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip'])?$spremenljivka['tip']:null;
if ( is_numeric($tip)
&& $tip != 4 #text
&& $tip != 5 #label
@@ -610,7 +625,8 @@ class SurveyBreak
) {
$this->displayBreakSpremenljivka($forSpr,$frequencys,$spremenljivka);
- } else if ( is_numeric($tip)
+ }
+ else if ( is_numeric($tip)
&& (
$tip == 4 #text
|| $tip == 19 #multitext
@@ -618,6 +634,7 @@ class SurveyBreak
|| $tip == 20 #multi numer*
) && ( count($_FILTRED_VARIABLES) == 0 || (count($_FILTRED_VARIABLES) > 0 && isset($_FILTRED_VARIABLES[$skey]) ) )
) {
+
$this->displayBreakSpremenljivka($forSpr,$frequencys,$spremenljivka);
}
@@ -654,9 +671,10 @@ class SurveyBreak
# checkbox
case 2:
- $this->displayCrosstabTable($forSpr,$frequencys,$spremenljivka);
- break;
- #number
+ $this->displayCrosstabTable($forSpr,$frequencys,$spremenljivka);
+ break;
+
+ #number
case 7:
#ranking
case 17:
@@ -666,10 +684,11 @@ class SurveyBreak
case 20:
$this->displayBreakTableNumber($forSpr,$frequencys,$spremenljivka);
break ;
-
+
case 19:
$this->displayBreakTableText($forSpr,$frequencys,$spremenljivka);
break ;
+
#multicheck
case 16:
$this->displayCrosstabTable($forSpr,$frequencys,$spremenljivka);
@@ -679,8 +698,6 @@ class SurveyBreak
case 21:
# po novem besedilo izpisujemo v klasični tabeli
$this->displayBreakTableText($forSpr,$frequencys,$spremenljivka);
-
- #$this->displayCrosstabTable($forSpr,$frequencys,$spremenljivka);
break;
default:
@@ -727,38 +744,53 @@ class SurveyBreak
# ce imamo vec kot 20 kategorij,izpisujemo samo tiste ki imajo vrednosti
$displayAll = (count($options) > 20) ? false : true;
- echo '<div id="'.$spremenljivka['id'].'" class="breakTableDiv">';
- if (isset($spremenljivka['double']) && $spremenljivka['double'] > 1) {
+ if (isset($spremenljivka['double']) && $spremenljivka['double'] > 1) {
$doubleGridParts = $spremenljivka['double'];
$multiply = 1;
$isDoubleGrid = true;
- } else {
+ }
+ else {
$doubleGridParts[1]['subtitle'] = '';
$multiply = 2;
$isDoubleGrid = false;
}
-
-
+
# če imamo dvojno tabelo
-
$rowspan = ' rowspan="3"';
$colspan = ' colspan="'.($multiply*count($sequences)).'"';
+
foreach ($doubleGridParts AS $part => $doubleGridTitle) {
- echo '<br/>';
+
+ echo '<div id="'.$spremenljivka['id'].'" class="table_holder">';
+
+
+ // Zvezdica za vkljucitev v porocilo
+ echo '<div class="top_line">';
+
+ $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
+ $spr2 = $spremenljivka['grids'][0]['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
+
+ echo '</div>';
+
+
# če ni multicheck in multi grid
- echo '<table>';
- echo '<tr>';
- echo '<th'.$rowspan.'>';
+ echo '<table class="table_break">';
+
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_question" '.$rowspan.'>';
echo '<span class="anl_variabla">';
echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $forSpr . '\'); return false;">';
echo $forSpremenljivka['naslov'];
echo '('.$forSpremenljivka['variable'].')';
echo '</a>';
echo '</span>';
-
- echo '</th>';
- echo '<th'.$colspan.'>';
+ echo '</td>';
+
+ echo '<td class="cell_question" '.$colspan.'>';
echo '<span class="anl_variabla">';
echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka['id'] . '\'); return false;">';
echo $spremenljivka['naslov'];
@@ -768,60 +800,71 @@ class SurveyBreak
echo ' - '.$doubleGridTitle['subtitle'];
}
echo '</span>';
- echo '</th>';
+ echo '</td>';
+
echo '</tr>';
- echo '<tr>';
+
+ echo '<tr class="row2">';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) {
foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub" colspan="2">';
+ echo '<td class="cell_grid" colspan="2">';
echo $variable['naslov'];
echo '('.$variable['variable'].')';
- echo '</th>';
+ echo '</td>';
}
}
}
+
echo '</tr>';
- echo '<tr>';
+
+
+ echo '<tr class="row3">';
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) {
foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub">Povprečje'.$lang[''];
- echo '</th>';
- echo '<th class="sub red">Št. enot'.$lang[''];
- echo '</th>';
+ echo '<td class="cell_value">Povprečje</td>';
+ echo '<td class="cell_value">Št. enot</td>';
}
}
}
echo '</tr>';
+
+
$cnt=0;
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cnt]['naslov'];
$cnt++;
foreach ($options AS $oKey => $option) {
if ($means[$fkey][$oKey] != null || $displayAll) {
- echo '<tr>';
- echo '<td'.$break_percentRowSpan.' class="rsdl_bck_variable1">';
+
+ echo '<tr>';
+
+ echo '<td class="cell_value">';
if ($forSpremenljivka['tip'] == 2) {
echo $cbxLabel;
- } else {
+ }
+ else {
echo $forSpremenljivka['options'][$oKey];
}
echo '</td>';
- $css = '';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) {
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if ($variable['other'] != 1) {
+
#povprečja
- echo '<td'.$css.$break_percentRowSpan.'>';
+ echo '<td class="cell_value">';
echo $this->formatNumber($means[$fkey][$oKey][$sequence],$this->num_digit_average,'');
echo '</td>';
+
# enote
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
echo (int)$frequencys[$fkey][$oKey][$sequence]['validCnt'];
echo '</td>';
$totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']);
@@ -831,44 +874,48 @@ class SurveyBreak
}
}
}
+
echo '</tr>';
}
}
}
+
+
#dodamo še skupno sumo in povprečje
echo '<tr>';
- echo '<td class="rsdl_bck_variable1 red">';
+
+ echo '<td class="cell_value">';
echo 'Skupaj';
echo '</td>';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
if ($isDoubleGrid == false || ($isDoubleGrid == true && $grid['part'] == $part)) {
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if ($variable['other'] != 1) {
+
#povprečja
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
$totalMean = $totalFreq[$sequence] > 0 ? $totalMeans[$sequence] / $totalFreq[$sequence] : 0;
echo $this->formatNumber($totalMean ,$this->num_digit_average,'');
echo '</td>';
+
# enote
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
echo (int)$totalFreq[$sequence];
echo '</td>';
}
-
}
}
}
+
echo '</tr>';
- echo '</table>';//$forSpremenljivka['grids'][0]['variables']
-
+
+ echo '</table>';
+
+ echo '</div>';
}
- // Zvezdica za vkljucitev v porocilo
- $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
- $spr2 = $spremenljivka['grids'][0]['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
- echo '</div>';
}
}
@@ -877,7 +924,8 @@ class SurveyBreak
#ranking - 17:
#vsota - 18:
#multinumber - 20:
-
+ global $lang;
+
$keysCount = count($frequencys);
$sequences = explode('_',$spremenljivka['sequences']);
$forSpremenljivka = $this->_HEADERS[$forSpr];
@@ -939,11 +987,10 @@ class SurveyBreak
}
// Ce izrisujemo tabelo
else{
-
- echo '<div id="'.$spremenljivka['id'].'" class="breakTableDiv">';
- echo '<br/>';
+
# za multi number naredimo po skupinah
if ($tip != 20 ) {
+
$rowspan = ' rowspan="3"';
$colspan = ' colspan="'.(2*count($sequences)).'"';
@@ -951,90 +998,126 @@ class SurveyBreak
if ((int)$this->break_percent > 0) {
$break_percentRowSpan = ' rowspan="2"';
}
+
+ echo '<div id="'.$spremenljivka['id'].'" class="table_holder">';
+
+
+ // Zvezdica za vkljucitev v porocilo
+ echo '<div class="top_line">';
+
+ $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
+ $spr2 = $spremenljivka['grids'][0]['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
+
+ echo '</div>';
+
+
# če ni multicheck in multi grid
- echo '<table>';
- echo '<tr>';
- echo '<th'.$rowspan.'>';
+ echo '<table class="table_break">';
+
+
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_question" '.$rowspan.'>';
echo '<span class="anl_variabla">';
echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $forSpr . '\'); return false;">';
echo $forSpremenljivka['naslov'];
echo '('.$forSpremenljivka['variable'].')';
echo '</a>';
echo '</span>';
-
- echo '</th>';
- echo '<th'.$colspan.'>';
+ echo '</td>';
+
+ echo '<td class="cell_question" '.$colspan.'>';
echo '<span class="anl_variabla">';
echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka['id'] . '\'); return false;">';
echo $spremenljivka['naslov'];
echo '('.$spremenljivka['variable'].')';
echo '</a>';
echo '</span>';
- echo '</th>';
+ echo '</td>';
+
echo '</tr>';
+
- echo '<tr>';
+ echo '<tr class="row2">';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub" colspan="2">';
+ echo '<td class="cell_grid" colspan="2">';
echo $variable['naslov'];
echo '('.$variable['variable'].')';
- echo '</th>';
+ echo '</td>';
}
}
+
echo '</tr>';
- echo '<tr>';
+
+
+ echo '<tr class="row3">';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub">Povprečje'.$lang[''];
- echo '</th>';
- echo '<th class="sub red">Št. enot'.$lang[''];
- echo '</th>';
+ echo '<td class="cell_value">Povprečje</td>';
+ echo '<td class="cell_value">Št. enot</td>';
}
}
+
echo '</tr>';
+
foreach ($frequencys AS $fkey => $fkeyFrequency) {
foreach ($options AS $oKey => $option) {
if ($displayAll || $means[$fkey][$oKey] != null) {
+
echo '<tr>';
- echo '<td'.$break_percentRowSpan.' class="rsdl_bck_variable1">';
+
+ echo '<td class="cell_var">';
echo $forSpremenljivka['options'][$oKey];
echo '</td>';
- $css = '';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if ($variable['other'] != 1) {
+
+ $means1 = isset($means[$fkey][$oKey][$sequence])?$means[$fkey][$oKey][$sequence]:0;
+ $validCnt1 = isset($frequencys[$fkey][$oKey][$sequence]['validCnt'])?$frequencys[$fkey][$oKey][$sequence]['validCnt']:0;
+
#povprečja
- echo '<td'.$css.$break_percentRowSpan.'>';
- echo $this->formatNumber($means[$fkey][$oKey][$sequence],$this->num_digit_average,'');
- #echo $this->formatNumber($means[$fkey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
+ echo '<td class="cell_value">';
+ echo $this->formatNumber($means1,$this->num_digit_average,'');
echo '</td>';
+
# enote
- echo '<td class="red strong">';
- echo (int)$frequencys[$fkey][$oKey][$sequence]['validCnt'];
- #echo (int)$frequencys[$fkey][$sequence]['validCnt'];
+ echo '<td class="cell_value">';
+ echo (int)$validCnt1;
echo '</td>';
- #$totalMeans[$sequence] += ($this->getMeansFromKey($fkeyFrequency[$sequence])*(int)$frequencys[$fkey][$sequence]['validCnt']);
- #$totalFreq[$sequence]+= (int)$frequencys[$fkey][$sequence]['validCnt'];
- $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']);
- $totalFreq[$sequence]+= (int)$frequencys[$fkey][$oKey][$sequence]['validCnt'];
+
+ $totalMeans[$sequence] = (isset($totalMeans[$sequence])?
+ $totalMeans[$sequence] += ($means1*(int)$validCnt1): $means1*(int)$validCnt1);
+ $totalFreq[$sequence] = (isset($totalFreq[$sequence])?
+ $totalFreq[$sequence] += ((int)$validCnt1): (int)$validCnt1);
}
}
}
+
echo '</tr>';
+
+
if ((int)$this->break_percent) {
+
echo '<tr>';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
if ($variable['other'] != 1) {
+
$sequence = $variable['sequence'];
- echo '<td class="">';
- #echo (int)$frequencys[$fkey][$sequence]['validCnt'];
+
+ echo '<td class="cell_value">';
$percent = 0;
if ($frequencys[$fkey][$sequence]['validCnt'] > 0 ) {
$percent = 100;
@@ -1045,81 +1128,103 @@ class SurveyBreak
}
}
+
echo '</tr>';
}
}
}
}
+
+
#dodamo še skupno sumo in povprečje
echo '<tr>';
- echo '<td class="rsdl_bck_variable1">';
- echo $lang[''].'Skupaj';
+
+ echo '<td class="cell_value">';
+ echo 'Skupaj';
echo '</td>';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if ($variable['other'] != 1) {
+
#povprečja
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
$totalMean = $totalFreq[$sequence] > 0 ? $totalMeans[$sequence] / $totalFreq[$sequence] : 0;
echo $this->formatNumber($totalMean ,$this->num_digit_average,'');
echo '</td>';
+
# enote
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
echo (int)$totalFreq[$sequence];
echo '</td>';
}
}
-
}
+
echo '</tr>';
+
echo '</table>';
-
- // Zvezdica za vkljucitev v porocilo
- $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
- $spr2 = $spremenljivka['grids'][0]['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
-
- #xxxxx
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
-
-
- } else if ($tip == 20){
+ echo '</div>';
+ }
+ else if ($tip == 20){
+
# za multi number razdelimo na grupe - skupine
$rowspan = ' rowspan="3"';
$colspan = ' colspan="'.(2*count($spremenljivka['grids'][0]['variables'])).'"';
+
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
// Ce smo v porocilu po meri in ni prava tabela jo preskocimo
if(isset($spremenljivka['break_sub_table']['key']) && $spremenljivka['break_sub_table']['key'] != $gkey){
continue;
}
+
+ echo '<div id="'.$spremenljivka['id'].'" class="table_holder">';
+
+ echo '<div class="top_line">';
+
// Ce smo v porocilu po meri in je prava tabelo jo izpisemo brez naslova
if(!isset($spremenljivka['break_sub_table']['sequence'])){
- echo '<br/><b>'.$lang['srv_break_table_for'];
+ echo '<div class="table_title">';
+
+ echo $lang['srv_break_table_for'];
echo $spremenljivka['naslov'].' (';
echo $spremenljivka['variable'].') = ';
echo $grid['naslov'];
echo ' ('.$grid['variable'].')';
- echo '</b>';
+
+ echo '</div>';
}
+
+ // Zvezdica za vkljucitev v porocilo
+ $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
+ $spr2 = $grid['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
+
+ echo '</div>';
+
- echo '<table>';
+ echo '<table class="table_break">';
+
+
#labele
- echo '<tr>';
- echo '<th'.$rowspan.'>';
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_question" '.$rowspan.'>';
echo '<span class="anl_variabla">';
echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $forSpr . '\'); return false;">';
echo $forSpremenljivka['naslov'];
echo '('.$forSpremenljivka['variable'].')';
echo '</a>';
echo '</span>';
- echo '</th>';
+ echo '</td>';
- echo '<th'.$colspan.'>';
+ echo '<td class="cell_question" '.$colspan.'>';
echo '<span class="anl_variabla">';
echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka['id'] . '\'); return false;">';
echo $spremenljivka['naslov']. ' - ';
@@ -1127,53 +1232,69 @@ class SurveyBreak
echo '('.$grid['variable'].')';
echo '</a>';
echo '</span>';
- echo '</th>';
+ echo '</td>';
+
echo'</tr>';
+
+
#labele
- echo '<tr>';
+ echo '<tr class="row2">';
+
foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub" colspan="2">';
+ echo '<td class="cell_grid" colspan="2">';
echo $variable['naslov'];
echo '('.$variable['variable'].')';
- echo '</th>';
+ echo '</td>';
}
echo '</tr>';
- echo '<tr>';
+
+
+ echo '<tr class="row3">';
+
foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub">Povprečje'.$lang[''];
- echo '</th>';
- echo '<th class="sub red">Št. enot'.$lang[''];
- echo '</th>';
+ echo '<td class="cell_value">Povprečje</td>';
+ echo '<td class="cell_value">Št. enot</td>';
}
+
echo '</tr>';
+
+
$cnt=0;
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cnt]['naslov'];
$cnt++;
+
foreach ($forSpremenljivka['options'] AS $oKey => $option) {
if ($displayAll || $means[$fkey][$oKey] != null) {
+
# če je osnova checkbox vzamemo samo tam ko je 1
if(($forSpremenljivka['tip'] == 2 && $option == 1) || $forSpremenljivka['tip'] != 2 ) {
- echo '<tr>';
- echo '<td'.$break_percentRowSpan.' class="rsdl_bck_variable1">';
+
+ echo '<tr>';
+
+ echo '<td class="cell_value">';
if ($forSpremenljivka['tip'] == 2) {
echo $cbxLabel;
- } else {
+ }
+ else {
echo $forSpremenljivka['options'][$oKey];
}
- #echo ' ('.$oKey.')';
echo '</td>';
+
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
+
#povprečje
- echo '<td>';
+ echo '<td class="cell_value">';
echo $this->formatNumber($means[$fkey][$oKey][$sequence],$this->num_digit_average,'');
echo '</td>';
+
# enote
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
echo (int)$frequencys[$fkey][$oKey][$sequence]['validCnt'];
echo '</td>';
+
$totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$frequencys[$fkey][$oKey][$sequence]['validCnt']);
$totalFreq[$sequence]+= (int)$frequencys[$fkey][$oKey][$sequence]['validCnt'];
@@ -1183,46 +1304,46 @@ class SurveyBreak
}
}
}
+
+
#dodamo še skupno sumo in povprečje
echo '<tr>';
- echo '<td class="rsdl_bck_variable1">';
+
+ echo '<td class="cell_value">';
echo 'Skupaj';
echo '</td>';
+
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if ($variable['other'] != 1) {
+
#povprečja
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
$totalMean = $totalFreq[$sequence] > 0 ? $totalMeans[$sequence] / $totalFreq[$sequence] : 0;
echo $this->formatNumber($totalMean ,$this->num_digit_average,'');
echo '</td>';
+
# enote
- echo '<td class="red strong">';
+ echo '<td class="cell_value">';
echo (int)$totalFreq[$sequence];
echo '</td>';
}
}
+
echo '</tr>';
+
echo '</table>';
-
-
- // Zvezdica za vkljucitev v porocilo
- $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
- $spr2 = $grid['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
-
- echo '<br/>';
+
+ echo '</div>';
}
-
- }
- echo '</div>';
- }
-
+ }
+ }
}
+ #text - 21:
+ #multi text - 19:
function displayBreakTableText($forSpr,$frequencys,$spremenljivka){
- #text - 21:
- #multi text - 19:
+ global $lang;
$keysCount = count($frequencys);
$sequences = explode('_',$spremenljivka['sequences']);
$forSpremenljivka = $this->_HEADERS[$forSpr];
@@ -1234,11 +1355,12 @@ class SurveyBreak
$totalFreq = array();
$forSequences = array();
$cnt = array();
+
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$forSequences[] = $fkey;
foreach ($forSpremenljivka['options'] AS $oKey => $option) {
foreach ($sequences AS $sequence) {
- $txt = $this->getTextFromKey($fkeyFrequency[$oKey][$sequence]);
+ $txt = isset($fkeyFrequency[$oKey][$sequence])?$this->getTextFromKey($fkeyFrequency[$oKey][$sequence]):array();
if ($txt) {
$cnt[$fkey]++;
$texts[$fkey][$oKey][$sequence] = $txt;
@@ -1248,123 +1370,143 @@ class SurveyBreak
}
# če imamo več kot 20 kategorij,izpisujemo samo tiste ki imajo vrednosti
- $displayAll = (count($forSpremenljivka['options']) > 20) ? false : true;
-
- echo '<div id="'.$spremenljivka['id'].'" class="breakTableDiv">';
- echo '<br/>';
- # za multi text razdelimo na grupe - skupine
- $rowspan = ' rowspan="2"';
- $colspan = ' colspan="'.(count($spremenljivka['grids'][0]['variables'])).'"';
- foreach ($spremenljivka['grids'] AS $gkey => $grid) {
-
- // Ce smo v porocilu po meri in ni prava tabela jo preskocimo
- if(isset($spremenljivka['break_sub_table']['sequence']) && $spremenljivka['break_sub_table']['key'] != $gkey){
- continue;
- }
-
- // Ce smo v porocilu po meri in je prava tabelo jo izpisemo brez naslova
- if(!isset($spremenljivka['break_sub_table']['sequence'])){
- echo '<br/>';
- if($tip != '21'){
- echo '<b>';
- echo $lang['srv_break_table_for'];
- echo $spremenljivka['naslov'].' (';
- echo $spremenljivka['variable'].') = ';
- echo $grid['naslov'];
- echo ' ('.$grid['variable'].')';
- echo '</b>';
- }
- }
-
- echo '<table>';
- #labele
- echo '<tr>';
- echo '<th'.$rowspan.'>';
- echo '<span class="anl_variabla">';
- echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $forSpr . '\'); return false;">';
- echo $forSpremenljivka['naslov'];
- echo '('.$forSpremenljivka['variable'].')';
- echo '</a>';
- echo '</span>';
- echo '</th>';
-
- echo '<th'.$colspan.'>';
- echo '<span class="anl_variabla">';
- echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka['id'] . '\'); return false;">';
- echo $spremenljivka['naslov']. ' - ';
- echo $grid['naslov'];
- echo '('.$grid['variable'].')';
- echo '</a>';
- echo '</span>';
- echo '</th>';
- echo'</tr>';
- #labele
- echo '<tr>';
- foreach ($grid['variables'] AS $vkey => $variable) {
- echo '<th class="sub" >';
- echo $variable['naslov'];
- echo '('.$variable['variable'].')';
- echo '('.$variable['sequence'].')';
- echo '</th>';
- }
- echo '</tr>';
- $cntCbx= 0;
- foreach ($forSequences AS $fKey => $forSequence) {
- $cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cntCbx]['naslov'];
- $cntCbx++;
- foreach ($forSpremenljivka['options'] AS $oKey => $option) {
- if ($displayAll || $texts[$forSequence][$oKey] != null) {
- if(($forSpremenljivka['tip'] == 2 && $option == 1) || $forSpremenljivka['tip'] != 2 ) {
- echo '<tr>';
- echo '<td'.$break_percentRowSpan.' class="rsdl_bck_variable1">';
- if ($forSpremenljivka['tip'] == 2) {
- echo $cbxLabel;
- } else {
- echo $forSpremenljivka['options'][$oKey];
- }
- echo '</td>';
- foreach ($grid['variables'] AS $vkey => $variable) {
- $sequence = $variable['sequence'];
- #povprečje
- echo '<td class="anl_at cll_clps" style="vertical-align:top;">';
- if (count($texts[$forSequence][$oKey][$sequence]) > 0) {
- $cnt=1;
- $count = count($texts[$forSequence][$oKey][$sequence]);
- foreach ($texts[$forSequence][$oKey][$sequence] AS $ky => $units) {
- echo '<div class="'.($cnt<=$count && $cnt>1?'anl_bt_dot ':'').('').'"style="line-height: 150%; padding:3px;">';
- echo $units['text'];
- echo '</div>';
- $cnt++;
- }
- }
-
-
- #echo $this->formatNumber($texts[$oKey][$sequence],$this->num_digit_average,'');
- echo '</td>';
-
- }
- echo '</tr>';
- }
- }
- }
- }
- echo '</table>';
-
-
- // Zvezdica za vkljucitev v porocilo
- $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
- $spr2 = $grid['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
-
- echo '<br/>';
- }
+ $displayAll = (count($forSpremenljivka['options']) > 20) ? false : true;
+
+ # za multi text razdelimo na grupe - skupine
+ $rowspan = ' rowspan="2"';
+ $colspan = ' colspan="'.(count($spremenljivka['grids'][0]['variables'])).'"';
+
+
+ foreach ($spremenljivka['grids'] AS $gkey => $grid) {
+
+ // Ce smo v porocilu po meri in ni prava tabela jo preskocimo
+ if(isset($spremenljivka['break_sub_table']['sequence']) && $spremenljivka['break_sub_table']['key'] != $gkey){
+ continue;
+ }
+
+ echo '<div id="'.$spremenljivka['id'].'" class="table_holder">';
+
+
+ echo '<div class="top_line">';
+
+ // Ce smo v porocilu po meri in je prava tabelo jo izpisemo brez naslova
+ if(!isset($spremenljivka['break_sub_table']['sequence'])){
- echo '</div>';
-
+ if($tip != '21'){
+ echo '<div class="table_title">';
+
+ echo $lang['srv_break_table_for'];
+ echo $spremenljivka['naslov'].' (';
+ echo $spremenljivka['variable'].') = ';
+ echo $grid['naslov'];
+ echo ' ('.$grid['variable'].')';
+
+ echo '</div>';
+ }
+ }
+
+ // Zvezdica za vkljucitev v porocilo
+ $spr1 = $this->sessionData['break']['seq'].'-'. $this->sessionData['break']['spr'].'-undefined';
+ $spr2 = $grid['variables'][0]['sequence'].'-'.$spremenljivka['id'].'-undefined';
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=9, $sub_type=0, $spr1, $spr2);
+
+ echo '</div>';
+
+
+ echo '<table class="table_break">';
+
+
+ #labele
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_question" '.$rowspan.'>';
+ echo '<span class="anl_variabla">';
+ echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $forSpr . '\'); return false;">';
+ echo $forSpremenljivka['naslov'];
+ echo '('.$forSpremenljivka['variable'].')';
+ echo '</a>';
+ echo '</span>';
+ echo '</td>';
+
+ echo '<td class="cell_question" '.$colspan.'>';
+ echo '<span class="anl_variabla">';
+ echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $spremenljivka['id'] . '\'); return false;">';
+ echo $spremenljivka['naslov']. ' - ';
+ echo $grid['naslov'];
+ echo isset($grid['variable'])?'('.$grid['variable'].')':'';
+ echo '</a>';
+ echo '</span>';
+ echo '</td>';
+
+ echo'</tr>';
+
+
+ #labele
+ echo '<tr class="row2">';
+
+ foreach ($grid['variables'] AS $vkey => $variable) {
+ echo '<td class="cell_grid">';
+ echo $variable['naslov'];
+ echo '('.$variable['variable'].')';
+ echo '('.$variable['sequence'].')';
+ echo '</td>';
+ }
+
+ echo '</tr>';
+
+
+ $cntCbx= 0;
+ foreach ($forSequences AS $fKey => $forSequence) {
+ $cbxLabel = $forSpremenljivka['grids'][0]['variables'][$cntCbx]['naslov'];
+ $cntCbx++;
+
+ foreach ($forSpremenljivka['options'] AS $oKey => $option) {
+ if ($displayAll || $texts[$forSequence][$oKey] != null) {
+ if(($forSpremenljivka['tip'] == 2 && $option == 1) || $forSpremenljivka['tip'] != 2 ) {
+
+ echo '<tr>';
+
+ echo '<td class="cell_value">';
+ if ($forSpremenljivka['tip'] == 2) {
+ echo $cbxLabel;
+ }
+ else {
+ echo $forSpremenljivka['options'][$oKey];
+ }
+ echo '</td>';
+
+ foreach ($grid['variables'] AS $vkey => $variable) {
+ $sequence = $variable['sequence'];
+ #povprečje
+ echo '<td class="cell_value">';
+ if (isset($texts[$forSequence][$oKey][$sequence])&&count($texts[$forSequence][$oKey][$sequence]) > 0) {
+ $cnt=1;
+ $count = count($texts[$forSequence][$oKey][$sequence]);
+ foreach ($texts[$forSequence][$oKey][$sequence] AS $ky => $units) {
+ echo '<div class="'.($cnt<=$count && $cnt>1?'anl_bt_dot ':'').('').'"style="line-height: 150%; padding:3px;">';
+ echo $units['text'];
+ echo '</div>';
+ $cnt++;
+ }
+ }
+
+ echo '</td>';
+ }
+
+ echo '</tr>';
+ }
+ }
+ }
+ }
+
+ echo '</table>';
+
+ echo '</div>';
+ }
}
function displayCrosstabTable($forSpr,$frequencys,$spremenljivka){
-
+ global $lang;
#polovimo sekvence in spremenljivke
// Ce smo v creportu imamo nastavljeno prvo spremenljivko posebej (ne v sessionu)
if(isset($spremenljivka['break_sub_table']['sequence'])){
@@ -1406,14 +1548,18 @@ class SurveyBreak
// Ce smo v porocilu po meri in je prava tabelo jo izpisemo brez naslova
if(!isset($spremenljivka['break_sub_table']['sequence']) && ($spremenljivka['tip'] == 16 || $spremenljivka['tip'] == 6) && $this->break_charts != 1){
- echo '<br/><b>'.$lang['srv_break_table_for'];
+
+ echo '<div class="table_title">';
+
+ echo $lang['srv_break_table_for'];
echo $spremenljivka['naslov'].' (';
echo $spremenljivka['variable'].') = ';
echo $grid['naslov'];
if ($spremenljivka['tip'] != 6) {
echo ' ('.$grid['variable'].')';
}
- echo '</b>';
+
+ echo '</div>';
}
$seq2 = $grid['variables'][0]['sequence'];
@@ -1435,26 +1581,24 @@ class SurveyBreak
$this->SurveyCrosstab->setVariables($seq1,$spr1,$grd1,$seq2,$spr2,$grd2);
$this->SurveyCrosstab->displayCrosstabsTable();
}
-
- echo '<br/>';
}
-
}
+
function getMeansFromKey($frequencys) {
$sum = 0;
- if (count($frequencys['valid']) > 0) {
+ if (isset($frequencys['valid'])&&count($frequencys['valid']) > 0) {
foreach ($frequencys['valid'] AS $fkey => $tmp) {
$sum += (int)$fkey * (int)$tmp['cnt'];
}
}
- $mean = (int)$frequencys['validCnt'] > 0 ? (int)$sum / (int)$frequencys['validCnt'] : 0;
+ $mean = isset($frequencys['validCnt'])&&(int)$frequencys['validCnt'] > 0 ? (int)$sum / (int)$frequencys['validCnt'] : 0;
return $mean;
}
function getTextFromKey($frequencys) {
$texts = array();
- if (count($frequencys['valid']) > 0) {
+ if (isset($frequencys['valid'])&&count($frequencys['valid']) > 0) {
foreach ($frequencys['valid'] AS $fkey => $tmp) {
$texts[] = $tmp;
}
@@ -1514,21 +1658,21 @@ class SurveyBreak
echo '<div class="analysis_bottom_settings printHide">';
- echo '<a href="#" onClick="addCustomReportAllElementsAlert(9);" 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(\'Break\'); 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=break_izpis&anketa=' . $this->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=break_izpis_rtf&anketa=' . $this->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=break_izpis_xls&anketa=' . $this->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(9);" 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=break_izpis_xls&anketa=' . $this->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=break_izpis_rtf&anketa=' . $this->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=break_izpis&anketa=' . $this->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="doArchiveBreak();" 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="createArchiveBreakBeforeEmail();" 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="createArchiveBreakBeforeEmail();" 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>';
}
}
@@ -1561,18 +1705,19 @@ class SurveyBreak
function displayLinePercent() {
global $lang;
- echo '<label><input id="break_percent" name="break_percent" onchange="change_break_percent();" type="checkbox" ' . ((int)$this->break_percent == 1 ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
- echo $lang['srv_analiza_crosstab_odstotek_vrstice_short'].'</label>';
+
+ echo '<input id="break_percent" name="break_percent" onchange="change_break_percent();" type="checkbox" ' . ((int)$this->break_percent == 1 ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
+ echo '<label for="break_percent">'.$lang['srv_analiza_crosstab_odstotek_vrstice_short'].'</label>';
}
function displayLineCharts() {
global $lang;
- echo '<span class="spaceLeft">';
-
- echo ' <label for="break_charts_0"><input type="radio" value="0" name="break_charts" id="break_charts_0" '.((int)$this->break_charts == 0 ? ' checked="checked" ' : '').' onClick="change_break_charts(this.value)" />'.$lang['srv_tables'].'</label>';
- echo ' <label for="break_charts_1"><input type="radio" value="1" name="break_charts" id="break_charts_1" '.((int)$this->break_charts == 1 ? ' checked="checked" ' : '').' onClick="change_break_charts(this.value)" />'.$lang['srv_charts'].'</label>';
-
- echo '</span>';
+ echo '<input type="radio" value="0" name="break_charts" id="break_charts_0" '.((int)$this->break_charts == 0 ? ' checked="checked" ' : '').' onClick="change_break_charts(this.value)" />';
+ echo '<label for="break_charts_0">'.$lang['srv_tables'].'</label>';
+
+ echo '<input type="radio" value="1" name="break_charts" id="break_charts_1" '.((int)$this->break_charts == 1 ? ' checked="checked" ' : '').' onClick="change_break_charts(this.value)" />';
+ echo '<label for="break_charts_1">'.$lang['srv_charts'].'</label>';
}
+
} \ No newline at end of file
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyChart.php b/admin/survey/classes/surveyAnalysis/class.SurveyChart.php
index 461468f..521b1f4 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyChart.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyChart.php
@@ -4,7 +4,7 @@
* @date Februar 2011
*/
-define("SAA_FOLDER", "AnalysisArchive");
+if(!defined("SAA_FOLDER")) define("SAA_FOLDER", "AnalysisArchive");
class SurveyChart {
@@ -149,29 +149,27 @@ class SurveyChart {
}
// Pobrisemo stare (starejse od $expire_time v dnevih) slike grafov iz cache folderja
- static function clearCache($expire_time = 14){
+ static function clearCache($expire_time_days = 14){
$folderPath = dirname(__FILE__).'/../../pChart/Cache/';
$fileTypes = '*';
-
- // Pobrisemo file starejse od
- $expire_time = $expire_time * 24 * 60 * 60;
-
- foreach (glob($folderPath . $fileTypes) as $Filename) {
+
+ foreach (glob($folderPath . $fileTypes) as $file_name) {
// preberemo cas dostopa do fila
- //$FileCreationTime = fileatime($Filename);
- // preberemo cas ustvarjanja fila
- $FileCreationTime = filemtime($Filename);
+ $file_creation_time = filemtime($file_name);
- // starost v dnevih
- $FileAge = round( (time() - $FileCreationTime) / $expire_time );
+ // starost fila
+ $file_age = time() - $file_creation_time;
+
+ // Starost fila v dnevih
+ $file_age_days = floor($file_age / (60 * 60 * 24));
- if ($FileAge >= ($expire_time)){
+ if ($file_age_days >= ($expire_time_days)){
// brisemo stare file
- //echo 'Datoteka '.$Filename.' je starejša od '.$expire_time.' min in je bila zbrisana.<br />';
- unlink($Filename);
+ //echo 'Datoteka '.$file_name.' je starejša od '.$expire_time_days.' dni in je bila zbrisana.<br />';
+ unlink($file_name);
}
}
}
@@ -313,7 +311,6 @@ class SurveyChart {
// prikazemo nastavitve
if (self::$isArchive != true && self::$publicChart != true) {
self::displayGlobalSettings();
- echo "<br/>\n";
}
# preberemo header
@@ -348,8 +345,17 @@ class SurveyChart {
echo '</div>';
+ if (self::$dataFileStatus == FILE_STATUS_NO_DATA
+ || self::$dataFileStatus == FILE_STATUS_NO_FILE
+ || self::$dataFileStatus == FILE_STATUS_SRV_DELETED){
+
+ $noDataAlert ="noDataAlert";
+ } else {
+ $noDataAlert ="";
+ }
+
if (self::$isArchive != true && self::$publicChart != true) {
- self::displayBottomSettings();
+ self::displayBottomSettings($noDataAlert);
}
@@ -380,7 +386,7 @@ class SurveyChart {
foreach (SurveyAnalysis::$_HEADERS AS $spid => $spremenljivka) {
# preverjamo ali je meta
- if (($spremenljivka['tip'] != 'm'
+ if (isset($spremenljivka['tip']) && ($spremenljivka['tip'] != 'm'
&& in_array($spremenljivka['tip'], SurveyAnalysis::$_FILTRED_TYPES ))
&& (!isset($_spid) || (isset($_spid) && $_spid == $spid))
&& $spremenljivka['tip'] != 5) {
@@ -405,13 +411,13 @@ class SurveyChart {
}
else{
// Ce imamo radio tip in manj kot 5 variabel in numeric oz 2 variabli - po defaultu prikazemo piechart
- $vars = (is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
+ $vars = (isset($spremenljivka['options']) && is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
if( ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3) && (($vars < 5 && $spremenljivka['skala'] == 1) || $vars < 3) ){
self::$settings['type'] = 2;
}
// Ce imamo radio tip in vec kot 20 variabel -> po defaultu ne prikazujemo praznih
- $vars = (is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
+ $vars = (isset($spremenljivka['options']) && is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
if( ($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 3) && $vars > 20 ){
self::$settings['hideEmptyVar'] = 1;
}
@@ -436,8 +442,8 @@ class SurveyChart {
}
// Ce imamo semanticni diferencial po defaultu prikazemo vertikalno crto
- $vars = (is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
- if($spremenljivka['tip'] == 6 && $spremenljivka['enota'] == 1){
+ $vars = (isset($spremenljivka['options']) && is_countable($spremenljivka['options'])) ? count($spremenljivka['options']) : 0;
+ if($spremenljivka['tip'] == 6 && isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1){
self::$settings['type'] = 6;
}
// Ce imamo mg tip in manj kot 4 gridov po defaultu prikazemo strukturne stolpce
@@ -515,7 +521,7 @@ class SurveyChart {
case 6: # multigrid
// dvojna tabela
- if($spremenljivka['enota'] == 3)
+ if(isset($spremenljivka['enota'])&&$spremenljivka['enota'] == 3)
self::displayDoubleMultigridChart($spid, self::$settings);
else
self::displayMultigridChart($spid, self::$settings);
@@ -610,13 +616,15 @@ class SurveyChart {
echo '<div id="div_analiza_data" class="charts">';
+ self::displayExportIcons($spid, $hide_button=true);
+
$vars_count = count(SurveyAnalysis::$_FILTRED_VARIABLES);
- $spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
+ $spremenljivka = isset(SurveyAnalysis::$_HEADERS[$spid])?SurveyAnalysis::$_HEADERS[$spid]:array();
SurveyAnalysis::getFrequencys();
# preverjamo ali je meta
- if (($spremenljivka['tip'] != 'm'
+ if ((isset($spremenljivka['tip']) && $spremenljivka['tip'] != 'm'
&& in_array($spremenljivka['tip'], SurveyAnalysis::$_FILTRED_TYPES ))
&& (!isset($_spid) || (isset($_spid) && $_spid == $spid))
&& $spremenljivka['tip'] != 5) {
@@ -648,7 +656,7 @@ class SurveyChart {
self::$settings['type'] = 2;
}*/
// Ce imamo semanticni diferencial po defaultu prikazemo vertikalno crto
- if($spremenljivka['tip'] == 6 && $spremenljivka['enota'] == 1){
+ if($spremenljivka['tip'] == 6 && isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1){
self::$settings['type'] = 6;
}
// Ce imamo mg tip in manj kot 5 gridov po defaultu prikazemo strukturne stolpce
@@ -700,7 +708,7 @@ class SurveyChart {
break;
case 6: # multigrid
// dvojna tabela
- if($spremenljivka['enota'] == 3)
+ if(isset($spremenljivka['enota'])&&$spremenljivka['enota'] == 3)
self::displayDoubleMultigridChart($spid, self::$settings);
else
self::displayMultigridChart($spid, self::$settings);
@@ -742,7 +750,7 @@ class SurveyChart {
self::sumMultiText($spid);
break;
case 21: # besedilo*
- if ($spremenljivka['cnt_all'] == 1) {
+ if (isset($spremenljivka['cnt_all'])&&$spremenljivka['cnt_all'] == 1) {
// če je enodimenzionalna prikažemo kot frekvence
// predvsem zaradi vprašanj tipa: language, email...
//SurveyAnalysis::sumTextVertical($spid,'sums');
@@ -765,7 +773,7 @@ class SurveyChart {
} // end if $spremenljivka['tip'] != 'm'
echo '</div>';
-
+
//self::displayBottomSettings();
} // end if else ($_headFileName == null)
@@ -800,7 +808,7 @@ class SurveyChart {
}
}
else{
- if((self::$sessionData[$spid]['type'] != 2 && $settings['type'] == 2) || (self::$sessionData[$spid]['type'] != 8 && $settings['type'] == 8)){
+ if(!isset(self::$sessionData[$spid]['type']) || (self::$sessionData[$spid]['type'] != 2 && $settings['type'] == 2) || (self::$sessionData[$spid]['type'] != 8 && $settings['type'] == 8)){
$settings['sort'] = 1;
self::$settings['sort'] = 1;
}
@@ -837,7 +845,7 @@ class SurveyChart {
}
// Popravimo pri preklopu na povprecje - prikazujemo notranje vrednosti in izklopimo prikaz povprecja
- if(self::$sessionData[$spid]['type'] != 9 && $settings['type'] == 9){
+ if((!isset(self::$sessionData[$spid]['type']) || self::$sessionData[$spid]['type'] != 9) && $settings['type'] == 9){
$settings['barLabel'] = 1;
self::$settings['barLabel'] = 1;
@@ -1203,19 +1211,19 @@ class SurveyChart {
}
else{
// Ce smo ravnokar preklopili na linijski - po skupinah imamo default vse intervale
- if(self::$sessionData[$spid]['type'] != 2 && $settings['type'] == 2){
+ if((!isset(self::$sessionData[$spid]['type']) || self::$sessionData[$spid]['type'] != 2) && $settings['type'] == 2){
$settings['interval'] = -1;
self::$settings['interval'] = -1;
}
// Ce smo ravnokar preklopili na navaden - po skupinah imamo default 10 intervalov
- if(self::$sessionData[$spid]['type'] >= 2 && $settings['type'] < 2){
+ if(isset(self::$sessionData[$spid]['type']) && self::$sessionData[$spid]['type'] >= 2 && $settings['type'] < 2){
$settings['interval'] = 10;
self::$settings['interval'] = 10;
}
}
// Popravimo pri preklopu na povprecje - prikazujemo notranje vrednosti in izklopimo prikaz povprecja
- if(self::$sessionData[$spid]['type'] != 9 && $settings['type'] == 9){
+ if((!isset(self::$sessionData[$spid]['type']) || self::$sessionData[$spid]['type'] != 9) && $settings['type'] == 9){
$settings['barLabel'] = 1;
self::$settings['barLabel'] = 1;
@@ -2346,6 +2354,7 @@ class SurveyChart {
$ID = self::$anketa.'_chart_'.$spid.'_mv_'.SurveyAnalysis::$missingProfileData['display_mv_type'];
foreach ($settings AS $key => $val) {
+
if($key == 'colors'){
$ID .= '_colors';
@@ -2356,7 +2365,7 @@ class SurveyChart {
}
elseif($key != 'name')
- $ID .= '_'.$key.'_'.$val;
+ $ID = !is_array($val) ? $ID .= '_'.$key.'_'.$val : $ID .= '_'.$key.'_';
}
$ID .= '_skin_'.self::$skin;
@@ -3089,9 +3098,9 @@ class SurveyChart {
foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'] AS $vkey => $vAnswer) {
if ($vAnswer['cnt'] > 0 || true) { # izpisujemo samo tiste ki nisno 0
-
- $_valid = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*$vAnswer['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
- $_percent = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*$vAnswer['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
+
+ $_valid = (isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']) && SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0) ? 100*$vAnswer['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ $_percent = (isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']) && SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] > 0) ? 100*$vAnswer['cnt'] / SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
$tempArray = array();
@@ -3101,7 +3110,7 @@ class SurveyChart {
if($vAnswer['cnt'] > 0)
$emptyData = false;
- $N = ($settings['value_type'] == 0) ? SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'];
+ $N = ($settings['value_type'] == 0 && isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])) ? SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'];
$tempArray['percent'] = $_percent;
$tempArray['valid'] = $_valid;
@@ -3112,17 +3121,19 @@ class SurveyChart {
$tempArray['variable'] = $text;
$fullPercent += $tempArray['percent'];
-
+
// ce imamo vklopljeno da izpuscamo 0 in prikazujemo pie chart spustimo nicelne vrednosti
- if($_valid != 0 || SurveyDataSettingProfiles :: getSetting('chartPieZeros') == 1 || ($settings['type'] != 2 && $settings['type'] != 8))
+ if($_valid != 0 || SurveyDataSettingProfiles :: getSetting('chartPieZeros') == 1 || ($settings['type'] != 2 && $settings['type'] != 8)){
$dataArray[] = $tempArray;
+ }
+
// Ce je ordinalen racunamo povprecje
if($spremenljivka['skala'] != 1){
$xi = (int)$vkey;
$fi = (int)$vAnswer['cnt'];
- $sum_xi_fi += $xi * $fi;
+ $sum_xi_fi = isset($sum_xi_fi) ? $sum_xi_fi += $xi * $fi : $xi * $fi;
$N_average += $fi;
}
}
@@ -3134,7 +3145,7 @@ class SurveyChart {
$_answersOther[] = array('spid'=>$spid,'gid'=>$gid,'vid'=>$vid,'sequence'=>$_sequence);
}
}
-
+
$displayMV = ((int)SurveyAnalysis::$missingProfileData['display_mv_type'] === 2) ? TRUE : FALSE;
if ( (count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'])> 0) && $displayMV) {
foreach (SurveyAnalysis::$_FREQUENCYS[$_sequence]['invalid'] AS $ikey => $iAnswer) {
@@ -3166,7 +3177,7 @@ class SurveyChart {
$i++;
}
-
+
// zascita pred praznimi vprasanji (brez variabel)
if($_variables_count == 0)
return -1;
@@ -3494,7 +3505,7 @@ class SurveyChart {
}
// napolnimo podatke za DVOJNI MULTIGRID
- elseif($spremenljivka['tip'] == 6 && $spremenljivka['enota'] == 3){
+ elseif(isset($spremenljivka['enota']) && $spremenljivka['tip'] == 6 && $spremenljivka['enota'] == 3){
$DataSet = new pData;
$dataArray = array();
$fullPercent = array();
@@ -3747,7 +3758,7 @@ class SurveyChart {
$_variables_count = count($stolpci);
-
+ $gidsCanShow=array();
# odstranimo še možne nepotrebne zapise za multigride
if($settings['hideEmptyVar'] == 1){
$allGrids = count($spremenljivka['grids']);
@@ -3781,8 +3792,7 @@ class SurveyChart {
$legendTitle = '';
// Kontrola ce ne prikazujemo praznih variabel
- if ((!is_array($gidsCanShow) && !isset($gidsCanShow[$gid]))
- || (is_array($gidsCanShow) && isset($gidsCanShow[$gid]) && $gidsCanShow[$gid]== true)){
+ if (!isset($gidsCanShow[$gid]) || (isset($gidsCanShow[$gid]) && $gidsCanShow[$gid]== true)){
# dodamo dodatne vrstice z albelami grida
foreach ($grid['variables'] AS $vid => $variable ){
@@ -3825,7 +3835,7 @@ class SurveyChart {
$tempArray['variable'] = $text;
// dodamo vrednosti na desni ce imamo vklopljen diferencial
- if($spremenljivka['enota'] == 1){
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1){
$sqlV = sisplet_query("SELECT naslov2 FROM srv_vrednost WHERE spr_id='$spid' AND id='$variable[vr_id]'");
$rowV = mysqli_fetch_array($sqlV);
$tempArray['variable2'] = strip_tags($rowV['naslov2']);
@@ -3941,7 +3951,7 @@ class SurveyChart {
$tempArray['grid'] = $textGrid;
// dodamo vrednosti na desni ce imamo vklopljen diferencial
- if($spremenljivka['enota'] == 1){
+ if(isset($spremenljivka['enota'])&&$spremenljivka['enota'] == 1){
$sqlV = sisplet_query("SELECT naslov2 FROM srv_vrednost WHERE spr_id='$spid' AND id='$variable[vr_id]'");
$rowV = mysqli_fetch_array($sqlV);
$tempArray['variable2'] = strip_tags($rowV['naslov2']);
@@ -3949,7 +3959,7 @@ class SurveyChart {
$dataArray[] = $tempArray;
- $fullPercent[$gridCount] += $tempArray['percent'];
+ $fullPercent[$gridCount] = isset($fullPercent[$gridCount]) ? $fullPercent[$gridCount] += $tempArray['percent'] : $tempArray['percent'];
}
}
}
@@ -3982,7 +3992,7 @@ class SurveyChart {
$dataArray[] = $tempArray;
- $fullPercent[$gridCount] += $tempArray['percent'];
+ $fullPercent[$gridCount] = isset($fullPercent[$gridCount]) ? $fullPercent[$gridCount] += $tempArray['percent'] : $tempArray['percent'];
}
}
}
@@ -4029,7 +4039,7 @@ class SurveyChart {
$vrednostiVariable[] = $dataArray[$i]['variable'];
// se vrednosti na desni pri sem. diferencialu
- if($spremenljivka['enota'] == 1)
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1)
$vrednostiVariable2[] = $dataArray[$i]['variable2'];
}
@@ -4059,7 +4069,7 @@ class SurveyChart {
//$DataSet->AddPoint($vrednostiKey,"Variable");
// se vrednosti na desni pri sem. diferencialu
- if($spremenljivka['enota'] == 1){
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1){
$DataSet->AddPoint($vrednostiVariable2,"Variable2");
$DataSet->SetRightLabelSerie("Variable2");
}
@@ -4156,7 +4166,7 @@ class SurveyChart {
$vrednostiGrid[] = $dataArray[$offset]['grid'];
// se vrednosti na desni pri sem. diferencialu
- if($spremenljivka['enota'] == 1)
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1)
$vrednostiVariable2[] = $dataArray[$offset]['variable2'];
}
@@ -4185,7 +4195,7 @@ class SurveyChart {
$DataSet->AddPoint($vrednostiGrid,"Variable");
// se vrednosti na desni pri sem. diferencialu
- if($spremenljivka['enota'] == 1){
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1){
$DataSet->AddPoint($vrednostiVariable2,"Variable2");
$DataSet->SetRightLabelSerie("Variable2");
}
@@ -4263,7 +4273,7 @@ class SurveyChart {
$vrednostiVariable[] = $dataArray[$offset]['variable'];
// se vrednosti na desni pri sem. diferencialu
- if($spremenljivka['enota'] == 1)
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1)
$vrednostiVariable2[] = $dataArray[$offset]['variable2'];
}
@@ -4295,7 +4305,7 @@ class SurveyChart {
$DataSet->AddPoint($vrednostiVariable,"Variable");
// se vrednosti na desni pri sem. diferencialu
- if($spremenljivka['enota'] == 1){
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1){
$DataSet->AddPoint($vrednostiVariable2,"Variable2");
$DataSet->SetRightLabelSerie("Variable2");
}
@@ -4342,7 +4352,7 @@ class SurveyChart {
$_sequence = $variable['sequence']; # id kolone z podatki
if ($spremenljivka['tip'] == 22 || (($variable['text'] != true && $variable['other'] != true) || (in_array($spremenljivka['tip'],array(4,8,21))))){
- if (is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0) {
+ if (isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0) {
if($field == 0)
$N = SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'];
@@ -4475,8 +4485,8 @@ class SurveyChart {
array_multisort($tmp, SORT_NUMERIC, SORT_ASC, $dataArray);
}
- $max = (double)$dataArray[count($dataArray,0)-1]['variable'];
- $min = (double)$dataArray[0]['variable'];
+ $max = isset($dataArray[count($dataArray,0)-1]['variable']) ? (double)$dataArray[count($dataArray,0)-1]['variable'] : 0;
+ $min = isset($dataArray[0]['variable']) ? (double)$dataArray[0]['variable'] : 0;
$stIntervalov = ((int)$settings['interval'] == 0 ? 10 : (int)$settings['interval']);
@@ -5084,10 +5094,13 @@ class SurveyChart {
// napolnimo podatke za MULTICHECKBOX
elseif($spremenljivka['tip'] == 16){
+
$DataSet = new pData;
$dataArray = array();
$fullPercent = array();
+ $gidsCanShow = array();
+ $vrednostiGrid = array();
# odstranimo še možne nepotrebne zapise
if($settings['hideEmptyVar'] == 1){
@@ -5107,7 +5120,8 @@ class SurveyChart {
# preverjamo ali lahko prikazujemo podkategorije
if((int)$cntValidInGrid > 0) {
$gidsCanShow[$gid] = true;
- } else {
+ }
+ else {
$gidsCanShow[$gid] = false;
}
}
@@ -5116,20 +5130,23 @@ class SurveyChart {
$gridCount=0;
+ $_variables_count=0;
$nValid = array();
$nAll = 0;
$nNavedbe = array();
+
if (count($spremenljivka['grids']) > 0)
foreach ($spremenljivka['grids'] AS $gid => $grid) {
$legendTitle = '';
// Kontrola ce ne prikazujemo praznih variabel
- if ((!is_array($gidsCanShow) && !isset($gidsCanShow[$gid]))
- || (is_array($gidsCanShow) && isset($gidsCanShow[$gid]) && $gidsCanShow[$gid]== true)){
+ if (!isset($gidsCanShow[$gid]) || (isset($gidsCanShow[$gid]) && $gidsCanShow[$gid]== true)){
+
- # dodamo dodatne vrstice z albelami grida
$_variables_count=0;
+
+ # dodamo dodatne vrstice z albelami grida
foreach ($grid['variables'] AS $vid => $variable ){
if ($variable['text'] != true && $variable['other'] != true){
@@ -5140,12 +5157,12 @@ class SurveyChart {
$legendTitle = substr($variable['variable'],0,strpos($variable['variable'],'_'));
$vAnswer = SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'][1]['cnt'];
- $_valid = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*$vAnswer / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
- $_percent = (SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*$vAnswer / SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
+ $_valid = ( isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']) && SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0 ) ? 100*$vAnswer / SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
+ $_percent = ( isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt']) && SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] > 0 ) ? 100*$vAnswer / SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'] : 0;
$tempArray = array();
- $nValid[] = SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'];
+ $nValid[] = isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']) ? SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] : 0;
$nAll = SurveyAnalysis::$_FREQUENCYS[$_sequence]['allCnt'];
$nNavedbe[$gid] += SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid'][1]['cnt'];
@@ -5167,8 +5184,15 @@ class SurveyChart {
$dataArray[] = $tempArray;
- $fullPercent[$gridCount] += $tempArray['percent'];
- $fullPercentReverse[$_variables_count] += $tempArray['percent'];
+ if(isset($fullPercent[$gridCount]))
+ $fullPercent[$gridCount] += $tempArray['percent'];
+ else
+ $fullPercent[$gridCount] = $tempArray['percent'];
+
+ if(isset($fullPercentReverse[$_variables_count]))
+ $fullPercentReverse[$_variables_count] += $tempArray['percent'];
+ else
+ $fullPercentReverse[$_variables_count] = $tempArray['percent'];
$_variables_count++;
}
@@ -5216,7 +5240,7 @@ class SurveyChart {
// Normalno obrnjen graf - gridi v stolpcih, variable v legendi (deli stolpcev)
if($settings['rotate'] != 1){
-
+
// Sortiramo podaatke ce je potrebno
if($settings['sort'] == 1){
@@ -5491,7 +5515,7 @@ class SurveyChart {
$_sequence = $variable['sequence']; # id kolone z podatki
if (($variable['text'] != true && $variable['other'] != true) || (in_array($spremenljivka['tip'],array(4,8,21)))){
- if (is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0) {
+ if (isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0) {
# za povprečje
$sum_xi_fi=0;
@@ -5828,7 +5852,7 @@ class SurveyChart {
$_sequence = $variable['sequence']; # id kolone z podatki
if (($variable['text'] != true && $variable['other'] != true) || (in_array($spremenljivka['tip'],array(4,8,21)))){
- if (is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0) {
+ if (isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && is_countable(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) && count(SurveyAnalysis::$_FREQUENCYS[$_sequence]['valid']) > 0) {
# za povprečje
$sum_xi_fi=0;
@@ -6119,7 +6143,7 @@ class SurveyChart {
//$DataSet->SetYAxisName($lang['srv_analiza_sums_average']);
}
-
+
// Nastavimo other vrednosti
$DataSet->SetOther($_answersOther);
@@ -6176,7 +6200,7 @@ class SurveyChart {
$Test->setGraphArea(self::$quality*100,self::$quality*40,self::$quality*650,self::$quality*220);
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*(243+$addHeight),5,255,255,255);
//$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight),200,200,200);
+ //self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
// Pri checkboxu lahko naredimo fiksno skalo
@@ -6318,7 +6342,7 @@ class SurveyChart {
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*(243+$addHeight+$addLegendSpace),5,255,255,255);
//$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight+$addLegendSpace),200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight+$addLegendSpace),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
// Pri ordinalnih multigridih prikazemo skalo od 1 do stevila variabel (ce prikazujemo povprecja)
@@ -6480,7 +6504,7 @@ class SurveyChart {
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*(243+$addHeight),5,255,255,255);
//$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
$Test->drawGrid(4,TRUE,230,230,230,50);
@@ -6543,7 +6567,7 @@ class SurveyChart {
$addHeight = $countGrids > 5 ? ($countGrids-5)*30 : 0;
// Imamo semanticni dif. - izpisujemo labele na desni
- $rightScale = ($spremenljivka['tip'] == 6 && $spremenljivka['enota'] == 1 && self::$settings['scale_limit'] == 1) ? true : false;
+ $rightScale = ($spremenljivka['tip'] == 6 && isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1 && self::$settings['scale_limit'] == 1) ? true : false;
// Initialise the graph
$Test = new MyHorBar(self::$quality*800,self::$quality*(250+$addHeight+50));
@@ -6572,8 +6596,7 @@ class SurveyChart {
if($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 2 || $spremenljivka['tip'] == 3){
$Test->setGraphArea(self::$quality*200,self::$quality*50,self::$quality*630,self::$quality*220);
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*243,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*295,200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*295,200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE);
$Test->drawHorGrid(4,TRUE,230,230,230,50);
@@ -6582,8 +6605,7 @@ class SurveyChart {
elseif($rightScale){
$Test->setGraphArea(self::$quality*270,self::$quality*50,self::$quality*530,self::$quality*(220+$addHeight));
$Test->drawFilledRoundedRectangle(7,7,793,243+$addHeight,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(295+$addHeight),200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(295+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0/*SCALE_START0*/,0,0,0,TRUE,0,0,TRUE,1,$rightScale,$roundText=40);
@@ -6592,8 +6614,7 @@ class SurveyChart {
else{
$Test->setGraphArea(self::$quality*$startX,self::$quality*50,self::$quality*650,self::$quality*(220+$addHeight));
$Test->drawFilledRoundedRectangle(7,7,793,243+$addHeight,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(295+$addHeight),200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(295+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
$Test->drawHorGrid(4,TRUE,230,230,230,50);
@@ -6667,12 +6688,8 @@ class SurveyChart {
$Test->setLineStyle(self::$quality,$DotSize=0);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',self::$quality*self::$fontSize);
- //$Test->setGraphArea(50,40,685,220);
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*275,200,200,200);
- //$Test->createColorGradientPalette(195,204,56,223,110,41,3);
- //$Test->createColorGradientPalette(168,188,56,248,255,136,5);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*275,200,200,200);
// Pri vsoti ne izpisujemo procentov
@@ -6743,13 +6760,8 @@ class SurveyChart {
$Test->setLineStyle(self::$quality,$DotSize=0);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',self::$quality*self::$fontSize);
- //$Test->setGraphArea(50,40,685,220);
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*275,200,200,200);
- //$Test->createColorGradientPalette(195,204,56,223,110,41,3);
- //$Test->createColorGradientPalette(168,188,56,248,255,136,5);
-
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*275,200,200,200);
// Pri vsoti ne izpisujemo procentov
if($spremenljivka['tip'] == 18 || ($spremenljivka['tip'] == 1 && self::$settings['type'] == 2 && self::$settings['value_type'] == 1))
@@ -6838,8 +6850,7 @@ class SurveyChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',self::$quality*self::$fontSize);
$Test->setGraphArea(self::$quality*100,self::$quality*40,self::$quality*650,self::$quality*220);
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*275,200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*275,200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
// Pri checkboxu lahko naredimo fiksno skalo
@@ -6909,7 +6920,7 @@ class SurveyChart {
$addHeight = $countGrids > 5 ? ($countGrids-5)*30 : 0;
// Imamo semanticni dif. - izpisujemo labele na desni
- $rightScale = ($spremenljivka['enota'] == 1 && self::$settings['scale_limit'] == 1) ? true : false;
+ $rightScale = (isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1 && self::$settings['scale_limit'] == 1) ? true : false;
// Initialise the graph
$Test = new MyHorBar(self::$quality*800,self::$quality*(250+$addHeight));
@@ -6931,8 +6942,7 @@ class SurveyChart {
$Test->setGraphArea(self::$quality*270,self::$quality*50,self::$quality*530,self::$quality*(220+$addHeight));
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,0,0,TRUE,1,$rightScale,$roundText=40);
@@ -6996,11 +7006,7 @@ class SurveyChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',self::$quality*self::$fontSize);
$Test->setGraphArea(self::$quality*100,self::$quality*40,self::$quality*650,self::$quality*320);
$Test->drawFilledRoundedRectangle(self::$quality*7,self::$quality*7,self::$quality*793,self::$quality*343,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*345,200,200,200);
- //$Test->drawGraphArea(255,255,255,TRUE);
- //$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,20,20,20,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
- //$Test->drawGrid(4,TRUE,230,230,230,50);
+ //$Test->drawRectangle(self::$quality*5,self::$quality*5,self::$quality*795,self::$quality*345,200,200,200);
// Draw the 0 line
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',self::$quality*self::$fontSize);
@@ -7072,7 +7078,7 @@ class SurveyChart {
//moznost osvezevanja grafov - ne uporabljamo zaenkrat
if($admin_type < 2 && false)
- echo '<a href="'.$site_url.'?anketa='.self::$anketa.'&a=analysis&m=charts&refresh=1"><img src="img_0/random_off.png" title="Osveži grafe" /></a>';
+ echo '<a href="'.$site_url.'?anketa='.self::$anketa.'&a=analysis&m=charts&refresh=1" title="Osveži grafe"><span class="faicon refresh"></span></a>';
// Izrisemo ostale filtre
SurveyAnalysis::DisplayFilters(self::$quality);
@@ -7098,7 +7104,7 @@ class SurveyChart {
$SR = new SurveyRecoding(self::$anketa);
$SR -> getProfileString();
- SurveyDataSettingProfiles :: getVariableTypeNote($doNewLine);
+ SurveyDataSettingProfiles :: getVariableTypeNote();
echo '</div>';
}
@@ -7109,8 +7115,8 @@ class SurveyChart {
echo '<ul>';
echo '<li>';
- echo $lang['srv_chart_hq'].': ';
- echo '<input type="checkbox" name="chart_hq" id="chart_hq" onClick="changeChartHq(this)" '.(self::$quality == 3 ? ' checked="checked"' : '').'>';
+ echo ' <input type="checkbox" name="chart_hq" id="chart_hq" onClick="changeChartHq(this)" '.(self::$quality == 3 ? ' checked="checked"' : '').'>';
+ echo ' <label for="chart_hq">'.$lang['srv_chart_hq'].'</label>';
echo '</li>';
# nastavitev skina grafov
@@ -7123,21 +7129,23 @@ class SurveyChart {
}
// Nastavitve na dnu
- static function displayBottomSettings(){
+
+ static function displayBottomSettings($noDataAlert = ""){
global $site_path;
global $lang;
- echo '<div class="chart_bottom_settings">';
-
- echo '<a href="#" onClick="addCustomReportAllElementsAlert(4);" title="'.$lang['srv_custom_report_comments_add_hover'].'" style="margin-right: 40px;"><span class="spaceRight faicon comments_creport" ></span><span class="bold">'.$lang['srv_custom_report_comments_add'].'</span></a>';
+ echo '<div class="analysis_bottom_settings printHide '.$noDataAlert.'">';
- echo '<a href="#" onClick="printAnaliza(\'Grafi\'); return false;" title="'.$lang['hour_print2'].'" class="srv_ico"><span class="faicon print icon-grey_dark_link"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts&anketa=' . self::$anketa) . '" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf black very_large" ></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_rtf&anketa=' . self::$anketa) . '" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf black very_large"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_ppt&anketa=' . self::$anketa) . '" target="_blank" title="'.$lang['PPT_Izpis'].'"><span class="faicon ppt black very_large"></span></a>';
+ echo '<div class="comment_holder">';
+ echo ' <a href="#" class="comment" onClick="addCustomReportAllElementsAlert(4);" title="'.$lang['srv_custom_report_comments_add_hover'].'"><span class="faicon comments" ></span><span>'.$lang['srv_custom_report_comments_add'].'</span></a>';
+ echo '</div>';
+
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_rtf&anketa=' . self::$anketa) . '" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts&anketa=' . self::$anketa) . '" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_ppt&anketa=' . self::$anketa) . '" target="_blank" title="'.$lang['PPT_Izpis'].'"><span class="faicon ppt"></span></a>';
- echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'"><span class="faicon arhiv black very_large"></span></a>';
- echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '"><span class="faicon arhiv_mail black very_large"></span></a>';
+ echo '<a href="#" onclick="doArchiveAnaliza();" title="'.$lang['srv_analiza_arhiviraj_ttl'].'"><span class="faicon arhiv"></span></a>';
+ echo '<a href="#" onclick="createArchiveBeforeEmail();" title="'.$lang['srv_analiza_arhiviraj_email_ttl'] . '"><span class="faicon arhiv_mail"></span></a>';
echo '</div>';
}
@@ -7172,25 +7180,29 @@ class SurveyChart {
static function displaySingleSettings($spid, $settings=0){
global $site_path;
global $lang;
+
if (self::$publicChart == true) {
return false;
}
+
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
// Ikone izvoza na vrhu posameznih nastavitev
self::displayExportIcons($spid);
- echo '<div id="switch_left_'.$spid.'_loop_'.self::$current_loop.'" class="switch_left '.(self::$settings_mode == 1 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$spid.'\', \'0\', \''.self::$current_loop.'\')">'.$lang['srv_chart_settings_basic'].'</div>';
- //echo '<span id="switch_middle_'.$spid.'_loop_'.self::$current_loop.'" class="'.(self::$settings_mode == 1 ? 'rightHighlight' : 'leftHighlight').'"></span>';
- echo '<div id="switch_right_'.$spid.'_loop_'.self::$current_loop.'" class="switch_right '.(self::$settings_mode == 0 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$spid.'\', \'1\', \''.self::$current_loop.'\')">'.$lang['srv_chart_settings_advanced'].'</div>';
+ echo '<div class="chart_settings_content">';
+
+
+ echo '<div class="tab_holder">';
+ echo ' <div id="switch_left_'.$spid.'_loop_'.self::$current_loop.'" class="tab switch_left '.(self::$settings_mode == 1 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$spid.'\', \'0\', \''.self::$current_loop.'\')">'.$lang['srv_chart_settings_basic'].'</div>';
+ echo ' <div id="switch_right_'.$spid.'_loop_'.self::$current_loop.'" class="tab switch_right '.(self::$settings_mode == 0 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$spid.'\', \'1\', \''.self::$current_loop.'\')">'.$lang['srv_chart_settings_advanced'].'</div>';
+ echo '</div>';
// OSNOVNE NASTAVITVE
echo '<div class="chart_settings_inner" id="chart_settings_basic_'.$spid.'_loop_'.self::$current_loop.'" '.(self::$settings_mode == 1 ? ' style="display:none;"' : '').'>';
- //echo '<span class="title">'.$lang['srv_chart_settings'].'</span>';
-
switch($spremenljivka['tip']){
case 1:
case 3:
@@ -7202,7 +7214,7 @@ class SurveyChart {
break;
case 6:
- if($spremenljivka['enota'] == 3)
+ if(isset($spremenljivka['enota'])&&$spremenljivka['enota'] == 3)
self::displayDoubleMultigridSettings($spid, $settings);
else
self::displayMultigridSettings($spid, $settings);
@@ -7232,34 +7244,17 @@ class SurveyChart {
case 20:
self::displayMultinumberSettings($spid, $settings);
break;
-
- case 21:
- case 4:
- self::displayTableSettings($spid);
- break;
-
- case 19:
- self::displayMultitextSettings($spid, $settings);
- break;
-
+
default:
break;
}
// Preview vprasanja
- //SurveyAnalysis::showVariable($spid, $spremenljivka['variable']);
- echo '<div class="chart_setting" style="text-align: center; margin-top: 20px;">';
- echo '<span style="margin-right: 6px; line-height: 6px; font-weight: 600; font-size: 11px;">';
- //echo $lang['srv_vprasanje'].': ';
- echo $spremenljivka['variable'];
- echo '</span>';
- //echo '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="preview_spremenljivka_analiza(\'' . $spid . '\'); return false;"><span class="sprites preview"></span></a>';
- echo '<a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\''.$spid.'\'); return false;"><span class="faicon preview"></span></a> ';
- //echo '</div>';
-
- //echo '<div class="chart_setting" style="text-align: center;">';
+ echo '<div class="chart_setting_icons">';
+ echo ' <span class="variable">'.$spremenljivka['variable'].'</span>';
+ echo ' <a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\''.$spid.'\'); return false;"><span class="faicon monitor"></span></a> ';
SurveyAnalysis::showIcons($spid,$spremenljivka,$_from='charts');
- echo '</div>';
+ echo '</div>';
echo '</div>';
@@ -7278,7 +7273,7 @@ class SurveyChart {
break;
case 6:
- if($spremenljivka['enota'] == 3)
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 3)
self::displayAdvancedDoubleMultigridSettings($spid, $settings);
else
self::displayAdvancedMultigridSettings($spid, $settings);
@@ -7311,58 +7306,86 @@ class SurveyChart {
default:
break;
- }
+ }
+
+ echo '</div>';
+
+ echo '</div>';
+ }
+
+ // Nastavitve posamezne tabele (odprti odgovori)
+ static function displaySingleSettingsTable($spid, $settings=0){
+ global $site_path;
+ global $lang;
+
+ if (self::$publicChart == true) {
+ return false;
+ }
+
+ $spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
- // Link na urejanje label
- echo '<span class="edit" style="margin-top:15px;" onclick="chartAdvancedSettings(\''.$spid.'\', 1, \''.self::$current_loop.'\');">'.$lang['srv_chart_advancedLink_labels'].'</span>';
- // Vprasajcek za pomoc
- echo Help :: display('displaychart_settings_labels');
+ // Ikone izvoza na vrhu posameznih nastavitev
+ self::displayExportIcons($spid, $hide_button=true);
- // Link na urejanje barv
- echo '<span class="edit" onclick="chartAdvancedSettings(\''.$spid.'\', \'2\', \''.self::$current_loop.'\');">'.$lang['srv_chart_advancedLink_colors'].'</span>';
- // Vprasajcek za pomoc
- echo Help :: display('displaychart_settings_colors');
- // Link na rekodiranje
- echo '<span class="edit" onclick="chartAdvancedSettings(\''.$spid.'\', \'3\', \''.self::$current_loop.'\');">'.$lang['srv_chart_advancedLink_recoding'].'</span>';
- // Vprasajcek za pomoc
- echo Help :: display('displaychart_settings_recoding');
+ echo '<div class="chart_settings_content">';
+
+
+ echo '<div class="tab_holder"><div class="tab">'.$lang['srv_chart_open_answers_settings'].'</div></div>';
+
+ // OSNOVNE NASTAVITVE
+ echo '<div class="chart_settings_inner" id="chart_settings_basic_'.$spid.'_loop_'.self::$current_loop.'">';
- // Link na napredne number (radio dropdown numeric, number, date) nastavitve
- if(($spremenljivka['tip'] == 3 && self::checkDropdownNumeric($spid)) || $spremenljivka['tip'] == 7 || $spremenljivka['tip'] == 8 || $spremenljivka['tip'] == 22){
- echo '<span class="edit" onclick="chartAdvancedSettings(\''.$spid.'\', \'4\', \''.self::$current_loop.'\');">'.$lang['srv_chart_advancedLink_limits'].'</span>';
- // Vprasajcek za pomoc
- //echo Help :: display('displaychart_settings_number');
+ switch($spremenljivka['tip']){
+ case 21:
+ case 4:
+ self::displayTableSettings($spid);
+ break;
+
+ case 19:
+ self::displayMultitextSettings($spid, $settings);
+ break;
+
+ default:
+ break;
}
-
-
+
+ // Preview vprasanja
+ echo '<div class="chart_setting_icons">';
+ echo ' <span class="variable">'.$spremenljivka['variable'].'</span>';
+ echo ' <a href="#" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\''.$spid.'\'); return false;"><span class="faicon monitor"></span></a> ';
+ SurveyAnalysis::showIcons($spid,$spremenljivka,$_from='charts');
+ echo '</div>';
+
+ echo '</div>';
+
+
echo '</div>';
}
// ikone na vrhu posameznih nastavitev (izvozi)
- static function displayExportIcons($spid){
+ static function displayExportIcons($spid, $hide_button=false){
global $site_path;
global $lang;
- $spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
+ $spremenljivka = isset(SurveyAnalysis::$_HEADERS[$spid])?SurveyAnalysis::$_HEADERS[$spid]:array();
$loop = (isset(SurveyAnalysis::$_CURRENT_LOOP)) ? SurveyAnalysis::$_CURRENT_LOOP['cnt'] : 'undefined';
// linki
echo '<div class="chart_setting_exportLinks">';
- // Ikona za print
- echo '<a href="#" onclick="showAnalizaSingleChartPopup(\''.$spid.'\',\''.M_ANALYSIS_CHARTS.'\'); return false;">';
- echo '<span class="faicon print_small icon-grey_dark_link" title="' . $lang['PRN_Izpis'] . '"></span>';
- echo '</a>';
+ // Izvoz posameznega grafa v PDF/RTF/PPT
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts&anketa='.self::$anketa.'&sprID='.$spid.'&loop='.$loop).'" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf"></span></a>';
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_rtf&anketa='.self::$anketa.'&sprID='.$spid.'&loop='.$loop).'" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf"></span></a>';
+ // V PPT zaenkrat ne izvazamo tabel
+ if(isset($spremenljivka['tip'])&&$spremenljivka['tip'] != 4 && $spremenljivka['tip'] != 19 && $spremenljivka['tip'] != 21)
+ echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_ppt&anketa='.self::$anketa.'&sprID='.$spid.'&loop='.$loop).'" target="_blank" title="'.$lang['PPT_Izpis'].'"><span class="faicon ppt"></span></a>';
+
+ // Gumb za nastavitve
+ if(!$hide_button)
+ echo '<button class="small white-blue" onClick="chartAdvancedSettings(\''.$spid.'\', 1, \''.self::$current_loop.'\');"><span class="faicon wheel_32"></span>'.$lang['settings'].'</button>';
- // Izvoz posameznega grafa v PDF/RTF/PPT
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts&anketa='.self::$anketa.'&sprID='.$spid.'&loop='.$loop).'" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf"></span></a>';
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_rtf&anketa='.self::$anketa.'&sprID='.$spid.'&loop='.$loop).'" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf"></span></a>';
- // V PPT zaenkrat ne izvazamo tabel
- if($spremenljivka['tip'] != 4 && $spremenljivka['tip'] != 19 && $spremenljivka['tip'] != 21)
- echo '<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_ppt&anketa='.self::$anketa.'&sprID='.$spid.'&loop='.$loop).'" target="_blank" title="'.$lang['PPT_Izpis'].'"><span class="faicon ppt"></span></a>';
-
echo '</div>';
}
@@ -7371,13 +7394,13 @@ class SurveyChart {
global $site_path;
global $lang;
- $spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
+ $spremenljivka = isset(SurveyAnalysis::$_HEADERS[$spid])?SurveyAnalysis::$_HEADERS[$spid]:array();
// Nastavitve numeric dropdowna - obravnavamo kot number
- if($spremenljivka['tip'] == 3 && self::checkDropdownNumeric($spid)){
+ if(isset($spremenljivka['tip'])&&$spremenljivka['tip'] == 3 && self::checkDropdownNumeric($spid)){
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 1, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].':<br /> <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 1, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="5" '.($settings['type']=='5'?' selected="selected"':'').'>'.$lang['srv_chart_group_horizontal'].'</option>';
echo ' <option value="6" '.($settings['type']=='6'?' selected="selected"':'').'>'.$lang['srv_chart_group_vertical'].'</option>';
@@ -7390,7 +7413,7 @@ class SurveyChart {
// tip izpisa vrednosti
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 1, \'value_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 1, \'value_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_percent'].'</option>';
@@ -7403,7 +7426,7 @@ class SurveyChart {
if($settings['type'] < 5){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 1, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 1, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -7417,7 +7440,7 @@ class SurveyChart {
// stevilo intervalov
if($settings['type'] > 4){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_interval'].': <select id="chart_interval_'.$spid.'_loop_'.self::$current_loop.'" name="chart_interval" onchange="changeChart(\''.$spid.'\', 1, \'interval\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_interval'].': <select class="dropdown small" id="chart_interval_'.$spid.'_loop_'.self::$current_loop.'" name="chart_interval" onchange="changeChart(\''.$spid.'\', 1, \'interval\', \''.self::$current_loop.'\');">';
for($i=3; $i<=10; $i++){
echo ' <option value="'.$i.'" '.($settings['interval']==$i ?' selected="selected"':'').'>'.$i.'</option>';
@@ -7435,8 +7458,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1 || $settings['type'] == 3 || $settings['type'] == 4){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 1, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -7446,7 +7469,7 @@ class SurveyChart {
else{
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 1, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].':<br /> <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 1, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_horizontal'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_vertical'].'</option>';
@@ -7464,7 +7487,7 @@ class SurveyChart {
if($settings['type'] != 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 1, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 1, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -7478,7 +7501,7 @@ class SurveyChart {
// tip izpisa vrednosti
if($settings['type'] != 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 1, \'value_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 1, \'value_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_valid'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
@@ -7493,8 +7516,8 @@ class SurveyChart {
if($settings['type'] == 2 || $settings['type'] == 8){
echo '<div class="chart_setting">';
- echo $lang['srv_analiza_legenda'].': ';
echo '<input type="checkbox" id="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_legend" '.($settings['show_legend']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 1, \'show_legend\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_analiza_legenda'].'</label>';
echo '</div>';
}
@@ -7503,8 +7526,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1 || $settings['type'] == 3 || $settings['type'] == 4 || $settings['type'] == 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 1, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -7523,8 +7546,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 1, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -7535,8 +7558,8 @@ class SurveyChart {
$vars = count($spremenljivka['options']);
$checked = ($settings['show_avg']=='1' || ($settings['show_avg']=='-1' && $vars == 5 && SurveyDataSettingProfiles :: getSetting('chartAvgText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showAvg'].': ';
echo '<input type="checkbox" id="chart_show_avg_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_avg" '.$checked.' onchange="changeChart(\''.$spid.'\', 1, \'show_avg\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_avg_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showAvg'].'</label>';
echo '</div>';
}
@@ -7545,7 +7568,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 1, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 1, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -7555,23 +7578,13 @@ class SurveyChart {
echo '</div>';
}
-
- // 3D strukturni krog
- /*if($settings['type'] == 2){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_3d_pie'].': ';
- echo '<input type="checkbox" id="chart_3d_pie_'.$spid.'_loop_'.self::$current_loop.'" name="chart_3d_pie" '.($settings['3d_pie']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 1, \'3d_pie\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
- }*/
-
+
// Izpusti variable brez odgovora
if(($spremenljivka['tip'] != 3 || !self::checkDropdownNumeric($spid)) && $settings['type'] != 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hideEmtyVar'].': ';
echo '<input type="checkbox" id="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'" name="chart_hideEmptyVar" '.($settings['hideEmptyVar']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 1, \'hideEmptyVar\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_hideEmtyVar'].'</label>';
echo '</div>';
}
@@ -7580,8 +7593,8 @@ class SurveyChart {
if($settings['barLabel'] == 1 && ($settings['type'] == 0 || $settings['type'] == 1)){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabelSmall'].': ';
echo '<input type="checkbox" id="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabelSmall" '.($settings['barLabelSmall']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 1, \'barLabelSmall\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabelSmall'].'</label>';
echo '</div>';
}
@@ -7592,15 +7605,13 @@ class SurveyChart {
$lestvica = SurveyAnalysis::getSpremenljivkaLegenda($spremenljivka,'skalaAsValue');
- echo $lang['srv_skala'].': ';
- // Vprasajcek za pomoc
- echo Help :: display('srv_skala_edit');
+ echo '<label>'.$lang['srv_skala'].' '.Help :: display('srv_skala_edit').':</label>';
- echo '<span class="spaceLeft"></span>';
- echo '<a onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'0\', \''.self::$current_loop.'\'); return false;" href="#" title="'.$lang['srv_skala_long_0'].'"><span '.($lestvica == 0 ? ' class="strong"' : '').'>'.$lang['srv_skala_short_0'].'</span></a>';
- echo '<span class="blue"> / </span>';
- echo '<a onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'1\', \''.self::$current_loop.'\'); return false;" href="#" title="'.$lang['srv_skala_long_1'].'"><span '.($lestvica == 1 ? ' class="strong"' : '').'>'.$lang['srv_skala_short_1'].'</span></a>';
-
+ echo '<div class="scale_ordnom">';
+ echo '<button class="small '.($lestvica == 0 ? 'active' : '').'" onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'0\', \''.self::$current_loop.'\'); return false;">'.$lang['srv_skala_short_0'].'</button>';
+ echo '<button class="small '.($lestvica == 1 ? 'active' : '').'" onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'1\', \''.self::$current_loop.'\'); return false;">'.$lang['srv_skala_short_1'].'</button>';
+ echo '</div>';
+
echo '</div>';
}
}
@@ -7612,7 +7623,7 @@ class SurveyChart {
// omejitev skale
echo '<div class="chart_setting">';
- echo $lang['srv_chart_base'].': <select id="chart_base_'.$spid.'_loop_'.self::$current_loop.'" name="chart_base" onchange="changeChart(\''.$spid.'\', 2, \'base\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_base'].': <select class="dropdown small" id="chart_base_'.$spid.'_loop_'.self::$current_loop.'" name="chart_base" onchange="changeChart(\''.$spid.'\', 2, \'base\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['base']=='0'?' selected="selected"':'').'>'.$lang['srv_analiza_opisne_units'].'</option>';
echo ' <option value="1" '.($settings['base']=='1'?' selected="selected"':'').'>'.$lang['srv_analiza_opisne_arguments'].'</option>';
@@ -7622,7 +7633,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 2, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].':<br /> <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 2, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_horizontal'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_vertical'].'</option>';
@@ -7643,7 +7654,7 @@ class SurveyChart {
// Tip radarja
if($settings['type'] == '5'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 2, \'radar_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 2, \'radar_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -7655,7 +7666,7 @@ class SurveyChart {
// Postavitev skale pri radarju
if($settings['type'] == '5'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 2, \'radar_scale\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 2, \'radar_scale\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -7666,7 +7677,7 @@ class SurveyChart {
// tip izpisa vrednosti
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 2, \'value_type\', \''.self::$current_loop.'\');" '.($settings['type'] == 2 ? 'disabled="disabled"' : '').'>';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 2, \'value_type\', \''.self::$current_loop.'\');" '.($settings['type'] == 2 ? 'disabled="disabled"' : '').'>';
if($settings['base'] != '1')
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_valid'].'</option>';
@@ -7680,7 +7691,7 @@ class SurveyChart {
if($settings['type'] != 5){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 2, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 2, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -7695,8 +7706,8 @@ class SurveyChart {
if($settings['type'] == 2 || $settings['type'] == 7){
echo '<div class="chart_setting">';
- echo $lang['srv_analiza_legenda'].': ';
echo '<input type="checkbox" id="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_legend" '.($settings['show_legend']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 2, \'show_legend\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_analiza_legenda'].'</label>';
echo '</div>';
}
@@ -7705,8 +7716,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1 || $settings['type'] == 3 || $settings['type'] == 4){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 2, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -7722,8 +7733,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 2, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -7731,7 +7742,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 2, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 2, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -7745,8 +7756,8 @@ class SurveyChart {
// Izpusti variable brez odgovora
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hideEmtyVar'].': ';
echo '<input type="checkbox" id="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'" name="chart_hideEmptyVar" '.($settings['hideEmptyVar']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 2, \'hideEmptyVar\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_hideEmtyVar'].'</label>';
echo '</div>';
@@ -7754,8 +7765,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1 || $settings['type'] == 6){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_settings_fullScale'].': ';
echo '<input type="checkbox" id="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_noFixedScale" '.($settings['noFixedScale']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 2, \'noFixedScale\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_settings_fullScale'].'</label>';
echo '</div>';
}
@@ -7764,21 +7775,11 @@ class SurveyChart {
if($settings['barLabel'] == 1 && ($settings['type'] == 0 || $settings['type'] == 1)){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabelSmall'].': ';
echo '<input type="checkbox" id="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabelSmall" '.($settings['barLabelSmall']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 2, \'barLabelSmall\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabelSmall'].'</label>';
echo '</div>';
}
-
- // 3D strukturni krog
- /*if($settings['type'] == 2){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_3d_pie'].': ';
- echo '<input type="checkbox" id="chart_3d_pie_'.$spid.'_loop_'.self::$current_loop.'" name="chart_3d_pie" '.($settings['3d_pie']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 2, \'3d_pie\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
- }*/
}
// Nastavitve za number grafe (tip 7)
@@ -7788,7 +7789,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 7, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].':<br /> <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 7, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_group_horizontal'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_group_vertical'].'</option>';
@@ -7803,7 +7804,7 @@ class SurveyChart {
// tip izpisa vrednosti
if($settings['type'] != 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 7, \'value_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 7, \'value_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_percent'].'</option>';
@@ -7817,7 +7818,7 @@ class SurveyChart {
if($settings['type'] > 2 && $settings['type'] != 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 7, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 7, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -7831,14 +7832,12 @@ class SurveyChart {
// stevilo intervalov
if($settings['type'] < 3){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_interval'].': <select id="chart_interval_'.$spid.'_loop_'.self::$current_loop.'" name="chart_interval" onchange="changeChart(\''.$spid.'\', 7, \'interval\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_interval'].': <select class="dropdown small" id="chart_interval_'.$spid.'_loop_'.self::$current_loop.'" name="chart_interval" onchange="changeChart(\''.$spid.'\', 7, \'interval\', \''.self::$current_loop.'\');">';
for($i=3; $i<=10; $i++){
echo ' <option value="'.$i.'" '.($settings['interval']==$i ?' selected="selected"':'').'>'.$i.'</option>';
}
echo ' <option value="20" '.($settings['interval']=='20'?' selected="selected"':'').'>20</option>';
- //echo ' <option value="50" '.($settings['interval']=='50'?' selected="selected"':'').'>50</option>';
- //echo ' <option value="100" '.($settings['interval']=='100'?' selected="selected"':'').'>100</option>';
echo ' <option value="-1" '.($settings['interval']=='-1'?' selected="selected"':'').'>Vsi</option>';
echo '</select>';
@@ -7848,47 +7847,10 @@ class SurveyChart {
// prikaz legende
echo '<div class="chart_setting">';
- echo $lang['srv_analiza_legenda'].': ';
echo '<input type="checkbox" id="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_legend" '.($settings['show_legend']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 7, \'show_legend\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_analiza_legenda'].'</label>';
echo '</div>';
-
- // div z nastavitvami za zgornjo in spodnjo mejo
- /*echo '<fieldset class="chart_num_limits"><legend>'.$lang['srv_chart_num_limit'].'</legend>';
-
- // min
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_min'].': ';
- echo '<input type="text" id="chart_min_'.$spid.'_loop_'.self::$current_loop.'" name="chart_min" value="'.$settings['min'].'" onBlur="changeChart(\''.$spid.'\', 7, \'min\', \''.self::$current_loop.'\');" onkeypress="checkNumber(this, 6, 0);" onkeyup="checkNumber(this, 6, 0);" />';
-
- echo '</div>';
-
- // polodprt interval navzdol
- echo '<div class="chart_setting" style="text-align:right;">';
-
- echo $lang['srv_chart_open_down'].': ';
- echo '<input type="checkbox" id="chart_open_down_'.$spid.'_loop_'.self::$current_loop.'" name="chart_open_down" '.($settings['open_down']=='1'?' checked="checked"':'').' '.($settings['min']==''?' disabled="disabled"':'').' onchange="changeChart(\''.$spid.'\', 7, \'open_down\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
-
- // max
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_max'].': ';
- echo '<input type="text" id="chart_max_'.$spid.'_loop_'.self::$current_loop.'" name="chart_max" value="'.$settings['max'].'" onBlur="changeChart(\''.$spid.'\', 7, \'max\', \''.self::$current_loop.'\');" onkeypress="checkNumber(this, 6, 0);" onkeyup="checkNumber(this, 6, 0);" />';
-
- echo '</div>';
-
- // polodprt interval navzgor
- echo '<div class="chart_setting" style="text-align:right;">';
-
- echo $lang['srv_chart_open_up'].': ';
- echo '<input type="checkbox" id="chart_open_up_'.$spid.'_loop_'.self::$current_loop.'" name="chart_open_up" '.($settings['open_up']=='1'?' checked="checked"':'').' '.($settings['max']==''?' disabled="disabled"':'').' onchange="changeChart(\''.$spid.'\', 7, \'open_up\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
-
- echo '</fieldset>';*/
}
// Nastavitve za number grafe (tip 7)
@@ -7901,8 +7863,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 7, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -7912,8 +7874,8 @@ class SurveyChart {
$checked = ($settings['show_avg']=='1' || ($settings['show_avg']=='-1' && SurveyDataSettingProfiles :: getSetting('chartAvgText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showAvg'].': ';
echo '<input type="checkbox" id="chart_show_avg_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_avg" '.$checked.' onchange="changeChart(\''.$spid.'\', 7, \'show_avg\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_avg_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showAvg'].'</label>';
echo '</div>';
}
@@ -7922,8 +7884,8 @@ class SurveyChart {
if($settings['type'] != 2){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 7, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -7932,8 +7894,8 @@ class SurveyChart {
if($settings['barLabel'] == 1 && $settings['type'] != 2 && $settings['type'] != 9){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabelSmall'].': ';
echo '<input type="checkbox" id="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabelSmall" '.($settings['barLabelSmall']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 7, \'barLabelSmall\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabelSmall'].'</label>';
echo '</div>';
}
@@ -7942,7 +7904,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 7, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 7, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -7961,7 +7923,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 8, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].':<br /> <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 8, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_group_horizontal'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_group_vertical'].'</option>';
@@ -7975,7 +7937,7 @@ class SurveyChart {
// tip izpisa vrednosti
if($settings['type'] < 3){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 8, \'value_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 8, \'value_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_day'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_month'].'</option>';
@@ -7989,7 +7951,7 @@ class SurveyChart {
if($settings['type'] > 2){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 8, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 8, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -8003,56 +7965,17 @@ class SurveyChart {
// stevilo intervalov
if($settings['type'] < 3){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_interval'].': <select id="chart_interval_'.$spid.'_loop_'.self::$current_loop.'" name="chart_interval" onchange="changeChart(\''.$spid.'\', 8, \'interval\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_interval'].': <select class="dropdown small" id="chart_interval_'.$spid.'_loop_'.self::$current_loop.'" name="chart_interval" onchange="changeChart(\''.$spid.'\', 8, \'interval\', \''.self::$current_loop.'\');">';
for($i=3; $i<=10; $i++){
echo ' <option value="'.$i.'" '.($settings['interval']==$i ?' selected="selected"':'').'>'.$i.'</option>';
}
echo ' <option value="20" '.($settings['interval']=='20'?' selected="selected"':'').'>20</option>';
- //echo ' <option value="50" '.($settings['interval']=='50'?' selected="selected"':'').'>50</option>';
- //echo ' <option value="100" '.($settings['interval']=='100'?' selected="selected"':'').'>100</option>';
echo ' <option value="-1" '.($settings['interval']=='-1'?' selected="selected"':'').'>Vsi</option>';
echo '</select>';
echo '</div>';
}
-
- // div z nastavitvami za zgornjo in spodnjo mejo
- /*echo '<fieldset class="chart_num_limits"><legend>'.$lang['srv_chart_num_limit'].'</legend>';
-
- // min
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_min'].': ';
- echo '<input type="text" id="chart_min_'.$spid.'_loop_'.self::$current_loop.'" name="chart_min" value="'.$settings['min'].'" onBlur="changeChart(\''.$spid.'\', 8, \'min\', \''.self::$current_loop.'\');" onkeypress="checkNumber(this, 6, 0);" onkeyup="checkNumber(this, 6, 0);" />';
-
- echo '</div>';
-
- // polodprt interval navdol
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_open_down'].': ';
- echo '<input type="checkbox" id="chart_open_down_'.$spid.'_loop_'.self::$current_loop.'" name="chart_open_down" '.($settings['open_down']=='1'?' checked="checked"':'').' '.($settings['min']==''?' disabled="disabled"':'').' onchange="changeChart(\''.$spid.'\', 8, \'open_down\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
-
- // max
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_max'].': ';
- echo '<input type="text" id="chart_max_'.$spid.'_loop_'.self::$current_loop.'" name="chart_max" value="'.$settings['max'].'" onBlur="changeChart(\''.$spid.'\', 8, \'max\', \''.self::$current_loop.'\');" onkeypress="checkNumber(this, 6, 0);" onkeyup="checkNumber(this, 6, 0);" />';
-
- echo '</div>';
-
- // polodprt interval navgor
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_open_up'].': ';
- echo '<input type="checkbox" id="chart_open_up_'.$spid.'_loop_'.self::$current_loop.'" name="chart_open_up" '.($settings['open_up']=='1'?' checked="checked"':'').' '.($settings['max']==''?' disabled="disabled"':'').' onchange="changeChart(\''.$spid.'\', 8, \'open_up\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
-
- echo '</fieldset>';*/
}
// Nastavitve za datum grafe (tip 8)
@@ -8065,8 +7988,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 8, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8074,7 +7997,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 8, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 8, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8095,7 +8018,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 6, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 6, \'type\', \''.self::$current_loop.'\');">';
// Pri nominalnih ne prikazujemo povprecij
if($spremenljivka['skala'] != 1 && $spremenljivka['cnt_all'] != 1){
@@ -8120,15 +8043,13 @@ class SurveyChart {
echo '<div class="chart_setting">';
if($settings['rotate']=='1'){
echo $lang['srv_chart_rotate_grids'].' ';
- //echo '<input type="checkbox" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" '.($settings['rotate']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');">';
- echo '<span onclick="changeChart(\''.$spid.'\', 6, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeChart(\''.$spid.'\', 6, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" value="0">';
echo ' '.$lang['srv_chart_rotate_vars'].' ';
}
else{
echo $lang['srv_chart_rotate_vars'].' ';
- //echo '<input type="checkbox" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" '.($settings['rotate']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');">';
- echo '<span onclick="changeChart(\''.$spid.'\', 6, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeChart(\''.$spid.'\', 6, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" value="1">';
echo ' '.$lang['srv_chart_rotate_grids'];
}
@@ -8139,7 +8060,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 5 || $settings['type'] == 6){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 6, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 6, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -8153,7 +8074,7 @@ class SurveyChart {
else{
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 6, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 6, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_category'].'</option>';
@@ -8169,7 +8090,7 @@ class SurveyChart {
// tip izpisa vrednosti
if(($settings['type'] > 0 && $settings['type'] < 5) || $settings['type'] == 7){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 6, \'value_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 6, \'value_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_valid'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
@@ -8182,7 +8103,7 @@ class SurveyChart {
// Tip radarja
if($settings['type'] == 5 || $settings['type'] == 7){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 6, \'radar_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 6, \'radar_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -8194,7 +8115,7 @@ class SurveyChart {
// Postavitev skale pri radarju
if($settings['type'] == 5 || $settings['type'] == 7){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 6, \'radar_scale\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 6, \'radar_scale\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -8204,11 +8125,11 @@ class SurveyChart {
}
// prikaz desne skale pri sem. diferencialu (ver. linijski graf ali hor. strukturni stolpci)
- if($spremenljivka['enota'] == 1 && ($settings['type'] == 2 || $settings['type'] == 6)){
+ if(isset($spremenljivka['enota']) && $spremenljivka['enota'] == 1 && ($settings['type'] == 2 || $settings['type'] == 6)){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_right_scale'].': ';
echo '<input type="checkbox" id="chart_scale_limit_'.$spid.'_loop_'.self::$current_loop.'" name="chart_scale_limit" '.($settings['scale_limit']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 6, \'scale_limit\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_scale_limit_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_right_scale'].'</label>';
echo '</div>';
}
@@ -8217,8 +8138,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 5 || $settings['type'] == 6){
echo '<div class="chart_setting">';
- echo $lang['srv_analiza_legenda'].': ';
echo '<input type="checkbox" id="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_legend" '.($settings['show_legend']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 6, \'show_legend\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_analiza_legenda'].'</label>';
echo '</div>';
}
@@ -8227,8 +8148,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1 || $settings['type'] == 2){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 6, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -8246,8 +8167,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 6, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8255,7 +8176,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 2 || $settings['type'] == 4){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 6, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 6, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8269,8 +8190,8 @@ class SurveyChart {
// Izpusti variable brez odgovora
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hideEmtyVar'].': ';
echo '<input type="checkbox" id="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'" name="chart_hideEmptyVar" '.($settings['hideEmptyVar']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 6, \'hideEmptyVar\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_hideEmtyVar'].'</label>';
echo '</div>';
@@ -8278,8 +8199,8 @@ class SurveyChart {
if($settings['barLabel'] == 1 && $settings['type'] == 0){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabelSmall'].': ';
echo '<input type="checkbox" id="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabelSmall" '.($settings['barLabelSmall']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 6, \'barLabelSmall\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabelSmall'].'</label>';
echo '</div>';
}
@@ -8288,27 +8209,25 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 5 || $settings['type'] == 6){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_noFixedScale'].': ';
echo '<input type="checkbox" id="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_noFixedScale" '.($settings['noFixedScale']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 6, \'noFixedScale\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_noFixedScale'].'</label>';
echo '</div>';
}
// Preklop med ordinalno in nominalno spremenljivko
- echo '<div class="chart_setting">';
-
- $lestvica = SurveyAnalysis::getSpremenljivkaLegenda($spremenljivka,'skalaAsValue');
+ echo '<div class="chart_setting">';
- echo $lang['srv_skala'].': ';
- // Vprasajcek za pomoc
- echo Help :: display('srv_skala_edit');
-
- echo '<span class="spaceLeft"></span>';
- echo '<a onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'0\', \''.self::$current_loop.'\'); return false;" href="#" title="'.$lang['srv_skala_long_0'].'"><span '.($lestvica == 0 ? ' class="strong"' : '').'>'.$lang['srv_skala_short_0'].'</span></a>';
- echo '<span class="blue"> / </span>';
- echo '<a onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'1\', \''.self::$current_loop.'\'); return false;" href="#" title="'.$lang['srv_skala_long_1'].'"><span '.($lestvica == 1 ? ' class="strong"' : '').'>'.$lang['srv_skala_short_1'].'</span></a>';
+ $lestvica = SurveyAnalysis::getSpremenljivkaLegenda($spremenljivka,'skalaAsValue');
+
+ echo '<label>'.$lang['srv_skala'].' '.Help :: display('srv_skala_edit').':</label>';
+
+ echo '<div class="scale_ordnom">';
+ echo '<button class="small '.($lestvica == 0 ? 'active' : '').'" onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'0\', \''.self::$current_loop.'\'); return false;">'.$lang['srv_skala_short_0'].'</button>';
+ echo '<button class="small '.($lestvica == 1 ? 'active' : '').'" onclick="chartAdvancedSettingsSkala(\''.$spid.'\', \'1\', \''.self::$current_loop.'\'); return false;">'.$lang['srv_skala_short_1'].'</button>';
+ echo '</div>';
- echo '</div>';
+ echo '</div>';
}
// Nastavitve za dvojne multigrid grafe (tip 6, enota 3)
@@ -8320,7 +8239,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 62, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 62, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_horizontal'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_vertical'].'</option>';
@@ -8335,7 +8254,7 @@ class SurveyChart {
// Tip radarja
if($settings['type'] == '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 62, \'radar_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 62, \'radar_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -8347,7 +8266,7 @@ class SurveyChart {
// Postavitev skale pri radarju
if($settings['type'] == '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 62, \'radar_scale\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 62, \'radar_scale\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -8360,8 +8279,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 62, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -8379,8 +8298,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 62, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8388,7 +8307,7 @@ class SurveyChart {
if($settings['type'] == 0){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 62, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 62, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8402,8 +8321,8 @@ class SurveyChart {
// zacni skalo z 0
echo '<div class="chart_setting">';
- echo $lang['srv_chart_noFixedScale'].': ';
echo '<input type="checkbox" id="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_noFixedScale" '.($settings['noFixedScale']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 62, \'noFixedScale\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_noFixedScale'].'</label>';
echo '</div>';
}
@@ -8415,7 +8334,7 @@ class SurveyChart {
// omejitev skale
echo '<div class="chart_setting">';
- echo $lang['srv_chart_base'].': <select id="chart_base_'.$spid.'_loop_'.self::$current_loop.'" name="chart_base" onchange="changeChart(\''.$spid.'\', 16, \'base\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_base'].': <select class="dropdown small" id="chart_base_'.$spid.'_loop_'.self::$current_loop.'" name="chart_base" onchange="changeChart(\''.$spid.'\', 16, \'base\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['base']=='0'?' selected="selected"':'').'>'.$lang['srv_analiza_opisne_units'].'</option>';
echo ' <option value="1" '.($settings['base']=='1'?' selected="selected"':'').'>'.$lang['srv_analiza_opisne_arguments'].'</option>';
@@ -8425,7 +8344,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 16, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 16, \'type\', \''.self::$current_loop.'\');">';
if($settings['base'] == '1'){
echo ' <option value="2" '.($settings['type']=='2'?' selected="selected"':'').'>'.$lang['srv_chart_structure_ver'].'</option>';
@@ -8443,7 +8362,7 @@ class SurveyChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 16, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 16, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_category'].'</option>';
@@ -8458,15 +8377,13 @@ class SurveyChart {
if($settings['rotate']=='1'){
echo $lang['srv_chart_rotate_grids'].' ';
- //echo '<input type="checkbox" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" '.($settings['rotate']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');">';
- echo '<span onclick="changeChart(\''.$spid.'\', 16, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeChart(\''.$spid.'\', 16, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" value="0">';
echo ' '.$lang['srv_chart_rotate_vars'].' ';
}
else{
echo $lang['srv_chart_rotate_vars'].' ';
- //echo '<input type="checkbox" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" '.($settings['rotate']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');">';
- echo '<span onclick="changeChart(\''.$spid.'\', 16, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeChart(\''.$spid.'\', 16, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" value="1">';
echo ' '.$lang['srv_chart_rotate_grids'];
}
@@ -8475,7 +8392,7 @@ class SurveyChart {
// Tip radarja
if($settings['type'] == '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 16, \'radar_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 16, \'radar_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -8487,7 +8404,7 @@ class SurveyChart {
// Postavitev skale pri radarju
if($settings['type'] == '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 16, \'radar_scale\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 16, \'radar_scale\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -8498,7 +8415,7 @@ class SurveyChart {
// tip izpisa vrednosti
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 16, \'value_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 16, \'value_type\', \''.self::$current_loop.'\');">';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_percent'].'</option>';
echo ' <option value="2" '.($settings['value_type']=='2'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
@@ -8512,8 +8429,8 @@ class SurveyChart {
if($settings['type'] == 2 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 16, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -8529,8 +8446,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 16, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8538,7 +8455,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 16, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 16, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8552,8 +8469,8 @@ class SurveyChart {
// Izpusti variable brez odgovora
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hideEmtyVar'].': ';
echo '<input type="checkbox" id="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'" name="chart_hideEmptyVar" '.($settings['hideEmptyVar']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 16, \'hideEmptyVar\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_hideEmptyVar_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_hideEmtyVar'].'</label>';
echo '</div>';
}
@@ -8565,7 +8482,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 18, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 18, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_pie'].'</option>';
echo ' <option value="5" '.($settings['type']=='5'?' selected="selected"':'').'>'.$lang['srv_chart_3Dpie'].'</option>';
@@ -8580,7 +8497,7 @@ class SurveyChart {
// Tip radarja
if($settings['type'] == '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 18, \'radar_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 18, \'radar_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -8592,7 +8509,7 @@ class SurveyChart {
// Postavitev skale pri radarju
if($settings['type'] == '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 18, \'radar_scale\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 18, \'radar_scale\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -8605,7 +8522,7 @@ class SurveyChart {
if($settings['type'] != '4'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 18, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 18, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -8620,8 +8537,8 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 5){
echo '<div class="chart_setting">';
- echo $lang['srv_analiza_legenda'].': ';
echo '<input type="checkbox" id="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_legend" '.($settings['show_legend']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 18, \'show_legend\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_analiza_legenda'].'</label>';
echo '</div>';
}
@@ -8630,8 +8547,8 @@ class SurveyChart {
if($settings['type'] == 2 || $settings['type'] == 3){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 18, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -8647,8 +8564,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 18, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8656,7 +8573,7 @@ class SurveyChart {
if($settings['type'] == 2){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 18, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 18, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8671,21 +8588,11 @@ class SurveyChart {
if($settings['barLabel'] == 1 && ($settings['type'] == 2 || $settings['type'] == 3)){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabelSmall'].': ';
echo '<input type="checkbox" id="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabelSmall" '.($settings['barLabelSmall']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 18, \'barLabelSmall\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabelSmall'].'</label>';
echo '</div>';
}
-
- // 3D strukturni krog
- /*if($settings['type'] == 0){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_3d_pie'].': ';
- echo '<input type="checkbox" id="chart_3d_pie_'.$spid.'_loop_'.self::$current_loop.'" name="chart_3d_pie" '.($settings['3d_pie']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 18, \'3d_pie\', \''.self::$current_loop.'\');">';
-
- echo '</div>';
- }*/
}
// Nastavitve za ranking grafe (tip 17)
@@ -8695,12 +8602,11 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 17, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 17, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_avg'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_structure_hor'].'</option>';
echo ' <option value="2" '.($settings['type']=='2'?' selected="selected"':'').'>'.$lang['srv_chart_structure_ver'].'</option>';
- //echo ' <option value="3" '.($settings['type']=='3'?' selected="selected"':'').'>'.$lang['srv_chart_structure'].'</option>';
echo '</select>';
echo '</div>';
@@ -8708,7 +8614,7 @@ class SurveyChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 17, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 17, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_desc'].'</option>';
@@ -8720,11 +8626,10 @@ class SurveyChart {
// tip izpisa vrednosti
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 17, \'value_type\', \''.self::$current_loop.'\');" '.($settings['type'] == 0 ? 'disabled="disabled"' : '').'>';
+ echo $lang['srv_chart_valtype'].': <select class="dropdown small" id="chart_value_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_value_type" onchange="changeChart(\''.$spid.'\', 17, \'value_type\', \''.self::$current_loop.'\');" '.($settings['type'] == 0 ? 'disabled="disabled"' : '').'>';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_percent'].'</option>';
- //echo ' <option value="2" '.($settings['value_type']=='2'?' selected="selected"':'').'>'.$lang['srv_chart_valid'].'</option>';
echo '</select>';
echo '</div>';
@@ -8732,8 +8637,8 @@ class SurveyChart {
// prikaz label v stolpcih
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabel'].': ';
echo '<input type="checkbox" id="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 17, \'barLabel\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabel_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabel'].'</label>';
echo '</div>';
}
@@ -8748,8 +8653,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 17, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8757,7 +8662,7 @@ class SurveyChart {
if($settings['type'] == 0 || $settings['type'] == 1){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 17, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 17, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8772,8 +8677,8 @@ class SurveyChart {
if($settings['barLabel'] == 1 && $settings['type'] == 0){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_barLabelSmall'].': ';
echo '<input type="checkbox" id="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'" name="chart_barLabelSmall" '.($settings['barLabelSmall']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 17, \'barLabelSmall\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_barLabelSmall_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_barLabelSmall'].'</label>';
echo '</div>';
}
@@ -8782,8 +8687,8 @@ class SurveyChart {
if($settings['type'] == 0){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_noFixedScale'].': ';
echo '<input type="checkbox" id="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_noFixedScale" '.($settings['noFixedScale']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 17, \'noFixedScale\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_noFixedScale_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_noFixedScale'].'</label>';
echo '</div>';
}
@@ -8796,7 +8701,7 @@ class SurveyChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 20, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 20, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_vertical'].'</option>';
@@ -8809,7 +8714,7 @@ class SurveyChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 20, \'sort\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="chart_sort_'.$spid.'_loop_'.self::$current_loop.'" name="chart_sort" onchange="changeChart(\''.$spid.'\', 20, \'sort\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
echo ' <option value="1" '.($settings['sort']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_sort_category'].'</option>';
@@ -8824,15 +8729,13 @@ class SurveyChart {
if($settings['rotate']=='1'){
echo $lang['srv_chart_rotate_grids'].' ';
- //echo '<input type="checkbox" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" '.($settings['rotate']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');">';
- echo '<span onclick="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" value="0">';
echo ' '.$lang['srv_chart_rotate_vars'].' ';
}
else{
echo $lang['srv_chart_rotate_vars'].' ';
- //echo '<input type="checkbox" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" '.($settings['rotate']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');">';
- echo '<span onclick="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeChart(\''.$spid.'\', 20, \'rotate\', \''.self::$current_loop.'\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="chart_rotate_'.$spid.'_loop_'.self::$current_loop.'" name="chart_rotate" value="1">';
echo ' '.$lang['srv_chart_rotate_grids'];
}
@@ -8841,7 +8744,7 @@ class SurveyChart {
// Tip radarja
if($settings['type'] == '0'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 20, \'radar_type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="chart_radar_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_type" onchange="changeChart(\''.$spid.'\', 20, \'radar_type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -8853,7 +8756,7 @@ class SurveyChart {
// Postavitev skale pri radarju
if($settings['type'] == '0'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 20, \'radar_scale\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="chart_radar_scale_'.$spid.'_loop_'.self::$current_loop.'" name="chart_radar_scale" onchange="changeChart(\''.$spid.'\', 20, \'radar_scale\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -8873,8 +8776,8 @@ class SurveyChart {
$checked = ($settings['show_numerus']=='1' || ($settings['show_numerus']=='-1' && SurveyDataSettingProfiles :: getSetting('chartNumerusText') == 1)) ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_numerus" '.$checked.' onchange="changeChart(\''.$spid.'\', 20, \'show_numerus\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_numerus_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
@@ -8882,7 +8785,7 @@ class SurveyChart {
if($settings['type'] == 2){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 20, \'labelWidth\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="chart_labelWidth_'.$spid.'_loop_'.self::$current_loop.'" name="chart_labelWidth" onchange="changeChart(\''.$spid.'\', 20, \'labelWidth\', \''.self::$current_loop.'\');">';
echo ' <option value="75" '.($settings['labelWidth']=='75'?' selected="selected"':'').'>75%</option>';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
@@ -8901,19 +8804,19 @@ class SurveyChart {
// Tip tabele
echo '<div class="chart_setting">';
- echo $lang['srv_chart_table_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 21, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_table_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 21, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.(self::$settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_table_type_0'].'</option>';
echo ' <option value="1" '.(self::$settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_table_type_1'].'</option>';
echo '</select>';
echo '</div>';
-
- //Poravnava texta
+
+ // Poravnava texta
echo '<div class="chart_setting">';
- echo $lang['srv_chart_table_align'].': ';
echo '<input type="checkbox" id="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'" name="chart_show_legend" '.(self::$settings['show_legend']=='1'?' checked="checked"':'').' onchange="changeChart(\''.$spid.'\', 21, \'show_legend\', \''.self::$current_loop.'\');">';
+ echo '<label for="chart_show_legend_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_table_align'].'</label>';
echo '</div>';
}
@@ -8925,7 +8828,7 @@ class SurveyChart {
// Tip tabele
echo '<div class="chart_setting">';
- echo $lang['srv_chart_table_type'].':<br /> <select style="width:140px;" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 19, \'type\', \''.self::$current_loop.'\');">';
+ echo $lang['srv_chart_table_type'].': <select class="dropdown small" id="chart_type_'.$spid.'_loop_'.self::$current_loop.'" name="chart_type" onchange="changeChart(\''.$spid.'\', 19, \'type\', \''.self::$current_loop.'\');">';
echo ' <option value="0" '.(self::$settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_table_type_0'].'</option>';
echo ' <option value="1" '.(self::$settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_table_type_1'].'</option>';
@@ -8939,26 +8842,29 @@ class SurveyChart {
global $site_path;
global $lang;
+ echo '<div class="chart_settings_content">';
+
+ echo '<div class="tab_holder"><div class="tab">'.$lang['srv_chart_open_answers_settings'].'</div></div>';
+
+
echo '<div class="chart_settings_inner">';
- echo '<span class="title">'.$lang['srv_chart_settings'].'</span>';
- //Poravnava texta
+ // Poravnava texta
echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_table_align'].': ';
- echo '<input type="checkbox" id="chart_other_otherType_'.$spid.'_loop_'.self::$current_loop.'" name="chart_other_otherType" '.(self::$settings['otherType']=='1'?' checked="checked"':'').' onchange="changeOther(\''.$spid.'\', \'otherType\', \''.self::$current_loop.'\');">';
-
+ echo ' <input type="checkbox" id="chart_other_otherType_'.$spid.'_loop_'.self::$current_loop.'" name="chart_other_otherType" '.(self::$settings['otherType']=='1'?' checked="checked"':'').' onchange="changeOther(\''.$spid.'\', \'otherType\', \''.self::$current_loop.'\');">';
+ echo ' <label for="chart_other_otherType_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_table_align'].'</label>';
echo '</div>';
- //Prikaz frekvenc
+ // Prikaz frekvenc
echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_table_freq'].': ';
- echo '<input type="checkbox" id="chart_other_otherFreq_'.$spid.'_loop_'.self::$current_loop.'" name="chart_other_otherFreq" '.(self::$settings['otherFreq']=='1'?' checked="checked"':'').' onchange="changeOther(\''.$spid.'\', \'otherFreq\', \''.self::$current_loop.'\');">';
-
+ echo ' <input type="checkbox" id="chart_other_otherFreq_'.$spid.'_loop_'.self::$current_loop.'" name="chart_other_otherFreq" '.(self::$settings['otherFreq']=='1'?' checked="checked"':'').' onchange="changeOther(\''.$spid.'\', \'otherFreq\', \''.self::$current_loop.'\');">';
+ echo ' <label for="chart_other_otherFreq_'.$spid.'_loop_'.self::$current_loop.'">'.$lang['srv_chart_table_freq'].'</label>';
echo '</div>';
echo '</div>';
+
+
+ echo '</div>';
}
@@ -8972,9 +8878,33 @@ class SurveyChart {
echo '<h2>'.$spremenljivka['variable'].' - '.$spremenljivka['naslov'].'</h2>';
echo '<div class="popup_close"><a href="#" onClick="chartCloseAdvancedSettings(); return false;">✕</a></div>';
-
+
echo '<form method="post" name="chart_advanced_settings" onsubmit="chartSaveAdvancedSettings(\''.$spid.'\', \''.self::$current_loop.'\'); return false;">';
+ echo '<div class="chart_settings_wrap">';
+
+ /* ZAVIHKI NA DESNI */
+ echo '<div id="chartTabs" class="chartSettingsTabs">';
+
+ echo '<ul>';
+ echo '<li id="chartTab1" class="chartTab active" onClick="chartTabAdvancedSettings(\'1\');">';
+ echo $lang['srv_chart_advanced_labels'];
+ echo '</li>';
+ echo '<li id="chartTab2" class="chartTab" onClick="chartTabAdvancedSettings(\'2\');">';
+ echo $lang['srv_chart_advanced_colors'];
+ echo '</li>';
+ echo '<li id="chartTab3" class="chartTab" onClick="chartTabAdvancedSettings(\'3\');">';
+ echo $lang['srv_chart_advanced_recoding'];
+ echo '</li>';
+ // Tab za meje numericov
+ if(($spremenljivka['tip'] == 3 && self::checkDropdownNumeric($spid)) || $spremenljivka['tip'] == 7 || $spremenljivka['tip'] == 8 || $spremenljivka['tip'] == 22){
+ echo '<li id="chartTab4" class="chartTab" onClick="chartTabAdvancedSettings(\'4\');">';
+ echo $lang['srv_chart_advanced_limits'];
+ echo '</li>';
+ }
+ echo '</ul>';
+ echo '</div>';
+
echo '<input type="hidden" name="anketa" value="'.self::$anketa.'" />';
echo '<input type="hidden" name="spid" value="'.$spid.'" />';
echo '<input type="hidden" name="loop" value="'.self::$current_loop.'" />';
@@ -8986,7 +8916,7 @@ class SurveyChart {
echo '</div>';
// urejanje barv
- echo '<div id="chartSettingsArea2" class="chartSettingsArea" style="visibility: hidden;">';
+ echo '<div id="chartSettingsArea2" class="chartSettingsArea displayNone">';
self::displayAdvancedSettingsColors($spid);
echo '</div>';
@@ -8998,7 +8928,7 @@ class SurveyChart {
}
/* REKODIRANJE */
- echo '<div id="chartSettingsArea3" class="chartSettingsArea" style="visibility: hidden;">';
+ echo '<div id="chartSettingsArea3" class="chartSettingsArea displayNone">';
$spr_id=explode('_',$spid);
$vmv = new RecodeValues(self::$anketa,$spr_id[0]);
@@ -9007,43 +8937,14 @@ class SurveyChart {
echo '</form>';
-
- /* ZAVIHKI NA DESNI */
- echo '<div id="chartTabs" class="chartSettingsTabs">';
-
- echo '<ul>';
- echo '<li id="chartTab1" class="chartTab active" onClick="chartTabAdvancedSettings(\'1\');">';
- echo $lang['srv_chart_advanced_labels'];
- echo '</li>';
- echo '<li id="chartTab2" class="chartTab" onClick="chartTabAdvancedSettings(\'2\');">';
- echo $lang['srv_chart_advanced_colors'];
- echo '</li>';
- echo '<li id="chartTab3" class="chartTab" onClick="chartTabAdvancedSettings(\'3\');">';
- echo $lang['srv_chart_advanced_recoding'];
- echo '</li>';
- // Tab za meje numericov
- if(($spremenljivka['tip'] == 3 && self::checkDropdownNumeric($spid)) || $spremenljivka['tip'] == 7 || $spremenljivka['tip'] == 8 || $spremenljivka['tip'] == 22){
- echo '<li id="chartTab4" class="chartTab" onClick="chartTabAdvancedSettings(\'4\');">';
- echo $lang['srv_chart_advanced_limits'];
- echo '</li>';
- }
- echo '</ul>';
-
- echo '</div>';
+ echo '</div>'; #wrap
/* GUMBI NA DNU */
- echo '<div id="chartSettingsButtons" class="buttons_holder">';
-
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" onclick="chartCloseAdvancedSettings(); return false;"><span>'.$lang['srv_zapri'].'</span></a>';
- echo '</span>';
-
- echo '<span class="buttonwrapper floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" onclick="chartSaveAdvancedSettings(\''.$spid.'\', \''.self::$current_loop.'\'); return false;">'.$lang['srv_potrdi'].'</a>';
- echo '</span>';
-
- echo '</div>';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="chartCloseAdvancedSettings(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium blue" onclick="chartSaveAdvancedSettings(\''.$spid.'\', \''.self::$current_loop.'\'); return false;">'.$lang['srv_potrdi'].'</button>';
+ echo '</div>';
}
// Urejanje barv posameznega grafa
@@ -9076,17 +8977,18 @@ class SurveyChart {
for($i=0; $i<7; $i++){
$name = 'color'.($i+1);
- $value = (self::$settings['colors'][$i] != '') ? self::$settings['colors'][$i] : $default_colors[$i];
+ $value = (isset(self::$settings['colors'][$i]) && self::$settings['colors'][$i] != '') ? self::$settings['colors'][$i] : $default_colors[$i];
echo ' <div class="form-item"><label for="'.$name.'">'.$lang['srv_color'].' '.($i+1).': </label><input type="text" id="'.$name.'" name="'.$name.'" class="colorwell" value="'.$value.'" /></div>';
}
// reset na default barvo
- echo '<br /><span class="as_link clr" onClick="chartAdvancedSettingsSetColor(\''.(is_numeric(self::$skin) ? implode("_",$default_colors) : self::$skin).'\')">'.$lang['srv_chart_advanced_default_color'].'</span>';
+ echo '<p class="as_link top16 bottom16" onClick="chartAdvancedSettingsSetColor(\''.(is_numeric(self::$skin) ? implode("_",$default_colors) : self::$skin).'\')">'.$lang['srv_chart_advanced_default_color2'].'</p>';
// nastavitev ene od palet
- echo '<br /><span class="clr">'.$lang['srv_chart_advanced_skin'].': ';
- echo '<select name="chart_advanced_color" id="chart_advanced_color" onChange="chartAdvancedSettingsSetColor(this.value)">';
+ echo '<div class="setting_holder">';
+ echo '<p>'.$lang['srv_chart_advanced_skin'].': ';
+ echo '<select class="dropdown large" name="chart_advanced_color" id="chart_advanced_color" onChange="chartAdvancedSettingsSetColor(this.value)">';
echo ' <option' . (self::$skin == '1ka' ? ' selected="selected"' : '') . ' value="1ka">'.$lang['srv_chart_skin_1ka'].'</option>';
echo ' <option' . (self::$skin == 'lively' ? ' selected="selected"' : '') . ' value="lively">'.$lang['srv_chart_skin_0'].'</option>';
echo ' <option' . (self::$skin == 'mild' ? ' selected="selected"' : '') . ' value="mild">'.$lang['srv_chart_skin_1'].'</option>';
@@ -9103,7 +9005,7 @@ class SurveyChart {
}
- echo '</select></span>';
+ echo '</select></p></div>';
}
@@ -9114,18 +9016,24 @@ class SurveyChart {
$row = Cache::srv_spremenljivka($spid);
$disabled = ($row['edit_graf'] == 0) ? ' disabled="disabled"' : '';
+ $gray = ($row['edit_graf'] == 0) ? ' gray' : '';
- echo '<div><p>';
- echo $lang['srv_chart_advanced_useLabels'].':';
- echo '<label for="edit_graf_0"><input type="radio" value="0" name="edit_graf" id="edit_graf_0" '.(($row['edit_graf'] == 0) ? ' checked="checked" ' : '').' onClick="edit_labels(\'0\');" />';
+ echo '<div class="new_labels"><p>';
+ echo $lang['srv_chart_advanced_useLabels'].':</p>';
+ echo '<input type="radio" value="0" name="edit_graf" id="edit_graf_0" '.(($row['edit_graf'] == 0) ? ' checked="checked" ' : '').' onClick="edit_labels(\'0\');" />';
+ echo '<label for="edit_graf_0">';
echo $lang['no'].'</label>';
- echo ' <label for="edit_graf_1"><input type="radio" value="1" name="edit_graf" id="edit_graf_1" '.(($row['edit_graf'] == 1) ? ' checked="checked" ' : '').' onClick="edit_labels(\'1\');" />';
+
+ echo '<input type="radio" value="1" name="edit_graf" id="edit_graf_1" '.(($row['edit_graf'] == 1) ? ' checked="checked" ' : '').' onClick="edit_labels(\'1\');" />';
+ echo ' <label for="edit_graf_1">';
echo $lang['yes'].'</label>';
echo '</p></div>';
+ echo '<div class="chart_editing">';
+
+ echo '<p id="title_edit" class="top16'.$gray.'">'.$lang['srv_notifications_send_title'].':</p>';
- echo '<div class="chart_editing">';
// Urejanje naslova spremenljivke
$text = $row['naslov_graf'] == '<p></p>' ? $row['naslov'] : $row['naslov_graf'];
@@ -9133,9 +9041,7 @@ class SurveyChart {
$text = substr($text, 3);
$text = substr($text, 0, -4);
}
- echo '<p>';
- echo '<textarea style="width:99%; height:50px;" name="naslov_graf" id="naslov_graf" class="chart_label" '.$disabled.'>'.$text.'</textarea>';
- echo '</p>';
+ echo '<textarea class="textarea" name="naslov_graf" id="naslov_graf" class="chart_label" '.$disabled.'>'.$text.'</textarea>';
// Urejanje label za gride
@@ -9152,7 +9058,7 @@ class SurveyChart {
}
//dodatne vrednosti (ne vem, zavrnil...)
- if (count($already_set_mv) > 0 ) {
+ /* if (count($already_set_mv) > 0 ) {
echo '<td></td>';
if (count($missing_values) > 0) {
foreach ($missing_values AS $mv_key => $mv_text) {
@@ -9161,7 +9067,7 @@ class SurveyChart {
}
}
}
- }
+ } */
echo '</tr>';
echo '<tr>';
@@ -9169,20 +9075,20 @@ class SurveyChart {
$sql1 = sisplet_query("SELECT naslov, naslov_graf FROM srv_grid WHERE id='$i' AND spr_id='$spid'");
$row1 = mysqli_fetch_array($sql1);
$text = $row1['naslov_graf'] == '' ? $row1['naslov'] : $row1['naslov_graf'];
- echo '<td><input type="text" maxlength="30" name="grid_graf_'.$i.'" id="grid_naslov_'.$i.'_graf" class="chart_label" value="'.$text.'" '.$disabled.' /></td>';
+ echo '<td><input type="text" class="text medium wauto" maxlength="30" name="grid_graf_'.$i.'" id="grid_naslov_'.$i.'_graf" class="chart_label" value="'.$text.'" '.$disabled.' /></td>';
}
//dodatne vrednosti (ne vem, zavrnil...)
- if (count($already_set_mv) > 0 ) {
+ /* if (count($already_set_mv) > 0 ) {
echo '<td></td>';
if (count($missing_values) > 0) {
foreach ($missing_values AS $mv_key => $mv_text) {
if (isset($already_set_mv[$mv_key])) {
- echo '<td><input type="text" maxlength="30" name="grid_'.$mv_key.'_graf" class="chart_label" value="'.$already_set_mv[$mv_key].'" '.$disabled.' /></td>';
+ echo '<td><input type="text" class="text medium wauto" maxlength="30" name="grid_'.$mv_key.'_graf" class="chart_label" value="'.$already_set_mv[$mv_key].'" '.$disabled.' /></td>';
}
}
}
- }
+ } */
echo '</tr>';
echo '</table>';
@@ -9201,9 +9107,9 @@ class SurveyChart {
$text = $row1['naslov_graf'] == '' ? $row1['naslov'] : $row1['naslov_graf'];
- echo '<li id="vrednost_'.$vrednost.'" '.($row1['other'] == 1 ? 'class="li_other"' : '').'>';
+ echo '<li id="vrednost_'./* $vrednost. */'" '.($row1['other'] == 1 ? 'class="li_other"' : '').'>';
- echo '<textarea maxlength="30" name="vrednost_graf_'.$row1['id'].'" id="'.$row1['variable'].'_graf" class="vrednost_textarea chart_label" style="width:60%; height:15px;" '.$disabled.'>'.$text.'</textarea> ';
+ echo '<textarea maxlength="30" name="vrednost_graf_'.$row1['id'].'" id="'.$row1['variable'].'_graf" class="vrednost_textarea chart_label" '.$disabled.'>'.$text.'</textarea> ';
echo '['.$row1['variable'].']</span>';
if ($row1['other'] == 1) echo ' <input type="text" disabled style="width:40px" />';
@@ -9348,9 +9254,9 @@ class SurveyChart {
global $lang;
if(!is_countable(SurveyAnalysis::$_LOOPS) || count(SurveyAnalysis::$_LOOPS) == 0)
- self::$sessionData[$spid] = $settings;
+ self::$sessionData[$spid] = self::$settings;
else
- self::$sessionData[$spid][SurveyAnalysis::$_CURRENT_LOOP['cnt']] = $settings;
+ self::$sessionData[$spid][SurveyAnalysis::$_CURRENT_LOOP['cnt']] = self::$settings;
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
# če je besedilo * in je samo ena kategorija je inline legenda false
@@ -9374,7 +9280,7 @@ class SurveyChart {
foreach ($grid['variables'] AS $vid => $variable ){
$_sequence = $variable['sequence']; # id kolone z podatki
- if(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0)
+ if(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])&&SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'] > 0)
$emptyData = false;
}
}
@@ -9397,16 +9303,16 @@ class SurveyChart {
echo '<div class="chart_title">'.$stevilcenje . $title.'</div>';
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_br anl_bb" style="font-size: '.(self::$fontSize+3).'px !important; padding:0px; margin-top:5px !important; border-collapse: collapse; width: 800px;">';
+ echo '<table>';
if(self::$settings['type']==1){
- echo '<tr>';
+ echo '<tr class="row1">';
+
#odgovori
echo '<td class="anl_bl anl_br anl_bb anl_ac">'.$lang['srv_analiza_frekvence_titleAnswers'] . '</td>';
echo '<td class="anl_br anl_bb anl_ac anl_w70">'. $lang['srv_analiza_frekvence_titleFrekvenca'] .'</td>';
echo '</tr>';
- // konec naslovne vrstice
}
$_answersOther = array();
@@ -9492,8 +9398,8 @@ class SurveyChart {
echo '</div>';
// Izpisemo nastavitve za tabele
- echo '<div class="chart_settings printHide iconHide" style="margin-top: 5px;">';
- self::displaySingleSettings($spid);
+ echo '<div class="chart_settings table_settings printHide iconHide">';
+ self::displaySingleSettingsTable($spid);
echo '</div>';
# izpišemo še tekstovne odgovore za polja drugo
@@ -9789,7 +9695,7 @@ class SurveyChart {
echo '<div class="chart_title">'.$stevilcenje . $title.'</div>';
- echo '<table class="anl_tbl anl_bt anl_br anl_bb" style="font-size: '.(self::$fontSize+3).'px !important; padding:0px; margin:0px; border-collapse: collapse;">' . NEW_LINE;
+ echo '<table style="font-size: '.(self::$fontSize+3).'px !important; padding:0px; margin:0px; border-collapse: collapse;">' . NEW_LINE;
$counter = 0;
$_kumulativa = 0;
@@ -9827,9 +9733,9 @@ class SurveyChart {
$spremenljivka = SurveyAnalysis::$_HEADERS[$spid];
if(!is_countable(SurveyAnalysis::$_LOOPS) || count(SurveyAnalysis::$_LOOPS) == 0)
- self::$sessionData[$spid] = $settings;
+ self::$sessionData[$spid] = self::$settings;
else
- self::$sessionData[$spid][SurveyAnalysis::$_CURRENT_LOOP['cnt']] = $settings;
+ self::$sessionData[$spid][SurveyAnalysis::$_CURRENT_LOOP['cnt']] = self::$settings;
# koliko zapisov prikažemo naenkrat
$num_show_records = (self::$num_records == 0) ? 10 : self::$num_records;
@@ -9843,6 +9749,7 @@ class SurveyChart {
return;
}
+
echo '<div class="chart_holder" id="chart_'.$spid.'_loop_'.self::$current_loop.'">';
//div za pozicijo popupa
echo '<div id="'.$spid.'"></div>';
@@ -9862,16 +9769,17 @@ class SurveyChart {
$_all_valid_answers_cnt = $_answers['validCnt'];
$_valid_answers = $_answers['valid'];
+
# tekst vprašanja
- echo '<table class="anl_tbl anl_bt anl_bb" style="font-size: '.(self::$fontSize+3).'px !important; padding:0px; margin:0px; border-collapse: collapse;">' . NEW_LINE;
+ echo '<table>' . NEW_LINE;
# naslovna vrstica
if(self::$settings['type']==1){
- echo '<tr>';
- #odgovori
- echo '<td class="anl_br anl_bl anl_bb anl_ac">'.$lang['srv_analiza_opisne_subquestion'] . '</td>';
+ echo '<tr class="row1">';
- echo '<td class="anl_br anl_bb anl_ac" colspan="'.($_cols).'">'. $lang['srv_analiza_opisne_arguments'] .'</td>';
+ #odgovori
+ echo '<td>'.$lang['srv_analiza_opisne_subquestion'] . '</td>';
+ echo '<td colspan="'.($_cols).'">'. $lang['srv_analiza_opisne_arguments'] .'</td>';
echo '</tr>';
}
@@ -9880,17 +9788,19 @@ class SurveyChart {
$_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_br anl_bb">&nbsp;</td>';
+
+ echo '<tr class="row2">';
+
+ echo '<td>&nbsp;</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_ac anl_str">';
- // echo $_col['variable'];
+ echo '<td>';
echo $_col['naslov'];
echo '</td>';
} else {
@@ -9912,7 +9822,7 @@ class SurveyChart {
$_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,SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']));
+ $_max_i = max($_max_i,min($num_show_records,(isset(SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt'])?SurveyAnalysis::$_FREQUENCYS[$_sequence]['validCnt']:0)));
}
# za barvanje
@@ -9925,8 +9835,9 @@ class SurveyChart {
if ($variable['other'] != true) {
# tabela z navedbami
- echo '<td class=" anl_at" style="padding: 0pt; margin: 0pt; border-collapse: collapse; vertical-align:top;" >';
- echo '<table class="fullWidth anl_ac" style="padding:0; margin:0; border-collapse: collapse; vertical-align:top;">';
+ echo '<td class="cell_value cell_noPadding">';
+
+ echo '<table class="cell_table">';
$index=0;
if (count($_valid_answers) > 0) {
@@ -9970,8 +9881,8 @@ class SurveyChart {
echo '</div>';
// Izpisemo nastavitve za tabele
- echo '<div class="chart_settings printHide iconHide" style="margin-top: 5px;">';
- self::displaySingleSettings($spid);
+ echo '<div class="chart_settings table_settings printHide iconHide">';
+ self::displaySingleSettingsTable($spid);
echo '</div>';
echo '</div>';
@@ -10028,12 +9939,12 @@ class SurveyChart {
- if (isset ($_POST['what']))
- $what = $_POST['what'];
if (isset ($_POST['value']))
$value = $_POST['value'];
-
- self::$settings[$what] = $value;
+ if (isset ($_POST['what'])){
+ $what = $_POST['what'];
+ self::$settings[$what] = $value;
+ }
if (isset ($_POST['num_records'])){
@@ -10327,8 +10238,8 @@ class SurveyChart {
$other = '0';
# manjkoajoče vrednosti (ne vem, zavrnil ...
- if (isset($_POST['missing_value_checkbox']) && is_array($_POST['missing_value_checkbox'])) {
- if (in_array($grid, $_POST['missing_value_checkbox'])) {
+ if (isset($_POST['missing_value_checkbox_'.$spid]) && is_array($_POST['missing_value_checkbox_'.$spid])) {
+ if (in_array($grid, $_POST['missing_value_checkbox_'.$spid])) {
# grid je manjkajoča vrednost
$other = $grid.'';
$id = $grid;
@@ -10536,16 +10447,15 @@ class SurveyChart {
global $lang;
- echo '<h2 style="margin-bottom:5px;">'.$lang['srv_chart_skin_long'].'</h2>';
- echo '<span style="font-size: 12px; font-style: italic;">'.$lang['srv_chart_skin_info'].'</span><br/><br/>';
-
- // Opozorilo na vrhu
+ echo '<h2>'.$lang['srv_chart_skin_long'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onClick="close_chartColor(); return false;">✕</a></div>';
+
+ // Opozorilo - privzetih ne morejo spreminjati
if(!is_numeric($skin)){
echo '<div id="chart_skin_note">';
echo $lang['srv_chart_skin_warning'];
echo '</div>';
- echo '<br class="clr" />'."\n";
- }
+ }
echo '<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
@@ -10566,12 +10476,13 @@ class SurveyChart {
</script>';
+ echo '<div id="chart_settings_profiles_wrap">';
echo '<div id="chart_settings_profiles_left">';
-
+
// Prednastavljeni skini
- echo '<span class="bold">'.$lang['srv_chart_skin_default'].':</span>';
- echo '<span class="chart_profiles_holder" style="margin-bottom: 10px; height: 144px;">';
- echo '<span id="chart_profiles" class="chart_profiles select">';
+ echo '<p>'.$lang['srv_chart_skin_default'].':</p>';
+ echo '<div class="chart_profiles_holder">';
+ echo '<div id="chart_profiles" class="chart_profiles select">';
echo '<div class="option'.($skin == '1ka' ? ' active' : '').'" id="chart_profile_skin_1ka" value="1ka">'.$lang['srv_chart_skin_1ka'].'</div>';
echo '<div class="option'.($skin == 'lively' ? ' active' : '').'" id="chart_profile_skin_0" value="lively">'.$lang['srv_chart_skin_0'].'</div>';
@@ -10583,34 +10494,39 @@ class SurveyChart {
echo '<div class="option'.($skin == 'red' ? ' active' : '').'" id="chart_profile_skin_4" value="red">'.$lang['srv_chart_skin_4'].'</div>';
echo '<div class="option'.($skin == 'multi' ? ' active' : '').'" id="chart_profile_skin_5" value="multi">'.$lang['srv_chart_skin_5'].'</div>';
- echo '</span>';
- echo '</span>';
+ echo '</div>';
+ echo '</div>';
// Custom kreirani skini
$custom_skins = self::getCustomSkins();
- echo '<span class="bold">'.$lang['srv_chart_skin_custom'].':</span>';
- echo '<span class="chart_profiles_holder">';
- echo '<span id="chart_profiles_custom" class="chart_profiles select">';
+ echo '<p>'.$lang['srv_chart_skin_custom'].':</p>';
+ echo '<div class="chart_profiles_holder">';
+ echo '<div id="chart_profiles_custom" class="chart_profiles select">';
foreach ($custom_skins as $custom_skin ){
echo '<div class="option'.($skin == $custom_skin['id'] ? ' active' : '').'" id="chart_profile_skin_'.$custom_skin['id'].'" value="'.$custom_skin['id'].'">'.$custom_skin['name'].'</div>';
}
- echo '</span>';
- echo '</span>';
+ echo '</div>';
+ echo '</div>';
// Ce je izbran custom skin imamo na dnu gumba brisi in preimenuj
if(is_numeric($skin)){
- echo '<a href="#" onclick="chart_skin_action(\'show_rename\'); return false;">'.$lang['srv_rename_profile'].'</a><br/>'."\n";
- echo '<a href="#" onclick="chart_skin_action(\'show_delete\'); return false;">'.$lang['srv_delete_profile'].'</a>'."\n";
+
+ echo '<div class="button_holder">';
+ echo '<button class="small white-blue" onClick="chart_skin_action(\'show_rename\'); return false;">'.$lang['srv_rename_profile'].'</button>';
+ echo '<button class="small blue" onclick="chart_skin_action(\'show_delete\'); return false;">'.$lang['srv_delete_profile'].'</button>';
+ echo '</div>';
}
- echo '</div>';
+ echo '</div>'; #left
- echo '<div id="chart_settings_profiles_right">';
+ echo '<div id="chart_settings_profiles_middle">';
+
+ echo '<p class="bottom8">'.$lang['srv_chart_skin_long2'].':</p>';
// ce je numeric je custom skin
if(is_numeric($skin)){
@@ -10623,70 +10539,101 @@ class SurveyChart {
else{
// preview za default skine
echo '<div id="div_chart_skin_previews">';
- echo $lang['srv_chart_skin_preview'].':';
+ echo '<h2>'.$lang['srv_chart_skin_preview'].'</h2>';
self::displayChartSkinPreview($skin);
echo '</div>';
$default_colors = self::getDefaultColors($skin);
}
-
- // Izbira custom skina
- echo '<div id="chart_custom_skin">';
-
- echo ' <div id="picker" style="float: right;"></div>';
-
for($i=0; $i<7; $i++){
$name = 'color'.($i+1);
//$value = (self::$settings['colors'][$i] != '') ? self::$settings['colors'][$i] : $default_colors[$i];
$value = $default_colors[$i];
- echo ' <div class="form-item"><label for="'.$name.'">'.$lang['srv_color'].' '.($i+1).': </label><input type="text" id="'.$name.'" name="'.$name.'" class="colorwell" value="'.$value.'" /></div>';
+ echo ' <div class="form-item"><label for="'.$name.'">'.$lang['srv_color'].' '.($i+1).': </label><input onfocus="toggleGrafiColorWheel();" type="text" id="'.$name.'" name="'.$name.'" class="colorwell" value="'.$value.'" /></div>';
}
// reset na default barvo
- echo '<br /><span class="as_link clr" onClick="chartAdvancedSettingsSetColor(\''.(is_numeric($skin) ? implode("_",$colors) : $skin).'\')">'.$lang['srv_chart_advanced_default_color'].'</span>';
-
- echo '</div>';
+ echo '<p class="as_link top8" onClick="chartAdvancedSettingsSetColor(\''.(is_numeric($skin) ? implode("_",$colors) : $skin).'\')">'.$lang['srv_chart_advanced_default_color2'].'</p>';
- echo '</div>';
+ echo '</div>'; #middle
+ echo '<div id="chart_settings_profiles_right">';
+
+ // Izbira custom skina
+ echo '<div id="chart_custom_skin_cover">';
+ echo '<div id="chart_custom_skin">';
+
+ echo '<div id="picker"></div>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>'; #right
+ echo '</div>'; #wrap
+
// cover Div
- echo '<div id="dsp_cover_div"></div>'."\n";
+ echo '<div id="dsp_cover_div"></div>';
// div za kreacijo novega
- echo '<div id="newChartSkin">'.$lang['srv_missing_profile_name'].': '."\n";
- echo '<input id="newChartSkinName" name="newChartSkinName" type="text" value="" size="50" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="chart_skin_action(\'new\'); return false;"><span>'.$lang['srv_analiza_arhiviraj_save'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="chart_skin_action(\'cancel_new\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="newChartSkin">';
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<label>'.$lang['srv_missing_profile_name'].':</label>';
+ echo '<input id="newChartSkinName" name="newChartSkinName" type="text" class="text large" value=""/>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="chart_skin_action(\'cancel_new\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo '<button class="medium blue" onclick="chart_skin_action(\'new\'); return false;">'.$lang['srv_analiza_arhiviraj_save'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
// div za preimenovanje
- echo '<div id="renameChartSkin">'.$lang['srv_missing_profile_name'].': '."\n";
- echo '<input id="renameChartSkinName" name="renameChartSkinName" type="text" value="' . $custom_skin['name'] . '" size="50" />'."\n";
- echo '<input id="renameChartSkinId" type="hidden" value="' . $custom_skin['id'] . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="chart_skin_action(\'rename\'); return false;"><span>'.$lang['srv_rename_profile_yes'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="chart_skin_action(\'cancel_rename\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="renameChartSkin">';
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<label>'.$lang['srv_missing_profile_name'].':</label>';
+ echo '<input id="renameChartSkinName" name="renameChartSkinName" type="text" value="' . $custom_skin['name'] . '" class="text large" value=""/>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="chart_skin_action(\'cancel_rename\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo '<button class="medium blue" onclick="chart_skin_action(\'rename\'); return false;">'.$lang['srv_rename_profile_yes'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
// div za brisanje
- echo '<div id="deleteChartSkin">'.$lang['srv_missing_profile_delete_confirm'].': <b>' . $custom_skin['name'] . '</b>?'."\n";
+ echo '<div id="deleteChartSkin">';
+
+
+ echo $lang['srv_missing_profile_delete_confirm'].': <span class="semi-bold">' . $custom_skin['name'] . '</span>?';
echo '<input id="deleteChartSkinId" type="hidden" value="' . $custom_skin['id'] . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="chart_skin_action(\'delete\'); return false;"><span>'.$lang['srv_delete_profile_yes'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="chart_skin_action(\'cancel_delete\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
-
-
- echo '<span class="clr"></span>';
- echo '<div style="position:absolute; bottom:20px; right:20px;">';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="chart_skin_action(\'cancel_delete\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo '<button class="medium blue" onclick="chart_skin_action(\'delete\'); return false;">'.$lang['srv_delete_profile_yes'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-black" onClick="close_chartColor(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium white-blue" onClick="chart_skin_action(\'show_new\'); return false;">'.$lang['srv_save_new_selection'].'</button>';
+ echo '<button class="medium blue" onclick="save_chartColor(); return false;">'.$lang['save'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="save_chartColor(); return false;"><span>'.$lang['save'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight" title="'.$lang['srv_save_new_profile'].'"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="chart_skin_action(\'show_new\'); return false;"><span>'.$lang['srv_save_new_profile'] . '</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="close_chartColor(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
-
- echo '</div>';
}
static function displayChartSkinPreview ($skin) {
@@ -10806,7 +10753,7 @@ class SurveyChart {
echo '</script>';
echo '</head>';
- echo '<body style="margin:5px; padding:5px;" >';
+ echo '<body class="public_link charts" style="margin:5px; padding:5px;" >';
echo '<h2>'.$lang['srv_publc_chart_title_for'] . self::$survey['naslov'].'</h2>';
echo '<input type="hidden" name="anketa_id" id="srv_meta_anketa_id" value="' . $anketa . '" />';
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyCrosstabs.php b/admin/survey/classes/surveyAnalysis/class.SurveyCrosstabs.php
index e0f4e85..532fc5c 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyCrosstabs.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyCrosstabs.php
@@ -5,12 +5,12 @@
*
*/
-define("EXPORT_FOLDER", "admin/survey/SurveyData");
+if(!defined("EXPORT_FOLDER")) define("EXPORT_FOLDER", "admin/survey/SurveyData");
# mejne vrednosti za barvanje residualov
-define("RESIDUAL_COLOR_LIMIT1", 1.00);
-define("RESIDUAL_COLOR_LIMIT2", 2.00);
-define("RESIDUAL_COLOR_LIMIT3", 3.00);
-define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti
+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("AUTO_HIDE_ZERRO_VALUE")) define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti
@session_start();
@@ -104,9 +104,13 @@ class SurveyCrosstabs {
# polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->sid);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+
+ // Pri glasovanju tega ne pustimo
+ if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
+ die();
+ }
+
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
# Inicializiramo in polovimo nastavitve missing profila
@@ -198,11 +202,11 @@ class SurveyCrosstabs {
$this->variablesList = array();
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($this->_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'))) {
continue;
}
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip']) ? $spremenljivka['tip'] : null;
if (is_numeric($tip)
# tekstovnih tipov ne dodajamo
@@ -299,7 +303,7 @@ class SurveyCrosstabs {
# imamo več gridov - tabele
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable']) && $grid['variable'] != '') {
$sub++;
$this->variablesList[] = array(
'tip'=>$tip,
@@ -367,76 +371,105 @@ class SurveyCrosstabs {
*
*/
function Display() {
+ global $lang;
+
# preberemo prednastavljene variable iz seje, če obstajajo
$this->presetVariables();
if ($this->dataFileStatus == FILE_STATUS_NO_DATA
- || $this->dataFileStatus == FILE_STATUS_NO_FILE
- || $this->dataFileStatus == FILE_STATUS_SRV_DELETED){
+ || $this->dataFileStatus == FILE_STATUS_NO_FILE
+ || $this->dataFileStatus == FILE_STATUS_SRV_DELETED){
+
return false;
}
- global $lang;
- # polovimo nastavtve missing profila
- //$this->missingProfileData = SurveyMissingProfiles::getProfile($this->currentMissingProfile);
+ echo '<div class="crosstab_top_holder">';
+ // Izbira spremenljivk
echo '<div id="crosstab_drobdowns">';
$resultIsCheckbox = $this->DisplayDropdows();
echo '</div>';
- echo '<div id="div_crossCheck" class="floatLeft spaceLeft">' ;
+
+
+ // Nastavitve
+ echo '<div id="crosstab_settings" class="crosstab_settings">';
+
+ echo ' <div class="setting_line">';
+ echo $lang['srv_analiza_crosstab_table_settings'].':';
+ echo ' </div>';
+
$this->displayLinePercent();
$this->displayResidual();
$this->displayShowChart();
+
+ echo '</div>';
+
+
+ // Nastavitve 2
if ( $resultIsCheckbox['is_check']) {
- echo '<div id="crossNavedbeVsENote">';
- echo '<input type="radio" name="crossNavVsEno" id="crossNavVsEno0" vlaue="0" '.($this->crossNavVsEno == 0 ? ' checked="checked" ' : '' ).' onchange="change_crosstab(); return false;" autocomplete="off">'.
- '<label for="crossNavVsEno0">'.$lang['srv_analiza_crosstab_navedbe'].'</label>';
- echo '<input type="radio" name="crossNavVsEno" id="crossNavVsEno1" vlaue="1" '.($this->crossNavVsEno == 1? ' checked="checked" ' : '' ).' onchange="change_crosstab(); return false;" autocomplete="off">'.
- '<label for="crossNavVsEno1">'.$lang['srv_analiza_crosstab_enote'].'</label>';
- echo '</div>';
+
+ echo '<div id="crosstab_settings_2" class="crosstab_settings">';
+
+ echo ' <div class="setting_line">';
+ echo $lang['srv_analiza_crosstab_answer_settings'].':';
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <input type="radio" name="crossNavVsEno" id="crossNavVsEno0" vlaue="0" '.($this->crossNavVsEno == 0 ? ' checked="checked" ' : '' ).' onchange="change_crosstab(); return false;" autocomplete="off">';
+ echo ' <label for="crossNavVsEno0">'.$lang['srv_analiza_crosstab_navedbe'].'</label>';
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <input type="radio" name="crossNavVsEno" id="crossNavVsEno1" vlaue="1" '.($this->crossNavVsEno == 1? ' checked="checked" ' : '' ).' onchange="change_crosstab(); return false;" autocomplete="off">';
+ echo ' <label for="crossNavVsEno1">'.$lang['srv_analiza_crosstab_enote'].'</label>';
+ echo ' </div>';
+
+ echo '</div>';
}
- echo '</div>';
-
+
+ echo '</div>';
- $this->displayExport();
- $this->displayCrosstabCheckboxes();
- echo '<div id="crosstab_table">';
+
+ // Tabele
+ echo '<div id="crosstab_tables">';
$this->displayCrosstabsTables();
echo '</div>';
}
function DisplayDropdows() {
global $lang;
+
$variables = $this->getVariableList();
$multiple = true;
- echo '<div id="crossLeftHolder" >';
+
+ echo '<div id="crossLeftHolder">';
# iz header datoteke preberemo spremenljivke
#js: $("#crosstab_variable_1, #crosstab_variable_2").live('click', function() {})
if (count($this->variabla1) > 0) {
- $br=null;
- echo $lang['srv_crosstab_label1'].'<br/>';
- if ((int)$this->variabla1['0']['seq'] > 0) {
- echo '<span class="pointer" id="crosstab_add_new" onclick="add_new_variable(\'1\');"><span class="faicon add small icon-as_link" title=""></span></span>';
- }
+
+ echo '<div class="title">'.$lang['srv_crosstab_label1'].'</div>';
+
+ echo '<div id="crossLeftDropdowns">';
+
foreach($this->variabla1 AS $_key => $variabla1) {
- echo $_br;
- echo '<span id="v1_'.$_key.'">';
+
+ echo '<div id="v1_'.$_key.'" class="variabla_line">';
- echo '<select name="crosstab_variable_1" id="crosstab_variable_1" onchange="change_crosstab(); return false;" autocomplete="off">';
+ echo '<select name="crosstab_variable_1" id="crosstab_variable_1" class="dropdown large" onchange="change_crosstab(); return false;" autocomplete="off">';
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_izberi_prvo'] . '</option>';
}
foreach ($variables as $variable) {
- echo '<option value="' . $variable['sequence'] . '" spr_id="'.$variable['spr_id'].'" '
+ echo '<option value="' . (isset($variable['sequence']) ? $variable['sequence'] : '') . '" spr_id="'.(isset($variable['spr_id']) ? $variable['spr_id'] : '').'" '
. ( isset($variable['grd_id']) ? ' grd_id="'.$variable['grd_id'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- . ( ($variabla1['seq'] > 0 &&$variabla1['seq'] == $variable['sequence']) ? ' selected="selected" ' : '')
+ . ( ($variabla1['seq'] > 0 && isset($variable['sequence']) && $variabla1['seq'] == $variable['sequence']) ? ' selected="selected" ' : '')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
. $variable['variableNaslov'] . '</option>';
@@ -444,41 +477,54 @@ class SurveyCrosstabs {
}
echo '</select>';
+
+ // Gumb odstrani
+ echo '<div class="crosstab_remove_holder">';
if (count($this->variabla1) > 1) {
- echo '<span class="pointer" id="crosstab_remove" onclick="crs_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
- } else {
- #echo '<span class="space_crosstab_new">&nbsp;</span>';
- }
+ echo '<span class="faicon delete_circle" id="crosstab_remove" onclick="crs_remove_variable(this);"></span>';
+ }
+ echo '</div>';
+
+ echo '</div>';
+ }
+
+ echo '</div>';
+
- $_br = '<br/><span class="space_crosstab_new">&nbsp;</span>';
- echo '</span>';
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<button class="blue small" id="crosstab_add_new" onclick="add_new_variable(\'1\');">'.$lang['srv_multicrosstabs_add'].'</button>';
}
- $_br = null;
}
echo '</div>';
+
+
echo '<div id="crossImgHolder">';
- echo '<br/>';
+
if ($this->isSelectedBothVariables()) {
- echo '<span class="faicon replace icon-as_link" title="'.$lang['srv_replace'].'" onclick="change_crosstab(\'rotate\');return false;" />';
- } else {
- echo '<span class="faicon replace icon-grey_normal" title="'.$lang['srv_replace'].'" />';
+ echo '<span class="faicon replace" title="'.$lang['srv_replace'].'" onclick="change_crosstab(\'rotate\');return false;" />';
+ }
+ else {
+ echo '<span class="faicon replace gray" title="'.$lang['srv_replace'].'" />';
}
+
echo '</div>';
+
echo '<div id="crossRightHolder">';
- echo $lang['srv_crosstab_label2'].'<br/>';
+
+ echo '<div class="title">'.$lang['srv_crosstab_label2'].'</div>';
+
# za vsako novo spremenljivko 2 nardimo svoj select
if (count($this->variabla2) > 0) {
- if ((int)$this->variabla1['0']['seq'] > 0) {
- echo '<span class="pointer" id="crosstab_add_new" onclick="add_new_variable(\'2\');"><span class="faicon add small icon-as_link" title="'.'"></span></span>';
- }
-
+
+ echo '<div id="crossRightDropdowns">';
+
foreach($this->variabla2 AS $_key => $variabla2) {
- echo $_br;
- echo '<span id="v2_'.$_key.'">';
+
+ echo '<div id="v2_'.$_key.'" class="variabla_line">';
- echo '<select name="crosstab_variable_2" id="crosstab_variable_2" onchange="change_crosstab(); return false;" autocomplete="off"'
+ echo '<select name="crosstab_variable_2" id="crosstab_variable_2" class="dropdown large" onchange="change_crosstab(); return false;" autocomplete="off"'
. ((int)$this->variabla1['0']['seq'] > 0 ? '' : ' disabled="disabled" ')
.'>';
@@ -493,33 +539,44 @@ class SurveyCrosstabs {
}
foreach ($variables as $variable) {
- echo '<option value="' . $variable['sequence'] . '" spr_id="'.$variable['spr_id'].'" '
+ echo '<option value="' . (isset($variable['sequence'])?$variable['sequence']:'') . '" spr_id="'.(isset($variable['spr_id'])?$variable['spr_id']:'').'" '
. ( isset($variable['grd_id']) ? ' grd_id="'.$variable['grd_id'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- . ( $variabla2['seq'] > 0 && $variabla2['seq'] == $variable['sequence'] ? ' selected="selected" ' : '')
+ . ( $variabla2['seq'] > 0 && isset($variable['sequence']) && $variabla2['seq'] == $variable['sequence'] ? ' selected="selected" ' : '')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
. $variable['variableNaslov'] .'</option>';
}
+
echo '</select>';
+
+ // Gumb odstrani
+ echo '<div class="crosstab_remove_holder">';
if (count($this->variabla2) > 1) {
- echo '<span class="pointer" id="crosstab_remove" onclick="crs_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
- } else {
- echo '<span class="space_crosstab_new">&nbsp;</span>';
- }
+ echo '<span class="faicon delete_circle" id="crosstab_remove" onclick="crs_remove_variable(this);"></span>';
+ }
+ echo '</div>';
+
+ echo '</div>';
+ }
+
+ echo '</div>';
- $_br = '<br/><span class="space_crosstab_new">&nbsp;</span>';
- echo '</span>';
+
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<button class="blue small" id="crosstab_add_new" onclick="add_new_variable(\'2\');">'.$lang['srv_multicrosstabs_add'].'</button>';
}
}
+
echo '</div>';
+
# če je katera od variabel checkbox, ponudimo možnodt izbire ali po enotah ali po navedbah
$is_check = false;
if (count($this->variabla2) > 0) {
foreach ($this->variabla2 AS $key => $var) {
- $spr_tip = $this->_HEADERS[$var['spr']]['tip'];
+ $spr_tip = isset($this->_HEADERS[$var['spr']]['tip']) ? $this->_HEADERS[$var['spr']]['tip'] : null;
if ( $spr_tip == 2 || $spr_tip == 16 ) {
$is_check = true;
}
@@ -527,7 +584,7 @@ class SurveyCrosstabs {
}
if (count($this->variabla1) > 0 && $is_check == false ) { # če še ni bil checkbox
foreach ($this->variabla1 AS $key => $var) {
- $spr_tip = $this->_HEADERS[$var['spr']]['tip'];
+ $spr_tip = isset($this->_HEADERS[$var['spr']]['tip']) ? $this->_HEADERS[$var['spr']]['tip'] : null;
if ( $spr_tip == 2 || $spr_tip == 16 ) {
$is_check = true;
}
@@ -546,10 +603,12 @@ class SurveyCrosstabs {
if ($which == '1') {
- echo '<br/>';
- echo '<span class="space_crosstab_new">&nbsp;</span>';
- echo '<select name="crosstab_variable_1" id="crosstab_variable_1" onchange="change_crosstab(); return false;" autocomplete="off">';
- # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
+
+ echo '<div class="variabla_line">';
+
+ echo '<select name="crosstab_variable_1" id="crosstab_variable_1" class="dropdown large" onchange="change_crosstab(); return false;" autocomplete="off">';
+
+ # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_izberi_more'] . '</option>';
}
@@ -564,18 +623,25 @@ class SurveyCrosstabs {
}
echo '</select>';
- echo '<span class="pointer" id="crosstab_remove" onclick="crs_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
-
- } else {
- echo '<br/>';
- echo '<span class="space_crosstab_new">&nbsp;</span>';
- echo '<select name="crosstab_variable_'.$which.'" id="crosstab_variable_'.$which.'" onchange="change_crosstab(); return false;" autocomplete="off"'
- .'>';
+
+ // Gumb odstrani
+ echo '<div class="crosstab_remove_holder">';
+ echo ' <span class="faicon delete_circle" id="crosstab_remove" onclick="crs_remove_variable(this);"></span>';
+ echo '</div>';
+
+ echo '</div>';
+ }
+ else {
+
+ echo '<div class="variabla_line">';
+
+ echo '<select name="crosstab_variable_'.$which.'" id="crosstab_variable_'.$which.'" class="dropdown large" onchange="change_crosstab(); return false;" autocomplete="off">';
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
if ((int)$this->variabla1['0']['seq'] > 0) {
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_najprej_prvo'] . '</option>';
- } else {
+ }
+ else {
# če druga variabla ni izbrana dodamo tekst za izbiro druge variable
echo '<option value="0" selected="selected">'. $lang['srv_analiza_crosstab_izberi_more'] . '</option>';
}
@@ -589,8 +655,15 @@ class SurveyCrosstabs {
. $variable['variableNaslov'] .$variable['sequence']. '</option>';
}
+
echo '</select>';
- echo '<span class="pointer" id="crosstab_remove" onclick="crs_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
+
+ // Gumb odstrani
+ echo '<div class="crosstab_remove_holder">';
+ echo ' <span class="faicon delete_circle" id="crosstab_remove" onclick="crs_remove_variable(this);"></span>';
+ echo '</div>';
+
+ echo '</div>';
}
}
/**
@@ -599,83 +672,56 @@ class SurveyCrosstabs {
function displayCrosstabCheckboxes () {
global $lang;
- echo '<div id="div_color_residual_legend" '.($this->isSelectedBothVariables() && $this->doColor ? '' : ' class="hidden"').'>' ;
+ echo '<div id="crosstab_legend" '.($this->isSelectedBothVariables() && $this->doColor ? '' : ' class="hidden"').'>' ;
- echo '<span id="span_color_residual_legend" class="floatLeft">';
- echo '<span id="span_color_residual_legend1" class="floatLeft">';
- echo '<span class="floatLeft">';
- echo '<label>'.$lang['srv_analiza_crosstab_adjs_residual_short'].'</label>';
- echo '</span>';
- echo '<span class="floatLeft">';
- echo '<table id="tbl_color_residual_legend" >';
- echo '<tr>';
- echo '<td style="width:15px !important; text-align: center !important; font-weight: bold !important;">-</td>';
- echo '<td class="rsdl_bck6" title="'.$lang['srv_crosstab_residual_1'].'">&nbsp;</td>';
- echo '<td class="rsdl_bck5" title="'.$lang['srv_crosstab_residual_2'].'">&nbsp;</td>';
- echo '<td class="rsdl_bck4" title="'.$lang['srv_crosstab_residual_3'].'">&nbsp;</td>';
- echo '<td class="rsdl_bck1" title="'.$lang['srv_crosstab_residual_4'].'">&nbsp;</td>';
- echo '<td class="rsdl_bck2" title="'.$lang['srv_crosstab_residual_5'].'">&nbsp;</td>';
- echo '<td class="rsdl_bck3" title="'.$lang['srv_crosstab_residual_6'].'">&nbsp;</td>';
- echo '<td style="width:15px !important; text-align: center !important; font-weight: bold !important;">+</td>';
- //echo '<td style="width:40px !important; text-align: center !important;"><span id="span_rsdl_legend_togle" class="as_link">'.$lang['srv_more'].'</span></td>';
- echo '</tr>';
- echo '</table>';
- echo '</span>';
- echo '<span class="floatLeft" style="padding-top:2px;">';
- echo Help :: display('srv_crosstab_residual');
- echo '</span>';
+
+ echo '<div id="span_color_residual_legend1" class="crosstab_legend_line">';
+
+ echo '<span class="title">'.$lang['srv_analiza_crosstab_adjs_residual_short'].' '.Help :: display('srv_crosstab_residual').':</span>';
+
+ echo '<div class="trak">';
+ echo ' <div class="minus">-</div>';
+ echo ' <div class="rsdl_bck6" title="'.$lang['srv_crosstab_residual_1'].'"></div>';
+ echo ' <div class="rsdl_bck5" title="'.$lang['srv_crosstab_residual_2'].'"></div>';
+ echo ' <div class="rsdl_bck4" title="'.$lang['srv_crosstab_residual_3'].'"></div>';
+ echo ' <div class="rsdl_bck1" title="'.$lang['srv_crosstab_residual_4'].'"></div>';
+ echo ' <div class="rsdl_bck2" title="'.$lang['srv_crosstab_residual_5'].'"></div>';
+ echo ' <div class="rsdl_bck3" title="'.$lang['srv_crosstab_residual_6'].'"></div>';
+ echo ' <div class="plus">+</div>';
+ echo '</div>';
- echo '</span>';
+ echo '</div>';
+
- echo '<span id="span_color_residual_legend2" class="floatLeft displayNone">';
- echo '<span class="floatLeft">';
- echo '<label></label>';
- echo '</span>';
- echo '<span class="floatLeft">';
+ /*echo '<div id="span_color_residual_legend2" class="crosstab_legend_line displayNone">';
+
+ echo '<span class="title">'.Help :: display('srv_crosstab_residual').'</span>';
+
echo '<table id="tbl_color_residual" class="residual">';
- echo '<tr><td>'.$lang['srv_analiza_crosstab_adjs_residual_long'].':&nbsp;&nbsp;&nbsp;&nbsp;</td><th>+</th><th>-</th></tr>';
- echo '<tr><td class="anl_al">&nbsp;&nbsp;'.$lang['srv_crosstab_residual_3_0'].'</td><td class="rsdl_bck1 anl_dash_ba" title="'.$lang['srv_crosstab_residual_4'].'">&nbsp;</td><td class="rsdl_bck4 anl_dash_bt anl_dash_br anl_dash_bb" title="'.$lang['srv_crosstab_residual_3'].'">&nbsp;</td></tr>';
- echo '<tr><td class="anl_al">&nbsp;&nbsp;'.$lang['srv_crosstab_residual_2_0'].'</td><td class="rsdl_bck2 anl_dash_bl anl_dash_bb" title="'.$lang['srv_crosstab_residual_5'].'">&nbsp;</td><td class="rsdl_bck5 anl_dash_br anl_dash_bb" title="'.$lang['srv_crosstab_residual_2'].'">&nbsp;</td></tr>';
- echo '<tr><td class="anl_al">&nbsp;&nbsp;'.$lang['srv_crosstab_residual_1_0'].'</td><td class="rsdl_bck3 anl_dash_bl anl_dash_bb" title="'.$lang['srv_crosstab_residual_6'].'">&nbsp;</td><td class="rsdl_bck6 anl_dash_br anl_dash_bb" title="'.$lang['srv_crosstab_residual_1'].'">&nbsp;</td></tr>';
+ echo ' <tr><td>'.$lang['srv_analiza_crosstab_adjs_residual_long'].':&nbsp;&nbsp;&nbsp;&nbsp;</td><th>+</th><th>-</th></tr>';
+ echo ' <tr><td class="anl_al">&nbsp;&nbsp;'.$lang['srv_crosstab_residual_3_0'].'</td><td class="rsdl_bck1 anl_dash_ba" title="'.$lang['srv_crosstab_residual_4'].'">&nbsp;</td><td class="rsdl_bck4 anl_dash_bt anl_dash_br anl_dash_bb" title="'.$lang['srv_crosstab_residual_3'].'">&nbsp;</td></tr>';
+ echo ' <tr><td class="anl_al">&nbsp;&nbsp;'.$lang['srv_crosstab_residual_2_0'].'</td><td class="rsdl_bck2 anl_dash_bl anl_dash_bb" title="'.$lang['srv_crosstab_residual_5'].'">&nbsp;</td><td class="rsdl_bck5 anl_dash_br anl_dash_bb" title="'.$lang['srv_crosstab_residual_2'].'">&nbsp;</td></tr>';
+ echo ' <tr><td class="anl_al">&nbsp;&nbsp;'.$lang['srv_crosstab_residual_1_0'].'</td><td class="rsdl_bck3 anl_dash_bl anl_dash_bb" title="'.$lang['srv_crosstab_residual_6'].'">&nbsp;</td><td class="rsdl_bck6 anl_dash_br anl_dash_bb" title="'.$lang['srv_crosstab_residual_1'].'">&nbsp;</td></tr>';
echo '</table>';
- //echo '<span class="residual_link"><a href="http://www.1ka.si/db/19/308/Pogosta%20vprasanja/Kaj_pomenijo_residuali/?&p1=226&p2=735&p3=789&p4=0&p5=0&id=789&from1ka=1" target="_blank">'.$lang['srv_residual_link_faq'].'</a></span>';
- echo '</span>';
- echo '<span id="span_rsdl_legend_togle" class="floatLeft spaceLeft as_link">'.$lang['srv_less'].'</span>';
- echo '<span class="floatLeft spaceLeft" style="padding-top:0px;">';
- echo Help :: display('srv_crosstab_residual');
- echo '</span>';
-
- echo '</span>';
+
+ echo '</div>';*/
+
+ echo '<div id="span_color_residual_legend3" class="crosstab_legend_line '.($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR == 4 ? '' : ' displayNone').'">';
- echo '<br />';
- echo '<span id="span_color_residual_legend3" class="floatLeft '.($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR == 4 ? '' : ' displayNone"').'" style="margin-top:10px; padding-left:18px;">';
- echo '<span class="floatLeft">';
- echo '<label>'.$lang['srv_analiza_crosstab_residuals'].'</label>';
- echo '</span>';
- echo '<span class="floatLeft">';
- echo '<table id="tbl_color_residual_legend" >';
- echo '<tr>';
- echo '<td style="width:10px !important; text-align: center !important; font-weight: bold !important;"></td>';
- echo '<td class="crossCheck_EC" title="'.$lang['srv_analiza_crosstab_expected_count'].'">&nbsp;</td>';
- echo '<td class="crossCheck_RE" title="'.$lang['srv_analiza_crosstab_residual'].'">&nbsp;</td>';
- echo '<td class="crossCheck_SR" title="'.$lang['srv_analiza_crosstab_stnd_residual'].'">&nbsp;</td>';
- echo '<td class="crossCheck_AR" title="'.$lang['srv_analiza_crosstab_adjs_residual'].'">&nbsp;</td>';
- echo '<td style="width:10px !important; text-align: center !important; font-weight: bold !important;"></td>';
- echo '</tr>';
- echo '</table>';
- echo '</span>';
- echo '<span class="floatLeft" style="padding-top:2px;">';
- echo Help :: display('srv_crosstab_residual2');
- echo '</span>';
+ echo '<span class="title">'.$lang['srv_analiza_crosstab_residuals'].' '.Help::display('srv_crosstab_residual2').':</span>';
+
+ echo '<div class="trak">';
+ echo ' <div class="crossCheck_EC" title="'.$lang['srv_analiza_crosstab_expected_count'].'"></div>';
+ echo ' <div class="crossCheck_RE" title="'.$lang['srv_analiza_crosstab_residual'].'"></div>';
+ echo ' <div class="crossCheck_SR" title="'.$lang['srv_analiza_crosstab_stnd_residual'].'"></div>';
+ echo ' <div class="crossCheck_AR" title="'.$lang['srv_analiza_crosstab_adjs_residual'].'"></div>';
+ echo '</div>';
- echo '</span>';
+ echo '</div>';
- echo '</span>';
-
echo '</div>';
- echo '<br class="clr"/>';
}
public function displayCrosstabsTables() {
@@ -694,26 +740,26 @@ class SurveyCrosstabs {
$SR -> getProfileString();
# preverimo ali imamo izbrano tretjo variablo
- if ( $this->variabla_third == null || (int)$this->variabla_third == 0) {
+ /*if ( $this->variabla_third == null || (int)$this->variabla_third == 0) {
# tretja variabla ni izbrana, nardimo navadne loope če obstajajo
$this->_LOOPS = SurveyZankaProfiles::getFiltersForLoops();
} else {
# tretja variabla je izbrana, zamenjamo loope z tretjo variablo
$this->_LOOPS = SurveyZankaProfiles::setLoopsForCrostabs($this->variabla_third);
- }
+ } */
- if (count($this->_LOOPS) > 0) {
+ /* if (count($this->_LOOPS) > 0) {
# če mamo zanke
foreach ( $this->_LOOPS AS $loop) {
$this->_CURRENT_LOOP = $loop;
echo '<h2>'.$lang['srv_zanka_note'].$loop['text'].'</h2>';
$this->displayCrosstabsTable();
- echo '<br/>';
}
- } else {
+ }
+ else { */
$this->displayCrosstabsTable();
- }
+ //}
}
public function displayCrosstabsTable() {
@@ -721,9 +767,11 @@ class SurveyCrosstabs {
global $admin_type;
if ($this->getSelectedVariables(1) !== null && $this->getSelectedVariables(2) !== null) {
+
$variables1 = $this->getSelectedVariables(2);
$variables2 = $this->getSelectedVariables(1);
$counter = 0;
+
foreach ($variables1 AS $v_first) {
foreach ($variables2 AS $v_second) {
@@ -738,8 +786,8 @@ class SurveyCrosstabs {
$spr1 = $this->_HEADERS[$v_first['spr']];
$spr2 = $this->_HEADERS[$v_second['spr']];
- $grid1 = $spr1['grids'][$v_first['grd']];
- $grid2 = $spr2['grids'][$v_second['grd']];
+ $grid1 = isset($spr1['grids'][$v_first['grd']])?$spr1['grids'][$v_first['grd']]:array();
+ $grid2 = isset($spr2['grids'][$v_second['grd']])?$spr2['grids'][$v_second['grd']]:array();
#število vratic in število kolon
$cols = count($crosstabs['options1']);
@@ -755,19 +803,22 @@ class SurveyCrosstabs {
$numColumnPercent = $this->crossChk1 + $this->crossChk2 + $this->crossChk3;
$numColumnResidual = $this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR;
$tblColumn = max($numColumnPercent,$numColumnResidual);
- } else if ($this->crossChk1 || $this->crossChk2 || $this->crossChk3) {
+ }
+ else if ($this->crossChk1 || $this->crossChk2 || $this->crossChk3) {
# imamo samo procente
$rowSpan = 2;
$numColumnPercent = $this->crossChk1 + $this->crossChk2 + $this->crossChk3;
$numColumnResidual = 1;
$tblColumn = $numColumnPercent;
- } else if ($this->crossChkEC || $this->crossChkRE || $this->crossChkSR || $this->crossChkAR) {
+ }
+ else if ($this->crossChkEC || $this->crossChkRE || $this->crossChkSR || $this->crossChkAR) {
# imamo samo residuale
$rowSpan = 2;
$numColumnPercent = 1;
$numColumnResidual = $this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR;
$tblColumn = $numColumnResidual;
- } else {
+ }
+ else {
#prikazujemo samo podatke
$rowSpan = 1;
$numColumnPercent = 1;
@@ -782,20 +833,24 @@ class SurveyCrosstabs {
foreach ($spr1['grids'] AS $grid) {
foreach ($grid['variables'] AS $variable) {
if ($variable['sequence'] == $v_first['seq']) {
- $sub_q1 = '<span class="anl_variabla'.$sccFloat.'">';
+ $sub_q1 = '<span class="anl_variabla">';
$sub_q1 .= '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $v_first['spr'] . '\'); return false;">';
$sub_q1 .= strip_tags($spr1['naslov']);
+
if ($show_variables_values == true ) {
- $sub_q1 .= '<span class="anl_variabla'.$sccFloat.'">';
+ $sub_q1 .= '<span class="anl_variabla">';
$sub_q1 .= '&nbsp;('.strip_tags($spr1['variable']).')';
$sub_q1 .= '</span>';
}
+
if ($spr1['tip'] == '16') {
$sub_q1 .= '<br/>' . strip_tags($grid1['naslov']) . ($show_variables_values == true ? '&nbsp;(' . strip_tags($grid1['variable']) . ')' : '');
- } else {
- $sub_q1 .= '<br/>' . strip_tags($variable['naslov']) . ($show_variables_values == true ? '&nbsp;(' . strip_tags($variable['variable']) . ')' : '');
+ }
+ else {
+ if(strip_tags($variable['naslov']) != $lang['srv_new_text'] && strip_tags($variable['naslov']) != $lang['srv_new_vprasanje'])
+ $sub_q1 .= '<br/>' . strip_tags($variable['naslov']) . ($show_variables_values == true ? '&nbsp;(' . strip_tags($variable['variable']) . ')' : '');
}
$sub_q1 .= '</a>';
$sub_q1 .= '</span>' . NEW_LINE;
@@ -804,7 +859,7 @@ class SurveyCrosstabs {
}
}
if ($sub_q1 == null) {
- $sub_q1 = '<span class="anl_variabla'.$sccFloat.'">';
+ $sub_q1 = '<span class="anl_variabla">';
$sub_q1 .= '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $v_first['spr'] . '\'); return false;">';
$sub_q1 .= strip_tags($spr1['naslov']);
$sub_q1 .= ($show_variables_values == true ? '&nbsp;('.strip_tags($spr1['variable']).')' : '');
@@ -815,11 +870,11 @@ class SurveyCrosstabs {
foreach ($spr2['grids'] AS $grid) {
foreach ($grid['variables'] AS $variable) {
if ($variable['sequence'] == $v_second['seq']) {
- $sub_q2 = '<span class="anl_variabla'.$sccFloat.'">';
+ $sub_q2 = '<span class="anl_variabla">';
$sub_q2 .= '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopupiza(\'' . $v_second['spr'] . '\'); return false;">';
$sub_q2 .= strip_tags($spr2['naslov']);
if ($show_variables_values == true) {
- $sub_q2 .= '<span class="anl_variabla'.$sccFloat.'">';
+ $sub_q2 .= '<span class="anl_variabla">';
$sub_q2 .= '&nbsp;('.strip_tags($spr2['variable']).')';
@@ -827,8 +882,10 @@ class SurveyCrosstabs {
}
if ($spr2['tip'] == '16') {
$sub_q2.= '<br/>' . strip_tags($grid2['naslov']) . ($show_variables_values == true ? '&nbsp;(' . strip_tags($grid2['variable']) . ')' : '');
- } else {
- $sub_q2.= '<br/>' . strip_tags($variable['naslov']) . ($show_variables_values == true ? '&nbsp;(' . strip_tags($variable['variable']) . ')' : '');
+ }
+ else {
+ if(strip_tags($variable['naslov']) != $lang['srv_new_text'] && strip_tags($variable['naslov']) != $lang['srv_new_vprasanje'])
+ $sub_q2.= '<br/>' . strip_tags($variable['naslov']) . ($show_variables_values == true ? '&nbsp;(' . strip_tags($variable['variable']) . ')' : '');
}
$sub_q2 .= '</a>';
$sub_q2 .= '</span>' . NEW_LINE;
@@ -837,123 +894,119 @@ class SurveyCrosstabs {
}
}
if ($sub_q2 == null) {
- $sub_q2 = '<span class="anl_variabla'.$sccFloat.'">';
+ $sub_q2 = '<span class="anl_variabla">';
$sub_q2 .= '<a href="/" title="' . $lang['srv_predogled_spremenljivka'] . '" onclick="showspremenljivkaSingleVarPopup(\'' . $v_second['spr'] . '\'); return false;">';
$sub_q2 .= strip_tags($spr2['naslov']);
$sub_q2 .= ($show_variables_values == true ? '&nbsp;('.strip_tags($spr2['variable']).')' : '');
$sub_q2 .= '</a>';
$sub_q2 .= '</span>' . NEW_LINE;
}
+
+
# izrišemo tabelo
- # najprej izrišemo naslovne vrstice
- #echo '<table class="anl_tbl_crosstab fullWidth fullHeight">';
- echo $_br.'<br/>';
-# $_br = '<br/>';
-# echo '<div class="floatLeft">'.$sub_q1. '</div><div class="floatLeft spaceLeft spaceRight"> ==&gt; </div><div class="floatLeft">'. $sub_q2.'</div><br class="clr" />';
+ echo '<div class="table_holder">';
+
+ // Zgornja vrstca
+ echo '<div class="top_line">';
+
+ // hi2
+ echo '<div class="hi2">';
+ if ($this->displayHi2 == true) {
+ echo '&#x3A7;<sup>2</sup> = ';
+ echo $this->formatNumber($crosstabs['hi2'], 3, '');
+ }
+ echo '</div>';
+
+ // Zvezdica za vkljucitev v porocilo
+ $spr2 = $v_first['seq'].'-'.$v_first['spr'].'-'.$v_first['grd'];
+ $spr1 = $v_second['seq'].'-'.$v_second['spr'].'-'.$v_second['grd'];
+
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=5, $sub_type=0, $spr1, $spr2);
+
+ echo '</div>';
+
+
+ # najprej izrišemo naslovne vrstice
#Zadnja kolona: Če imamo vodoravno checkboxe in gledamo enote, potem kolono s summo malo razmaknemo
if ( $crosstabs['isCheckbox']['spr1'] == true && $this->crossNavVsEno == true) {
$addVerticalSpace = 1;
- } else {
+ }
+ else {
$addVerticalSpace = 0;
}
-
- # hi2
- if ($this->displayHi2 == true) {
- echo '&#x3A7;<sup>2</sup> = ';
- echo $this->formatNumber($crosstabs['hi2'], 3, '');
- }
- echo '<table class="anl_tbl_crosstab" style="padding:0px; margin:0px; margin-top:10px;"'
- . ' sq1="'.$v_first['seq'].'" sp1="'.$v_first['spr'].'" gd1="'.$v_first['grd'].'" sq2="'.$v_second['seq'].'" sp2="'.$v_second['spr'].'" gd2="'.$v_second['grd'].'" >';
+ echo '<div class="table_crosstab_div">';
+ echo '<table class="table_crosstab" sq1="'.$v_first['seq'].'" sp1="'.$v_first['spr'].'" gd1="'.$v_first['grd'].'" sq2="'.$v_second['seq'].'" sp2="'.$v_second['spr'].'" gd2="'.$v_second['grd'].'">';
- if ($this->fromBreak == false) {
- echo '<colgroup>';
- #echo '<col style="width:auto; min-width:150px;" />';
- echo '<col style="width:auto; min-width:100px;" />';
- if (count($crosstabs['options1']) > 0 ) {
- $_width_percent = round(100 / count($crosstabs['options1'],2));
- foreach ($crosstabs['options1'] as $ckey1 =>$crossVariabla) {
- echo '<col style="width:'.$_width_percent.'%;" />';
- }
- }
- if ($addVerticalSpace == 1) {
- echo '<col style="width:10px;" />';
- }
- echo '<col style="width:auto;" />';
- echo '</colgroup>';
- }
- echo '<tr>';
- echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_title ctbCll" rowspan="2" >';
- #if ($cntY == 1) {
- # ime variable
- #echo '<td rowspan="' . $rows . '">';
+ echo '<tr class="row1">';
+
+ echo '<td class="cell_var" rowspan="2">';
echo $sub_q2;
- #echo '</td>';
- #}
echo '</td>';
- echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_title ctbCll" colspan="' . $cols . '" >';
+
+ echo '<td class="cell_question" colspan="'.($cols+1).'">';
echo $sub_q1;
echo '</td>';
- echo '<td class="anl_bl">&nbsp;</td>';
if ($this->fromBreak == true && $this->showAverage == true) {
# če smo v break-u dodamo še povprečja
- echo '<td class="">&nbsp;</td>';
+ echo '<td class="cell_space">&nbsp;</td>';
}
+
echo '</tr>';
- echo '<tr>';
+
+
+ echo '<tr class="row3">';
+
$col_cnt=0;
if (count($crosstabs['options1']) > 0 ) {
foreach ($crosstabs['options1'] as $ckey1 =>$crossVariabla) {
$col_cnt++;
+
#ime variable
- //$css_backX = 'rsdl_bck_variable'.($col_cnt & 1);
- $css_backX = ' rsdl_bck_variable1';
- echo '<td class="anl_bt anl_bl anl_ac'.$css_backX.' ctbCll" >';
+ echo '<td class="cell_grid">';
+
echo $crossVariabla['naslov'];
+
# če ni tekstovni odgovor dodamo key
if ($crossVariabla['type'] != 't' && $show_variables_values == true) {
- if ($crossVariabla['vr_id'] == null ) {
+ if (!isset($crossVariabla['vr_id'])||$crossVariabla['vr_id'] == null ) {
echo '<br/> ( '.$ckey1.' )';
- } else {
+ }
+ else {
echo '<br/> ( '.$crossVariabla['vr_id'].' )';
}
}
+
echo '</td>';
}
}
$col_cnt++;
- //$css_backX = 'rsdl_bck_variable'.($col_cnt & 1);
- if ($addVerticalSpace == 1) {
- echo '<td class="anl_bl">&nbsp;</td>';
- }
- $css_backX = ' rsdl_bck_variable1';
-
- echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0'.$css_backX.' ctbCll">' . $lang['srv_analiza_crosstab_skupaj'] . '</td>';
+
+ echo '<td class="cell_value">' . $lang['srv_analiza_crosstab_skupaj'] . '</td>';
if ($this->fromBreak == true && $this->showAverage == true) {
# če smo v break-u dodamo še povprečja
- echo '<td class="anl_bl anl_bt anl_br anl_ac anl_ita anl_bck_text_0'.$css_backX.' ctbCll">' . $lang['srv_analiza_crosstab_average'] . '</td>';
+ echo '<td class="cell_value">' . $lang['srv_analiza_crosstab_average'] . '</td>';
}
+
echo '</tr>';
+
$cntY = 0;
if (count($crosstabs['options2']) > 0) {
foreach ($crosstabs['options2'] as $ckey2 =>$crossVariabla2) {
$cntY++;
- echo '<tr>';
-
-
- //$css_backY = 'rsdl_bck_variable'.($cntY & 1);
- $css_backY = ' rsdl_bck_variable1';
+
+ echo '<tr class="row_var">';
- echo '<td class="anl_bt anl_bl anl_ac'.$css_backY.' ctbCll">';
+ echo '<td class="cell_var">';
echo $crossVariabla2['naslov'];
# če ni tekstovni odgovor dodamo key
if ($crossVariabla2['type'] !== 't' && $show_variables_values == true ) {
- if ($crossVariabla2['vr_id'] == null) {
+ if (!isset($crossVariabla2['vr_id']) || $crossVariabla2['vr_id'] == null) {
echo '<br/> ( '.$ckey2.' )';
} else {
echo '<br/> ( '.$crossVariabla2['vr_id'].' )';
@@ -963,150 +1016,147 @@ class SurveyCrosstabs {
echo '</td>';
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
- echo '<td class="ct_in_cell'.($this->enableInspect && ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? ' ct_inspect' : '').'" k1="'.$ckey1.'" k2="'.$ckey2.'" n1="'.$crossVariabla1['naslov'].'" n2="'.$crossVariabla2['naslov'].'" v1="'.$crossVariabla1['vr_id'].'" v2="'.$crossVariabla2['vr_id'].'">';
- # celica z vebino
- {
- # prikazujemo eno ali več od: frekvenc, odstotkov, residualov
- echo '<table class="ct_in_tbl">';
- if ($this->crossChk0) {
- # izpišemo frekvence crostabov
- echo '<tr>';
- echo '<td class="anl_ac '.($crosstabs['color'][$ckey1][$ckey2]).' ctbCll">';
- echo ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
- # .$crossTab[$crossVariabla1[cell_id]][$ckey2]
- #
-
- echo '</td>';
- echo '</tr>';
- }
-
- if ($this->crossChk1 || $this->crossChk2 || $this->crossChk3) {
- # sirina celice v %
- if ( ($this->crossChk1 + $this->crossChk2 + $this->crossChk3) == 3 )
- $css_width = ' ctb_w33p';
- elseif (($this->crossChk1 + $this->crossChk2 + $this->crossChk3) == 2 )
- $css_width = ' ctb_w50p';
- else
- $css_width = '';
- $css_bt = ( $this->crossChk0 ) ? 'anl_dash_bt' : '';
- # izpisemo procente
- echo '<tr>';
- echo '<td class="'.$css_bt.'">';
-
- echo '<table class="anl_tbl_crosstab fullWidth fullHeight" style="padding:0px; margin:0px;">';
- echo '<tr>';
- $col=0;
-
- if ($this->crossChk1) {
- #procent vrstica
- $col++;
-
- $css_color = ($this->doColor == 'true') ? 'ctbChck_sp1' : 'ctbChck_sp0';
- $css_br = $numColumnPercent > $col ? ' anl_dash_br' : '';
- echo '<td class="'.$css_color.$css_br.$css_width.' ctbCll">';
- echo $this->formatNumber($this->getCrossTabPercentage($crosstabs['sumaVrstica'][$ckey2], $crosstabs_value[$ckey1][$ckey2]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- echo '</td>';
- }
- if ($this->crossChk2) {
- #procent stolpec
- $col++;
- $css_br = $numColumnPercent > $col ? ' anl_dash_br' : '';
- $css_color = ($this->doColor == 'true') ? 'ctbChck_sp2' : 'ctbChck_sp0';
- echo '<td class="'.$css_color.$css_br.$css_width.' ctbCll">';
-
- echo $this->formatNumber($this->getCrossTabPercentage($crosstabs['sumaStolpec'][$ckey1], $crosstabs_value[$ckey1][$ckey2]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- echo '</td>';
- }
- if ($this->crossChk3) {
- #procent skupni
- $col++;
- $css_br = $numColumnPercent > $col ? ' anl_dash_br' : '';
- $css_color = ($this->doColor == 'true') ? 'ctbChck_sp3' : 'ctbChck_sp0';
- echo '<td'.$css_br.$css_width.' class="'.$css_color.$css_br.' ctbCll">';
-
- echo $this->formatNumber($this->getCrossTabPercentage($crosstabs['sumaSkupna'], $crosstabs_value[$ckey1][$ckey2]), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
- echo '</td>';
- }
- echo '</tr>';
- echo '</table>';
+
+ # celica z vebino
+ echo '<td class="cell_noPadding '.($this->enableInspect && ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? ' ct_inspect' : '').'" k1="'.$ckey1.'" k2="'.$ckey2.'" n1="'.$crossVariabla1['naslov'].'" n2="'.$crossVariabla2['naslov'].'" v1="'.(isset($crossVariabla1['vr_id'])?$crossVariabla1['vr_id']:'').'" v2="'.(isset($crossVariabla2['vr_id'])?$crossVariabla2['vr_id']:'').'">';
+
+ # prikazujemo eno ali več od: frekvenc, odstotkov, residualov
+ echo '<table class="cell_table">';
+
+ if ($this->crossChk0) {
+ # izpišemo frekvence crostabov
+ echo '<tr>';
+
+ echo '<td class="cell_value '.(isset($crosstabs['color'][$ckey1][$ckey2])?$crosstabs['color'][$ckey1][$ckey2]:'').'">';
+ echo (isset($crosstabs_value[$ckey1][$ckey2])&&(int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ echo '</td>';
+
+ echo '</tr>';
+ }
+
+ if ($this->crossChk1 || $this->crossChk2 || $this->crossChk3) {
+ # sirina celice v %
+ if ( ($this->crossChk1 + $this->crossChk2 + $this->crossChk3) == 3 )
+ $css_width = ' ctb_w33p';
+ elseif (($this->crossChk1 + $this->crossChk2 + $this->crossChk3) == 2 )
+ $css_width = ' ctb_w50p';
+ else
+ $css_width = '';
+ $css_bt = ( $this->crossChk0 ) ? 'anl_dash_bt' : '';
+ # izpisemo procente
+ echo '<tr>';
+ echo '<td class="cell_noPadding '.$css_bt.'">';
+
+ echo '<table class="cell_table">';
+ echo '<tr>';
+ $col=0;
+
+ if ($this->crossChk1) {
+ #procent vrstica
+ $col++;
+
+ $css_color = ($this->doColor == 'true') ? 'ctbChck_sp1' : 'ctbChck_sp0';
+ $css_br = $numColumnPercent > $col ? ' anl_dash_br' : '';
+ echo '<td class="cell_value '.$css_color.$css_br.$css_width.' ctbCll">';
+ echo $this->formatNumber($this->getCrossTabPercentage((isset($crosstabs['sumaVrstica'][$ckey2])?$crosstabs['sumaVrstica'][$ckey2]:0), (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:0)), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '</td>';
+ }
+ if ($this->crossChk2) {
+ #procent stolpec
+ $col++;
+ $css_br = $numColumnPercent > $col ? ' anl_dash_br' : '';
+ $css_color = ($this->doColor == 'true') ? 'ctbChck_sp2' : 'ctbChck_sp0';
+ echo '<td class=" cell_value'.$css_color.$css_br.$css_width.' ctbCll">';
+
+ echo $this->formatNumber($this->getCrossTabPercentage((isset($crosstabs['sumaStolpec'][$ckey1])?$crosstabs['sumaStolpec'][$ckey1]:0), (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:0)), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '</td>';
+ }
+ if ($this->crossChk3) {
+ #procent skupni
+ $col++;
+ $css_br = $numColumnPercent > $col ? ' anl_dash_br' : '';
+ $css_color = ($this->doColor == 'true') ? 'ctbChck_sp3' : 'ctbChck_sp0';
+ echo '<td'.$css_br.$css_width.' class="cell_value '.$css_color.$css_br.' ctbCll">';
+
+ echo $this->formatNumber($this->getCrossTabPercentage((isset($crosstabs['sumaSkupna'])?$crosstabs['sumaSkupna']:0), (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:0)), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</table>';
+
+ echo '</td>';
+ echo '</tr>';
+ }
+ # izpisemo residuale
+ if ($this->crossChkEC || $this->crossChkRE || $this->crossChkSR || $this->crossChkAR) {
+ # sirina celice v %
+ if ( ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR) == 4 )
+ $css_width = ' ctb_w25p';
+ elseif ( ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR) == 3 )
+ $css_width = ' ctb_w33p';
+ elseif ( ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR) == 2 )
+ $css_width = ' ctb_w50p';
+ else
+ $css_width = '';
+ $css_bt = ( $this->crossChk0 || ($this->crossChk1 && $this->crossChk2 && $this->crossChk3)) ? 'anl_dash_bt' : '';
+ echo '<tr>';
+
+ echo '<td class="cell_noPadding '.$css_bt.'">';
+ echo '<table class="cell_table">';
+ echo '<tr>';
+ $col=0;
+
+ if ($this->crossChkEC) {
+ $col++;
+ $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
+ $css_color = ($this->doColor == 'true') ? 'crossCheck_EC' : 'ctbChck_sp0';
+ echo '<td class="cell_value '.$css_color.$css_br.$css_width.' ctbCll">';
+ echo $this->formatNumber((isset($crosstabs['exC'][$ckey1][$ckey2])?$crosstabs['exC'][$ckey1][$ckey2]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
+ echo '</td>';
+ }
+ if ($this->crossChkRE) {
+ $col++;
+ $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
+ $css_color = ($this->doColor == 'true') ? 'crossCheck_RE' : 'ctbChck_sp0';
+ echo '<td class="cell_value '.$css_color.$css_br.$css_width.' ctbCll">';
+ echo $this->formatNumber((isset($crosstabs['res'][$ckey1][$ckey2])?$crosstabs['res'][$ckey1][$ckey2]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
+ echo '</td>';
+ }
+ if ($this->crossChkSR) {
+ $col++;
+ $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
+ $css_color = ($this->doColor == 'true') ? 'crossCheck_SR' : 'ctbChck_sp0';
+ echo '<td class="cell_value '.$css_color.$css_br.$css_width.' ctbCll">';
+ echo $this->formatNumber((isset($crosstabs['stR'][$ckey1][$ckey2])?$crosstabs['stR'][$ckey1][$ckey2]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
+ echo '</td>';
+ }
+ if ($this->crossChkAR) {
+ $col++;
+ $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
+ $css_color = ($this->doColor == 'true') ? 'crossCheck_AR' : 'ctbChck_sp0';
+ echo '<td class="cell_value '.$css_color.$css_br.$css_width.' ctbCll">';
+ echo $this->formatNumber((isset($crosstabs['adR'][$ckey1][$ckey2])?$crosstabs['adR'][$ckey1][$ckey2]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</table>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table>';
- echo '</td>';
- echo '</tr>';
- }
- # izpisemo residuale
- if ($this->crossChkEC || $this->crossChkRE || $this->crossChkSR || $this->crossChkAR) {
- # sirina celice v %
- if ( ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR) == 4 )
- $css_width = ' ctb_w25p';
- elseif ( ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR) == 3 )
- $css_width = ' ctb_w33p';
- elseif ( ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR) == 2 )
- $css_width = ' ctb_w50p';
- else
- $css_width = '';
- $css_bt = ( $this->crossChk0 || ($this->crossChk1 && $this->crossChk2 && $this->crossChk3)) ? 'anl_dash_bt' : '';
- echo '<tr>';
-
- echo '<td class="'.$css_bt.'" style="padding:0px 0px;">';
- echo '<table class="anl_tbl_crosstab fullWidth fullHeight" style="padding:0px; margin:0px;">';
- echo '<tr>';
- $col=0;
-
- if ($this->crossChkEC) {
- $col++;
- $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
- $css_color = ($this->doColor == 'true') ? 'crossCheck_EC' : 'ctbChck_sp0';
- echo '<td class="'.$css_color.$css_br.$css_width.' ctbCll">';
- echo $this->formatNumber($crosstabs['exC'][$ckey1][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
- echo '</td>';
- }
- if ($this->crossChkRE) {
- $col++;
- $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
- $css_color = ($this->doColor == 'true') ? 'crossCheck_RE' : 'ctbChck_sp0';
- echo '<td class="'.$css_color.$css_br.$css_width.' ctbCll">';
- echo $this->formatNumber($crosstabs['res'][$ckey1][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
- echo '</td>';
- }
- if ($this->crossChkSR) {
- $col++;
- $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
- $css_color = ($this->doColor == 'true') ? 'crossCheck_SR' : 'ctbChck_sp0';
- echo '<td class="'.$css_color.$css_br.$css_width.' ctbCll">';
- echo $this->formatNumber($crosstabs['stR'][$ckey1][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
- echo '</td>';
- }
- if ($this->crossChkAR) {
- $col++;
- $css_br = $numColumnResidual > $col ? ' anl_dash_br' : '';
- $css_color = ($this->doColor == 'true') ? 'crossCheck_AR' : 'ctbChck_sp0';
- echo '<td class="'.$css_color.$css_br.$css_width.' ctbCll">';
- echo $this->formatNumber($crosstabs['adR'][$ckey1][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'), '');
- echo '</td>';
- }
- echo '</tr>';
- echo '</table>';
- echo '</td>';
- echo '</tr>';
- }
- echo '</table>';
- }
# konec celice z vsebino
echo '</td>';
}
- # če mamo checkboxe in sumo malo razmaknemo
- if ($addVerticalSpace == 1) {
- echo '<td class="anl_bl">&nbsp;</td>';
- }
// vedno rišemo zadnji stolpec.
- echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 anl_bb" >';
- echo '<table class="anl_tbl_crosstab fullWidth fullHeight" style="padding:0px; margin:0px;">';
+ echo '<td class="cell_noPadding">';
+ echo '<table class="cell_table">';
if ($this->crossChk0) {
echo '<tr>';
- echo '<td class="anl_ac ctbCll crostabSuma" colspan="' . ( $this->crossChk1 + $this->crossChk2 + $this->crossChk3 ).'">';
+ echo '<td class="cell_value ctbCll crostabSuma" colspan="' . ( $this->crossChk1 + $this->crossChk2 + $this->crossChk3 ).'">';
# suma po vrsticah
- echo (int)$crosstabs['sumaVrstica'][$ckey2];
+ echo (isset($crosstabs['sumaVrstica'][$ckey2])?(int)$crosstabs['sumaVrstica'][$ckey2]:0);
echo '</td>';
echo '</tr>';
}
@@ -1123,21 +1173,21 @@ class SurveyCrosstabs {
echo '<tr>';
if ($this->crossChk1) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp1' : 'ctbChck_sp0';
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.$css_width.'">';
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.$css_width.'">';
echo $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
if ($this->crossChk2) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp2' : 'ctbChck_sp0';
$css_border = ($this->crossChk1 ? ' anl_dash_bl ' : '');
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.$css_border.$css_width.'">';
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.$css_border.$css_width.'">';
echo $this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
if ($this->crossChk3) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp3' : 'ctbChck_sp0';
$css_border = ($this->crossChk1 || $this->crossChk2 ? ' anl_dash_bl ' : '');
- echo '<td class="anl_ac'.$css_color.$css_bt.$css_border.$css_width.' ctbCll">';
+ echo '<td class="cell_value '.$css_color.$css_bt.$css_border.$css_width.' ctbCll">';
echo $this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaVrstica'][$ckey2] / $crosstabs['sumaSkupna']) : 0), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
@@ -1149,45 +1199,34 @@ class SurveyCrosstabs {
echo '</td>';
if ($this->fromBreak == true && $this->showAverage == true) {
# če smo v break dodamo še povprečja
- echo '<td class="anl_ac anl_bl anl_bt anl_br anl_bb rsdl_bck_variable1" >';
+ echo '<td class="cell_value">';
echo $this->formatNumber( $crosstabs['avgVrstica'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'), '');
echo '</td>';
}
echo '</tr>';
}
}
- #Zadnja vrstica. Če imamo navpično checkboxe in gledamo enote, potem vrstico z summo malo razmaknemo
- $cssBT = 'anl_bt';
- if ( $crosstabs['isCheckbox']['spr2'] == true && $this->crossNavVsEno == true) {
- echo '<tr>';
- echo '<td class="'.$cssBT.'">&nbsp;</th>';
- echo '<td class="'.$cssBT.'">&nbsp;</th>';
- echo '<td class="'.$cssBT.'" colspan="'.count($crosstabs['options1']).'">&nbsp;</th>';
- if ($addVerticalSpace == 1) {
- echo '<td class="">&nbsp;</td>';
- }
-
- echo '<td class="'.$cssBT.'">&nbsp;</th>';
- echo '</tr>';
- $cssBT = '';
- }
+
$cntY++;
+
echo '<tr>';
+
$css_backY = ' rsdl_bck_variable1';
echo '<td class="anl_bb anl_bt anl_bl anl_ac red anl_ita anl_bck_text_0'.$css_backY.' ctbCll">' . $lang['srv_analiza_crosstab_skupaj'] . '</td>';
- // skupni sestevki po stolpcih
+
+ // skupni sestevki po stolpcih
if (count($crosstabs['options1']) > 0)
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
- echo '<td class="anl_ac anl_bb anl_bt anl_bl rsdl_bck0" >';
+ echo '<td class="cell_noPadding">';
{
# prikazujemo eno od treh možnosti
- echo '<table class="anl_tbl_crosstab fullWidth fullHeight" style="padding:0px; margin:0px;">';
+ echo '<table class="cell_table">';
if ($this->crossChk0) {
echo '<tr>';
- echo '<td class="anl_ac ctbCll crostabSuma" colspan="'.($this->crossChk1 + $this->crossChk2 + $this->crossChk3).'">';
+ echo '<td class="cell_value ctbCll crostabSuma" colspan="'.($this->crossChk1 + $this->crossChk2 + $this->crossChk3).'">';
# suma po stolpcih
- echo (int)$crosstabs['sumaStolpec'][$ckey1];
+ echo isset($crosstabs['sumaStolpec'][$ckey1])?(int)$crosstabs['sumaStolpec'][$ckey1]:0;
echo '</td>';
echo '</tr>';
}
@@ -1197,21 +1236,21 @@ class SurveyCrosstabs {
echo '<tr>';
if ($this->crossChk1) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp1' : 'ctbChck_sp0';
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.'">';
- echo $this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.'">';
+ echo $this->formatNumber( (isset($crosstabs['sumaStolpec'][$ckey1])&&$crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
if ($this->crossChk2) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp2' : 'ctbChck_sp0';
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.($this->crossChk1 ? ' anl_dash_bl' : '').'">';
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.($this->crossChk1 ? ' anl_dash_bl' : '').'">';
echo $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
if ($this->crossChk3)
{
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp3' : 'ctbChck_sp0';
- echo '<td class="anl_ac'.$css_color.$css_bt.($this->crossChk2 ? ' anl_dash_bl' : '').' ctbCll">';
- echo $this->formatNumber( ($crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
+ echo '<td class="cell_value '.$css_color.$css_bt.($this->crossChk2 ? ' anl_dash_bl' : '').' ctbCll">';
+ echo $this->formatNumber( (isset($crosstabs['sumaStolpec'][$ckey1])&&$crosstabs['sumaSkupna'] > 0 ? (100 * $crosstabs['sumaStolpec'][$ckey1] / $crosstabs['sumaSkupna']) : 0), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
echo '</tr>';
@@ -1220,18 +1259,14 @@ class SurveyCrosstabs {
}
echo '</td>';
}
- # če mamo checkboxe in sumo malo razmaknemo
- if ($addVerticalSpace == 1) {
- echo '<td class="anl_bl">&nbsp;</td>';
- }
# zadnja celica z skupno sumo
- echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0">';
+ echo '<td class="cell_noPadding">';
{
- echo '<table class="anl_tbl_crosstab fullWidth fullHeight" style="padding:0px; margin:0px;">';
+ echo '<table class="cell_table">';
if ($this->crossChk0) {
echo '<tr>';
- echo '<td class="anl_ac ctbCll crostabSuma" colspan="'.($this->crossChk1 + $this->crossChk2 + $this->crossChk3).'">';
+ echo '<td class="cell_value ctbCll crostabSuma" colspan="'.($this->crossChk1 + $this->crossChk2 + $this->crossChk3).'">';
# skupna suma
echo (int)$crosstabs['sumaSkupna'];
echo '</td>';
@@ -1244,20 +1279,20 @@ class SurveyCrosstabs {
if ($this->crossChk1) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp1' : 'ctbChck_sp0';
$css_border = ($this->crossChk2 || $this->crossChk3) ? ' anl_dash_br' : '';
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.$css_border.'">';
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.$css_border.'">';
echo $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
if ($this->crossChk2) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp2' : 'ctbChck_sp0';
$css_border = ($this->crossChk3) ? ' anl_dash_br' : '';
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.$css_border.'">';
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.$css_border.'">';
echo $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
if ($this->crossChk3) {
$css_color = ($this->doColor == 'true') ? ' ctbChck_sp3' : 'ctbChck_sp0';
- echo '<td class="anl_ac ctbCll'.$css_color.$css_bt.'">';
+ echo '<td class="cell_value ctbCll'.$css_color.$css_bt.'">';
echo $this->formatNumber(100, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_PERCENT'), '%');
echo '</td>';
}
@@ -1282,15 +1317,11 @@ class SurveyCrosstabs {
// skupni sestevki po stolpcih
if (count($crosstabs['options1']) > 0) {
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
- echo '<td class="anl_ac anl_bb anl_bt anl_br rsdl_bck_variable1" >';
- echo $this->formatNumber( $crosstabs['avgStolpec'][$ckey1], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'), '');
+ echo '<td class="cell_value anl_bb anl_bt anl_br rsdl_bck_variable1" >';
+ echo $this->formatNumber( (isset($crosstabs['avgStolpec'][$ckey1])?$crosstabs['avgStolpec'][$ckey1]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'), '');
echo '</td>';
}
}
- # če mamo checkboxe in sumo malo razmaknemo
- if ($addVerticalSpace == 1) {
- echo '<td>&nbsp;</td>';
- }
# zadnja celica z skupno sumo
echo '<td>&nbsp;</td>';
@@ -1298,37 +1329,43 @@ class SurveyCrosstabs {
# če smo v break dodamo še povprečja
echo '<td>&nbsp;</td>';
}
+
echo '</tr>';
}
+
echo '</table>';
+ echo '</div>';
+
+
+ $this->displayExport();
+
+ // Izrisemo legendo
+ $this->displayCrosstabCheckboxes();
+
- // Zvezdica za vkljucitev v porocilo
- $spr2 = $v_first['seq'].'-'.$v_first['spr'].'-'.$v_first['grd'];
- $spr1 = $v_second['seq'].'-'.$v_second['spr'].'-'.$v_second['grd'];
-
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=5, $sub_type=0, $spr1, $spr2);
- #SurveyAnalysis::addCustomReportElement($type=5, $sub_type=0, $spr1, $spr2);
-
// Izrisemo graf za tabelo
if($this->showChart && !$this->fromBreak){
$tableChart = new SurveyTableChart($this->sid, $this, 'crosstab', $counter);
$tableChart->display();
}
+
+ echo '</div>';
$counter++;
}
}
- } else {
+ }
+ else {
# crostab variables not set
echo $lang['srv_crosstab_note0'];
- #print_r("Crosstab variables not set!");
}
}
- /**
+ /**
* @desc prikaze izvoz za PDF/RTF
*/
function displayExport () {
+
# z javascriptom prikažemo ikonce za arhiviranje, emaijlanje arhivov, pdf, rtf, excel...
if ($this->isSelectedBothVariables()) {
$data1 = '';
@@ -1348,18 +1385,20 @@ class SurveyCrosstabs {
$href_pdf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=crosstabs_izpis&anketa=' . $this->sid . '&data1='.$data1.'&data2='.$data2);
$href_rtf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=crosstabs_izpis_rtf&anketa=' . $this->sid . '&data1='.$data1.'&data2='.$data2);
$href_xls = makeEncodedIzvozUrlString('izvoz.php?b=export&m=crosstabs_izpis_xls&anketa=' . $this->sid . '&data1='.$data1.'&data2='.$data2);
- echo '<script>';
- # nastavimopravilne linke
+
+ echo '<script>';
+
+ # nastavimopravilne linke
echo '$("#secondNavigation_links a#crosstabDoPdf").attr("href", "'.$href_pdf.'");';
echo '$("#secondNavigation_links a#crosstabDoRtf").attr("href", "'.$href_rtf.'");';
echo '$("#secondNavigation_links a#crosstabDoXls").attr("href", "'.$href_xls.'");';
- # prikažemo linke
+
+ # prikažemo linke
echo '$("#hover_export_icon").removeClass("hidden");';
echo '$("#secondNavigation_links a").removeClass("hidden");';
- echo '</script>';
-
- }
-
+
+ echo '</script>';
+ }
}
/** kadar kličemo iz Break, ali pri radio grupi dodamo še povprečje po stolpcih
@@ -1393,8 +1432,8 @@ class SurveyCrosstabs {
$spr1 = $this->_HEADERS[$v_first['spr']];
$spr2 = $this->_HEADERS[$v_second['spr']];
- $grid1 = $spr1['grids'][$v_first['grd']];
- $grid2 = $spr2['grids'][$v_second['grd']];
+ $grid1 = isset($spr1['grids'][$v_first['grd']]) ? $spr1['grids'][$v_first['grd']] : array();
+ $grid2 = isset($spr2['grids'][$v_second['grd']]) ? $spr2['grids'][$v_second['grd']] : array();
$sequence1 = $v_first['seq'];
$sequence2 = $v_second['seq'];
@@ -1463,9 +1502,9 @@ class SurveyCrosstabs {
# dodamo status filter za vse sekvence checkbox-a da so == 1
- if ($additional_status_filter != null) {
+ /* if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
- }
+ } */
# odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
@@ -1474,7 +1513,7 @@ class SurveyCrosstabs {
# polovimo obe sequenci
$tmp_file = $folder . 'tmp_crosstab_'.$this->sid.'.TMP';
$file_handler = fopen($tmp_file,"w");
- fwrite($file_handler,"<?php\n");
+ fwrite($file_handler,"<?php\n\$crosstab=array();\n");
fclose($file_handler);
if (count($sekvences1)>0)
foreach ($sekvences1 AS $sequence1) {
@@ -1512,11 +1551,14 @@ class SurveyCrosstabs {
}
if (IS_WINDOWS) {
- #$command = 'awk -F"|" "BEGIN {{OFS=\"\"} {ORS=\"\n\"}} '.$_status_filter.' { print \"$crosstab[\x27\",$'.$sequence1.',\"\x27][\x27\",$'.$sequence2.',\"\x27]++; $options1[\x27\",$'.$sequence1.',\"\x27]++; $options2[\x27\",$'.$sequence2.',\"\x27]++;\"}" '.$this->dataFileName.' >> '.$tmp_file;
$command = 'awk -F"|" "BEGIN {{OFS=\"\"} {ORS=\"\n\"}} '.$status_filter.$additional_filter.' { print \"$crosstab[\x27\",'.$_seq_1_text.',\"\x27][\x27\",'.$_seq_2_text.',\"\x27]++;\"}" '.$this->dataFileName.' >> '.$tmp_file;
} else {
- #$command = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} '.$_status_filter.' { print "$crosstab[\x27",$'.$sequence1.',"\x27][\x27",$'.$sequence2.',"\x27]++; $options1[\x27",$'.$sequence1.',"\x27]++; $options2[\x27",$'.$sequence2.',"\x27]++;"}\' '.$this->dataFileName.' >> '.$tmp_file;
$command = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} '.$status_filter.$additional_filter.' { print "$crosstab[\x27",'.$_seq_1_text.',"\x27][\x27",'.$_seq_2_text.',"\x27]++;"}\' '.$this->dataFileName.' >> '.$tmp_file;
+
+ //$command = 'awk -F"|" \'BEGIN {{OFS=""} {ORS="\n"}} '.$status_filter.$additional_filter.' { print "if( array_key_exists('.$_seq_1_text.', $crosstab) ){ $crosstab[\x27",'.$_seq_1_text.',"\x27][\x27",'.$_seq_2_text.',"\x27]++;"}}\' '.$this->dataFileName.' >> '.$tmp_file;
+ //$command = 'awk -F"|" \'BEGIN {OFS=""; ORS="\n"} ' . $status_filter . $additional_filter . ' { print "if( !isset(crosstab) ){ $crosstab[\x27",' . $_seq_1_text . ',"\x27][\x27",' . $_seq_2_text . ',"\x27]++;"} }\' ' . $this->dataFileName . ' >> ' . $tmp_file;
+ //echo $command;
+
}
$out = shell_exec($command);
@@ -1532,23 +1574,25 @@ class SurveyCrosstabs {
unlink($tmp_file);
}
+ //print_r($crosstab);
+
#ker z awk ne gre nardit tolower zaradi šumnikov, nardimo ročno v loopu
$caseInsensitiveCrosstab = array();
- if (count($crosstab) > 0) {
+ if (is_countable($crosstab) && count($crosstab) > 0) {
foreach ($crosstab as $fkey => $fvalue) {
$fkey = mb_strtolower($fkey,'UTF-8');
if (count($fvalue) > 0) {
foreach ($fvalue as $skey => $svalue) {
$skey = mb_strtolower($skey,'UTF-8');
- $caseInsensitiveCrosstab[$fkey][$skey] += $svalue;
+ $caseInsensitiveCrosstab[$fkey][$skey] = (isset($caseInsensitiveCrosstab[$fkey][$skey])? $caseInsensitiveCrosstab[$fkey][$skey] += $svalue : $svalue);
}
}
}
}
$crosstab = $caseInsensitiveCrosstab;
# poiščemo pripadajočo spremenljivko
- $var_options1 = $this->_HEADERS[$v_first['spr']]['options'];
- $var_options2 = $this->_HEADERS[$v_second['spr']]['options'];
+ $var_options1 = isset($this->_HEADERS[$v_first['spr']]['options'])?$this->_HEADERS[$v_first['spr']]['options']:array();
+ $var_options2 = isset($this->_HEADERS[$v_second['spr']]['options'])?$this->_HEADERS[$v_second['spr']]['options']:array();
# inicializacija
$_all_options1 = array();
@@ -1560,12 +1604,12 @@ class SurveyCrosstabs {
# najprej poiščemo (združimo) vse opcije ki so definirane kot opcije spremenljivke in vse ki so v crosstabih
if (count($var_options1) > 0 && $spr_1_checkbox !== true ) {
foreach ($var_options1 as $okey => $opt) {
- $_all_options1[$okey] = array('naslov'=>$opt, 'cnt'=>$options1[$okey], 'type'=>'o');
+ $_all_options1[$okey] = array('naslov'=>$opt, 'cnt'=>/* $options1[$okey] */0, 'type'=>'o');
}
}
if (count($var_options2) > 0 && $spr_2_checkbox !== true) {
foreach ($var_options2 as $okey => $opt) {
- $_all_options2[$okey] = array('naslov'=>$opt, 'cnt'=>$options2[$okey], 'type'=>'o');
+ $_all_options2[$okey] = array('naslov'=>$opt, 'cnt'=>/* $options2[$okey] */0, 'type'=>'o');
}
}
# za checkboxe dodamo posebej vse opcije
@@ -1598,18 +1642,19 @@ class SurveyCrosstabs {
foreach ($crosstab AS $_kvar1=>$_var1) {
# missingov ne dodajamo še zdaj, da ohranimo pravilen vrstni red
if (!isset($_allMissing_answers[$_kvar1]) && !isset($_all_options1[$_kvar1])) {
- $_all_options1[$_kvar1] = array('naslov'=>$_kvar1, 'cnt'=>($_all_options1[$_kvar1]['cnt']+1), 'type'=>'t');
+ $_all_options1[$_kvar1] = array('naslov'=>$_kvar1, 'cnt'=>(isset($_all_options1[$_kvar1]['cnt'])?$_all_options1[$_kvar1]['cnt']+1:1), 'type'=>'t');
}
foreach ($_var1 AS $_kvar2=>$_var2) {
if (!isset($_allMissing_answers[$_kvar1]) || (isset($_allMissing_answers[$_kvar1]) && isset($_pageMissing_answers[$_kvar1]))) {
- $sumaStolpec[$_kvar1] += $_var2;
+ $sumaStolpec[$_kvar1] = (isset($sumaStolpec[$_kvar1]) ? $sumaStolpec[$_kvar1] += $_var2 : $_var2);
}
if (!isset($_allMissing_answers[$_kvar2]) || (isset($_allMissing_answers[$_kvar2]) && isset($_pageMissing_answers[$_kvar2]))) {
- $sumaVrstica[$_kvar2] += $_var2;
+ $sumaVrstica[$_kvar2] = (isset($sumaVrstica[$_kvar2]) ? $sumaVrstica[$_kvar2] += $_var2 : $_var2);
}
# missingov ne dodajamo še zdaj, da ohranimo pravilen vrstni red
- if (!isset($_allMissing_answers[$_kvar2]) && !isset($_all_options2[$_kvar2])) {
+ //if (!isset($_allMissing_answers[$_kvar2]) && !isset($_all_options2[$_kvar2])) {
+ if (array_key_exists($_kvar2, $_allMissing_answers) && array_key_exists($_kvar2, $_all_options2)) {
$_all_options2[$_kvar2] = array('naslov'=>$_kvar2, 'cnt'=>($_all_options1[$_kvar2]['cnt']+1), 'type'=>'t');
}
@@ -1633,10 +1678,10 @@ class SurveyCrosstabs {
foreach ($_allMissing_answers AS $miskey => $_missing) {
if (!isset($_pageMissing_answers[$miskey])) {
if ( $spr_1_checkbox !== true) {
- $_all_options1[$miskey] = array('naslov'=>$_missing, 'cnt'=>(int)$options1[$miskey], 'type'=>'m');
+ $_all_options1[$miskey] = array('naslov'=>$_missing, 'cnt'=>/* (int)$options1[$miskey] */null, 'type'=>'m');
}
if ( $spr_2_checkbox !== true ) {
- $_all_options2[$miskey] = array('naslov'=>$_missing, 'cnt'=>(int)$options2[$miskey], 'type'=>'m');
+ $_all_options2[$miskey] = array('naslov'=>$_missing, 'cnt'=>/* (int)$options2[$miskey] */null, 'type'=>'m');
}
}
}
@@ -1784,22 +1829,24 @@ class SurveyCrosstabs {
# gremo skozi vsako celico
if ($cnt1 > 0 && $cnt2) {
foreach ($_all_options1 as $ckey1 => $crossVariabla1) {
- if($sumaStolpec[$ckey1]!=null) {
+ if(isset($sumaStolpec[$ckey1])&&$sumaStolpec[$ckey1]!=null) {
foreach ($_all_options2 as $ckey2 => $crossVariabla2) {
- if($sumaVrstica[$ckey2]!=null) {
+ if(isset($sumaVrstica[$ckey2]) && $sumaVrstica[$ckey2]!=null) {
# skupna suma
$_w = $sumaSkupna;
#frekvenca celice
- $_fij = $crosstab[$ckey1][$ckey2];
+ $_fij = isset($crosstab[$ckey1][$ckey2]) ? $crosstab[$ckey1][$ckey2] : 0;
#suma vrstice
$_ri = $sumaVrstica[$ckey2];
#suma stolpca
$_cj = $sumaStolpec[$ckey1];
# povprečje vrstice
+ if(!isset($sum_avgi[$ckey2])) $sum_avgi[$ckey2] = 0;
$sum_avgi[$ckey2] += ((int)$_ri != 0) ? ((int)$_fij * (int)$ckey1 / (int)$_ri) : 0;
# povprečje stolpcev
+ if(!isset($sum_avgj[$ckey1])) $sum_avgj[$ckey1] = 0;
$sum_avgj[$ckey1] += ((int)$_cj != 0) ? ((int)$_fij * (int)$ckey2 / (int)$_cj) : 0;
# exC - expected count (pricakovana vrednost
@@ -1850,8 +1897,8 @@ class SurveyCrosstabs {
if ($cnt1 > 0 && $cnt2)
foreach ($_all_options1 as $ckey1 => $crossVariabla1) {
foreach ($_all_options2 as $ckey2 => $crossVariabla2) {
- $fr = (float)$crosstab[$ckey1][$ckey2];
- $exp = (float)$exC[$ckey1][$ckey2];
+ $fr = isset($crosstab[$ckey1][$ckey2])?(float)$crosstab[$ckey1][$ckey2]:0;
+ $exp = isset($exC[$ckey1][$ckey2])?(float)$exC[$ckey1][$ckey2]:0;
if ($exp != 0) {
$hi2 += pow(($fr - $exp),2) / $exp;
}
@@ -1883,7 +1930,6 @@ class SurveyCrosstabs {
}
-
/** Sestavi array nepravilnih odgovorov
*
*/
@@ -2105,7 +2151,7 @@ class SurveyCrosstabs {
}
# če smo radio enableInspect
- if ($sdsp['enableInspect'] == '1' || (isset($_SESSION['enableInspect']) && $_SESSION['enableInspect'] == true)) {
+ if (isset($sdsp['enableInspect']) && $sdsp['enableInspect'] == '1' || (isset($_SESSION['enableInspect']) && $_SESSION['enableInspect'] == true)) {
$this->enableInspect = true;
} else {
# če ne preberemo iz profila
@@ -2561,8 +2607,10 @@ class SurveyCrosstabs {
$this->displaySessionInspectCheckbox();
}
+
function displaySessionInspectCheckbox() {
global $lang;
+
echo '<input type="checkbox" id="session_inspect" '.($this->enableInspect == true ? ' checked="checekd"' : '').' onClick="changeSessionInspect();">'.$lang['srv_inspect_setting'];
echo Help :: display('srv_crosstab_inspect');
}
@@ -2571,10 +2619,15 @@ class SurveyCrosstabs {
function displayLinePercent() {
global $lang;
- echo '<input id="crossCheck1" name="crossCheck1" onchange="change_crosstab_percent();" type="checkbox" ' . ($this->crossChk1 == true ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
- echo '<label for="crossCheck1" id="spn_residual_sp1" class="ctbChck_sp1">' . $lang['srv_analiza_crosstab_odstotek_vrstice_short'].'</label>';
- echo '<input id="crossDoColor" name="crossDoColor" onchange="change_crosstab_color();" type="checkbox" ' . ($this->doColor == true ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
- echo '<label for="crossDoColor" id="spn_residual_sp1" class="ctbChck_sp1">' . $lang['srv_analiza_crosstab_color'].'</label>';
+ echo '<div class="setting_line">';
+ echo ' <input id="crossCheck1" name="crossCheck1" onchange="change_crosstab_percent();" type="checkbox" ' . ($this->crossChk1 == true ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
+ echo ' <label for="crossCheck1" id="spn_residual_sp1">' . $lang['srv_analiza_crosstab_odstotek_vrstice_short'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_line">';
+ echo ' <input id="crossDoColor" name="crossDoColor" onchange="change_crosstab_color();" type="checkbox" ' . ($this->doColor == true ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
+ echo ' <label for="crossDoColor" id="spn_residual_sp1">' . $lang['srv_analiza_crosstab_color'].'</label>';
+ echo '</div>';
}
function displayResidual(){
@@ -2582,15 +2635,19 @@ class SurveyCrosstabs {
$selected = ($this->crossChkEC + $this->crossChkRE + $this->crossChkSR + $this->crossChkAR == 4) ? true : false;
- echo '<input id="crossResiduals" name="crossResiduals" onchange="saveResidualProfileSetting(\''.SurveyDataSettingProfiles::getCurentProfileId().'\', this.checked); return false;" type="checkbox" ' . ($selected ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
- echo '<label for="crossResiduals" id="crossResiduals" class="show_residual">' . $lang['srv_analiza_crosstab_residuals'].'</label>';
+ echo '<div class="setting_line">';
+ echo ' <input id="crossResiduals" name="crossResiduals" onchange="saveResidualProfileSetting(\''.SurveyDataSettingProfiles::getCurentProfileId().'\', this.checked); return false;" type="checkbox" ' . ($selected ? ' checked="checked" ' : '') . ' autocomplete="off"/>';
+ echo ' <label for="crossResiduals" id="crossResiduals">' . $lang['srv_analiza_crosstab_residuals'].'</label>';
+ echo '</div>';
}
function displayShowChart() {
global $lang;
- echo '<input id="showChart" name="showChart" onchange="showTableChart(\'crosstab\');" type="checkbox" ' . ($this->showChart == true ? ' checked="checked" ' : '') . ' />';
- echo '<label for="showChart" id="showChart" class="showChart">'.$lang['srv_show_charts'].'</label>';
+ echo '<div class="setting_line">';
+ echo ' <input id="showChart" name="showChart" onchange="showTableChart(\'crosstab\');" type="checkbox" ' . ($this->showChart == true ? ' checked="checked" ' : '') . ' />';
+ echo ' <label for="showChart" id="showChart">'.$lang['srv_show_charts'].'</label>';
+ echo '</div>';
}
function presetVariables() {
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyEditsAnalysis.php b/admin/survey/classes/surveyAnalysis/class.SurveyEditsAnalysis.php
index b1b7b5f..b7f4bf9 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyEditsAnalysis.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyEditsAnalysis.php
@@ -15,20 +15,20 @@ class SurveyEditsAnalysis{
function __construct($anketa){
- if ((int)$anketa > 0){
- $this->anketa = $anketa;
+ if ((int)$anketa > 0){
- # polovimo vrsto tabel (aktivne / neaktivne)
- SurveyInfo :: getInstance()->SurveyInit($this->anketa);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
- }
- else {
- echo 'Invalid Survey ID!';
- exit();
- }
+ $this->anketa = $anketa;
+
+ # polovimo vrsto tabel (aktivne / neaktivne)
+ SurveyInfo :: getInstance()->SurveyInit($this->anketa);
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+ }
+ else {
+
+ echo 'Invalid Survey ID!';
+ exit();
+ }
}
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyMeans.php b/admin/survey/classes/surveyAnalysis/class.SurveyMeans.php
index f2155cf..9e3230d 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyMeans.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyMeans.php
@@ -8,7 +8,7 @@
*
*/
-define("EXPORT_FOLDER", "admin/survey/SurveyData");
+if(!defined("EXPORT_FOLDER"))define("EXPORT_FOLDER", "admin/survey/SurveyData");
class SurveyMeans{
@@ -32,19 +32,29 @@ class SurveyMeans{
public $doValues = true; # checkbox Prikaži vrednosti
- private $sessionData; # podatki ki so bili prej v sessionu - za nastavitve, ki se prenasajo v izvoze...
+ private $sessionData = null; # podatki ki so bili prej v sessionu - za nastavitve, ki se prenasajo v izvoze...
+ protected $crossNavVsEno = null;
+
+ protected $currentMissingProfile = null;
+
+ protected $setUpJSAnaliza = null;
public function __construct($sid) {
+ global $global_user_id;
+
if ((int)$sid > 0) {
$this->sid = $sid;
# polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->sid);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+ // Pri glasovanju tega ne pustimo
+ if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
+ die();
+ }
+
# Inicializiramo in polovimo nastavitve missing profila
SurveyStatusProfiles::Init($this->sid);
SurveyUserSetting::getInstance()->Init($this->sid, $global_user_id);
@@ -169,6 +179,7 @@ class SurveyMeans{
# izrišemo desne linke do posameznih nastavitev
+ $SSH = new SurveyStaticHtml($this->sid);
$SSH -> displayAnalizaRightOptions(M_ANALYSIS_MEANS);
}
@@ -234,38 +245,36 @@ class SurveyMeans{
function displayDropdowns() {
global $lang;
+
$variables1 = $this->getVariableList(1);
$variables2 = $this->getVariableList(2);
- echo '<div id="meansLeftDropdowns" >';
- if ((int)$this->variabla1['0']['seq'] > 0) {
- echo '<span class="pointer space_means_new" >&nbsp;</span>';
- }
- echo $lang['srv_means_label1'];
- echo '<br />';
+
+ echo '<div id="meansLeftHolder">';
+
+ echo '<span class="title">'.$lang['srv_means_label1'].'</span>';
+
# iz header datoteke preberemo spremenljivke
#js: $("#means_variable_1, #means_variable_2").live('click', function() {})
if (count($this->variabla1) > 0) {
- $br=null;
- if ((int)$this->variabla1['0']['seq'] > 0) {
- echo '<span class="pointer" id="means_add_new" onclick="means_add_new_variable(\'1\');"><span class="faicon add small icon-as_link" title=""></span></span>';
- }
-
+
+ echo '<div id="meansLeftDropdowns">';
+
foreach($this->variabla1 AS $_key => $variabla1) {
- echo $_br;
- echo '<span id="v1_'.$_key.'">';
- echo '<select name="means_variable_1" id="means_variable_1" onchange="change_means(); return false;" autocomplete="off">';
+ echo '<div id="v1_'.$_key.'" class="variabla_line">';
+
+ echo '<select name="means_variable_1" id="means_variable_1" class="dropdown large" onchange="change_means(); return false;" autocomplete="off">';
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
echo '<option value="0" selected="selected" >'. $lang['srv_means_izberi_prvo'].'</option>';
}
foreach ($variables1 as $variable) {
- echo '<option value="'.$variable['sequence'].'" spr_id="'.$variable['spr_id'].'" '
+ echo '<option value="'.(isset($variable['sequence'])?$variable['sequence']:'').'" spr_id="'.(isset($variable['spr_id'])?$variable['spr_id']:'').'" '
. ( isset($variable['grd_id']) ? ' grd_id="'.$variable['grd_id'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- . ( ($variabla1['seq'] > 0 &&$variabla1['seq'] == $variable['sequence']) ? ' selected="selected" ' : '')
+ . ( ($variabla1['seq'] > 0 &&isset($variable['sequence'])&&$variabla1['seq'] == $variable['sequence']) ? ' selected="selected" ' : '')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
. $variable['variableNaslov'].'</option>';
@@ -273,38 +282,39 @@ class SurveyMeans{
}
echo '</select>';
+
if (count($this->variabla1) > 1) {
- echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
- } else {
- #echo '<span class="space_means_new">&nbsp;</span>';
- }
+ echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle" title=""></span></span>';
+ }
+
+ echo '</div>';
+ }
- $_br = '<br/><span class="space_means_new">&nbsp;</span>';
- echo '</span>';
+ echo '</div>';
+
+ // Gumb za dodajanje spremenljivke
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<button class="blue small" id="means_add_new" onclick="means_add_new_variable(\'1\');">'.$lang['srv_multicrosstabs_add'].'</span>';
}
- $_br = null;
}
echo '</div>';
- echo '<div id="meansRightDropdowns">';
- if ((int)$this->variabla1['0']['seq'] > 0) {
- echo '<span class="pointer space_means_new" >&nbsp;</span>';
- }
- echo $lang['srv_means_label2'];
- echo '<br />';
-
+
+ echo '<div id="meansRightHolder">';
+
+ echo '<span class="title">'.$lang['srv_means_label2'].'</span>';
# za vsako novo spremenljivko 2 nardimo svoj select
if (count($this->variabla2) > 0) {
- if ((int)$this->variabla1['0']['seq'] > 0) {
- echo '<span class="pointer" id="means_add_new" onclick="means_add_new_variable(\'2\');"><span class="faicon add small icon-as_link" title="'.'"></span></span>';
- }
-
+
+ echo '<div id="meansRightDropdowns">';
+
foreach($this->variabla2 AS $_key => $variabla2) {
- echo $_br;
- echo '<span id="v2_'.$_key.'">';
- echo '<select name="means_variable_2" id="means_variable_2" onchange="change_means(); return false;" autocomplete="off"'
+
+ echo '<div id="v2_'.$_key.'" class="variabla_line">';
+
+ echo '<select name="means_variable_2" id="means_variable_2" class="dropdown large" onchange="change_means(); return false;" autocomplete="off"'
. ((int)$this->variabla1['0']['seq'] > 0 ? '' : ' disabled="disabled" ')
.'>';
@@ -319,39 +329,55 @@ class SurveyMeans{
}
foreach ($variables2 as $variable) {
- echo '<option value="'.$variable['sequence'].'" spr_id="'.$variable['spr_id'].'" '
+ echo '<option value="'.(isset($variable['sequence'])?$variable['sequence']:'').'" spr_id="'.(isset($variable['spr_id'])?$variable['spr_id']:'').'" '
. ( isset($variable['grd_id']) ? ' grd_id="'.$variable['grd_id'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- . ( $variabla2['seq'] > 0 && $variabla2['seq'] == $variable['sequence'] ? ' selected="selected" ' : '')
+ . ( $variabla2['seq'] > 0 && isset($variable['sequence']) && $variabla2['seq'] == $variable['sequence'] ? ' selected="selected" ' : '')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
. $variable['variableNaslov'] .'</option>';
}
echo '</select>';
+
if (count($this->variabla2) > 1) {
echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
- } else {
- echo '<span class="space_means_new">&nbsp;</span>';
- }
+ }
+
+ echo '</div>';
+ }
+
+ echo '</div>';
- $_br = '<br/><span class="space_means_new">&nbsp;</span>';
- echo '</span>';
+ // Gumb za dodajanje spremenljivke
+ if ((int)$this->variabla1['0']['seq'] > 0) {
+ echo '<button class="blue small" id="means_add_new" onclick="means_add_new_variable(\'2\');">'.$lang['srv_multicrosstabs_add'].'</button>';
}
}
echo '</div>';
- echo '<span id="meansSubSetting" class="floatLeft spaceLeft">';
- if (count($this->variabla2) > 1) {
- echo '<label><input id="chkMeansSeperate" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansSeperateTables']==true?' checked="checked"':'' ).'> '.$lang['srv_means_setting_1'].'</label>';
-
- echo '<br /><span id="spanMeansJoinPercentage"'.($this->sessionData['means']['meansSeperateTables']!=true?'':' class="displayNone"').'><label><input id="chkMeansJoinPercentage" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansJoinPercentage']==true?' checked="checked"':'' ).'> '.$lang['srv_means_setting_2'].'</label></span>';
- }
- echo '<br /><label><input id="showChart" type="checkbox" onchange="showTableChart(\'mean\');" '.($this->sessionData['mean_charts']['showChart']==true?' checked="checked"':'' ).'> '.$lang['srv_show_charts'].'</label>';
- echo '</span>';
+
+ echo '<div id="meansSubSetting">';
- echo '<br class="clr"/>';
+ echo '<span class="title">'.$lang['settings'].':</span>';
+
+ if (count($this->variabla2) > 1) {
+
+ echo '<div class="setting_line">';
+ echo ' <input id="chkMeansSeperate" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansSeperateTables']==true?' checked="checked"':'' ).'><label for="chkMeansSeperate">'.$lang['srv_means_setting_1'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_line">';
+ echo ' <span id="spanMeansJoinPercentage"'.($this->sessionData['means']['meansSeperateTables']!=true?'':' class="displayNone"').'><input id="chkMeansJoinPercentage" type="checkbox" onchange="changeMeansSubSetting();" '.($this->sessionData['means']['meansJoinPercentage']==true?' checked="checked"':'' ).'><label for="chkMeansJoinPercentage">'.$lang['srv_means_setting_2'].'</label></span>';
+ echo '</div>';
+ }
+
+ echo '<div class="setting_line">';
+ echo ' <input id="showChart" type="checkbox" onchange="showTableChart(\'mean\');" '.((isset($this->sessionData['mean_charts']['showChart'])&&$this->sessionData['mean_charts']['showChart']==true)?' checked="checked"':'' ).'><label for="showChart">'.$lang['srv_show_charts'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
// Ikone za izvoz (so tukaj da se refreshajo ob ajax klicu)
$this->displayExport();
}
@@ -360,7 +386,6 @@ class SurveyMeans{
global $lang;
global $admin_type;
- $br='';
$means = array();
# če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
@@ -370,12 +395,13 @@ class SurveyMeans{
SurveyConditionProfiles:: getConditionString();
# če imamo filter spremenljivk ga izpišemo
- SurveyVariablesProfiles:: getProfileString($doNewLine , true);
+ SurveyVariablesProfiles:: getProfileString();
# če imamo rekodiranje
$SR = new SurveyRecoding($this->sid);
$SR -> getProfileString();
+
if ($this->getSelectedVariables(1) !== null && $this->getSelectedVariables(2) !== null) {
$variables1 = $this->getSelectedVariables(2);
$variables2 = $this->getSelectedVariables(1);
@@ -383,7 +409,7 @@ class SurveyMeans{
$c2=0;
# odvisno ok checkboxa prikazujemo druge variable v isti tabeli ali v svoji
- if ($this->sessionData['means']['meansSeperateTables'] == true ) {
+ if (isset($this->sessionData['means']['meansSeperateTables'])&&$this->sessionData['means']['meansSeperateTables'] == true ) {
#prikazujemo ločeno
if (is_array($variables2) && count($variables2) > 0) {
foreach ($variables2 AS $v_second) {
@@ -420,21 +446,25 @@ class SurveyMeans{
if (is_array($means) && count($means) > 0) {
$counter=0;
foreach ($means AS $mean_sub_grup) {
- echo($br);
- $this->displayMeansTable($mean_sub_grup);
- $br='<br />';
- // Zvezdica za vkljucitev v porocilo
+ echo '<div class="means_table_holder">';
+
+ // Zvezdica za vkljucitev v porocilo
$spr2 = $mean_sub_grup[0]['v1']['seq'].'-'.$mean_sub_grup[0]['v1']['spr'].'-'.$mean_sub_grup[0]['v1']['grd'];
$spr1 = $mean_sub_grup[0]['v2']['seq'].'-'.$mean_sub_grup[0]['v2']['spr'].'-'.$mean_sub_grup[0]['v2']['grd'];
SurveyAnalysis::Init($this->sid);
SurveyAnalysis::addCustomReportElement($type=6, $sub_type=0, $spr1, $spr2);
-
+
+ // Izris tabele
+ $this->displayMeansTable($mean_sub_grup);
+
// Izrisemo graf za tabelo - zaenkrat samo admin
- if($this->sessionData['mean_charts']['showChart'] && $_GET['m'] != 'analysis_creport'){
- $tableChart = new SurveyTableChart($this->sid, $this, 'mean', $counter);
+ if(isset($this->sessionData['mean_charts']['showChart']) && $this->sessionData['mean_charts']['showChart'] && (!isset($_GET['m'])||$_GET['m'] != 'analysis_creport')){
+ $tableChart = new SurveyTableChart($this->sid, $this, 'mean', $counter);
$tableChart->display();
}
+
+ echo '</div>';
$counter++;
}
@@ -469,14 +499,19 @@ class SurveyMeans{
$href_pdf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis&anketa=' . $this->sid);
$href_rtf = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_rtf&anketa=' . $this->sid);
$href_xls = makeEncodedIzvozUrlString('izvoz.php?b=export&m=mean_izpis_xls&anketa=' . $this->sid);
- echo '<script>';
+
+
+ echo '<script>';
+
# nastavimopravilne linke
echo '$("#secondNavigation_links a#meansDoPdf").attr("href", "'.$href_pdf.'");';
echo '$("#secondNavigation_links a#meansDoRtf").attr("href", "'.$href_rtf.'");';
echo '$("#secondNavigation_links a#meansDoXls").attr("href", "'.$href_xls.'");';
+
# prikažemo linke
echo '$("#hover_export_icon").removeClass("hidden");';
echo '$("#secondNavigation_links a").removeClass("hidden");';
+
echo '</script>';
}
}
@@ -563,14 +598,14 @@ class SurveyMeans{
$this->variablesList = array();
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($this->_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'))) {
continue;
}
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip'])?$spremenljivka['tip']:null;
- $skala = (int)$spremenljivka['skala'];
+ $skala = isset($spremenljivka['skala'])?(int)$spremenljivka['skala']:0;
# pri drugi, analizirani variabli morajo biti numerične ali ordinalne, v ostalem pa nič)
# skala - 0 Ordinalna
# skala - 1 Nominalna
@@ -669,7 +704,7 @@ class SurveyMeans{
# imamo multicheckbox
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable'])&&$grid['variable'] != '') {
$sub++;
$this->variablesList[$dropdown][] = array(
'tip'=>$tip,
@@ -685,7 +720,7 @@ class SurveyMeans{
# imamo več gridov - tabele
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable'])&&$grid['variable'] != '') {
$sub++;
$this->variablesList[$dropdown][] = array(
'tip'=>$tip,
@@ -770,11 +805,11 @@ class SurveyMeans{
if ($this->dataFileName != '' && file_exists($this->dataFileName)) {
- $spr1 = $this->_HEADERS[$v_first['spr']];
- $spr2 = $this->_HEADERS[$v_second['spr']];
+ $spr1 = isset($this->_HEADERS[$v_first['spr']])?$this->_HEADERS[$v_first['spr']]:null;
+ $spr2 = isset($this->_HEADERS[$v_second['spr']])?$this->_HEADERS[$v_second['spr']]:null;
- $grid1 = $spr1['grids'][$v_first['grd']];
- $grid2 = $spr2['grids'][$v_second['grd']];
+ $grid1 = isset($spr1['grids'][$v_first['grd']])?$spr1['grids'][$v_first['grd']]:array();
+ $grid2 = isset($spr2['grids'][$v_second['grd']])?$spr2['grids'][$v_second['grd']]:array();
$sequence1 = $v_first['seq'];
$sequence2 = $v_second['seq'];
@@ -785,7 +820,7 @@ class SurveyMeans{
$spr_1_checkbox = false;
$spr_2_checkbox = false;
- if ($spr1['tip'] == 2 || $spr1['tip'] == 16) {
+ if (isset($spr1['tip']) && ($spr1['tip'] == 2 || $spr1['tip'] == 16)) {
$spr_1_checkbox = true;
if ($spr1['tip'] == 2) {
$sekvences1 = explode('_',$spr1['sequences']);
@@ -800,10 +835,10 @@ class SurveyMeans{
$sekvences1[] = $sequence1;
}
- if ($spr2['tip'] == 2 || $spr2['tip'] == 16) {
+ if (isset($spr1['tip']) && ($spr2['tip'] == 2 || $spr2['tip'] == 16)) {
$spr_2_checkbox = true;
if ($spr2['tip'] == 2 ) {
- $sekvences2 = explode('_',$this->_HEADERS[$v_second['spr']]['sequences']);
+ if(isset($this->_HEADERS[$v_second['spr']]['sequences'])) $sekvences2 = explode('_',$this->_HEADERS[$v_second['spr']]['sequences']);
}
if ($spr2['tip'] == 16) {
foreach ($grid2['variables'] AS $_variables) {
@@ -817,17 +852,17 @@ class SurveyMeans{
# pogoji so že dodani v _CURRENT_STATUS_FILTER
# dodamo filter za loop-e
- if (isset($this->_CURRENT_LOOP['filter']) && $this->_CURRENT_LOOP['filter'] != '') {
+ /* if (isset($this->_CURRENT_LOOP['filter']) && $this->_CURRENT_LOOP['filter'] != '') {
$status_filter = $this->_CURRENT_STATUS_FILTER.' && '.$this->_CURRENT_LOOP['filter'];
- } else {
+ } else { */
$status_filter = $this->_CURRENT_STATUS_FILTER;
- }
+ //}
# dodamo status filter za vse sekvence checkbox-a da so == 1
- if ($additional_status_filter != null) {
+ /* if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
- }
+ }*/
# odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
@@ -836,7 +871,7 @@ class SurveyMeans{
$tmp_file = $folder.'tmp_means_'.$this->sid.'.tmp';
$file_handler = fopen($tmp_file,"w");
- fwrite($file_handler,"<?php\n");
+ fwrite($file_handler,"<?php\n\$meansArray=array();\n");
fclose($file_handler);
if (count($sekvences1)>0)
foreach ($sekvences1 AS $sequence1) {
@@ -917,6 +952,7 @@ class SurveyMeans{
}
}
}
+
# inicializacija
$_all_options = array();
$sumaVrstica = array();
@@ -924,7 +960,7 @@ class SurveyMeans{
$sumaMeans = 0;
# poiščemo pripadajočo spremenljivko
- $var_options = $this->_HEADERS[$v_second['spr']]['options'];
+ $var_options = isset($this->_HEADERS[$v_second['spr']]['options'])?$this->_HEADERS[$v_second['spr']]['options']:array();
# najprej poiščemo (združimo) vse opcije ki so definirane kot opcije spremenljivke in vse ki so v meansih
@@ -953,7 +989,7 @@ class SurveyMeans{
# missingov ne dodajamo še zdaj, da ohranimo pravilen vrstni red
foreach ($_var1 AS $_kvar2=>$_var2) {
if (!isset($_allMissing_answers[$_kvar1]) || (isset($_allMissing_answers[$_kvar1]) && isset($_pageMissing_answers[$_kvar1]))) {
- $sumaVrstica[$_kvar1] += $_var2;
+ $sumaVrstica[$_kvar1] = isset($sumaVrstica[$_kvar1])?$sumaVrstica[$_kvar1] += $_var2 : $_var2;
}
}
# missingov ne dodajamo še zdaj, da ohranimo pravilen vrstni red
@@ -1042,7 +1078,6 @@ class SurveyMeans{
}
}
-
$meansArr['v1'] = $v_first; # prva variabla
$meansArr['v2'] = $v_second; # druga variabla
@@ -1066,75 +1101,72 @@ class SurveyMeans{
# ali prikazujemo vrednosti variable pri spremenljivkah
$show_variables_values = $this->doValues;
- $showSingleUnits = $this->sessionData['means']['meansJoinPercentage']==true && $this->sessionData['means']['meansSeperateTables'] == false;
+ $showSingleUnits = isset($this->sessionData['means']['meansJoinPercentage'])&&$this->sessionData['means']['meansJoinPercentage']==true && $this->sessionData['means']['meansSeperateTables'] == false;
+
# izrišemo tabelo
- echo '<table class="anl_tbl_crosstab fullWidth" style="margin-top:10px;">';
- echo '<colgroup>';
- echo '<col style="width:auto; min-width:30px;" />';
- echo '<col style="width:auto; min-width:30px; " />';
- for ($i = 0; $i < $cols; $i++) {
- echo '<col style="width:auto; min-width:30px;" />';
- if ($showSingleUnits == false) {
- echo '<col style="width:auto; min-width:30px;" />';
- }
- }
- if ($showSingleUnits == true) {
- echo '<col style="width:auto; min-width:30px;" />';
- }
- echo '</colgroup>';
+ echo '<table class="table_means">';
+
+
+ echo '<tr class="row1">';
- echo '<tr>';
- #echo '<td>xx&nbsp;</td>';
# ime variable
# teksti labele:
$label2 = $this->getSpremenljivkaTitle($_means[0]['v2']);
if ($showSingleUnits == false) {
$span = ' colspan="2"';
}
- echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_title ctbCll" rowspan="2">';
+ echo '<td class="cell_question" rowspan="2">';
echo $label2;
echo '</td>';
for ($i = 0; $i < $cols; $i++) {
- echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_title ctbCll"'.$span.'>';
+ echo '<td class="cell_question" '.$span.'>';
$label1 = $this->getSpremenljivkaTitle($_means[$i]['v1']);
echo $label1;
echo '</td>';
}
if ($showSingleUnits == true) {
- echo '<td class="anl_bl ">&nbsp;</td>';
+ echo '<td class="anl_bl">&nbsp;</td>';
}
echo '</tr>';
- echo '<tr>';
+
+
+ echo '<tr class="row2">';
for ($i = 0; $i < $cols; $i++) {
+
#Povprečje
- echo '<td class="anl_bt anl_bl anl_br anl_ac rsdl_bck_variable1 ctbCll" >';
+ echo '<td class="cell_value">';
echo $lang['srv_means_label'];
echo '</td>';
+
#enote
if ($showSingleUnits == false) {
- echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">'.$lang['srv_means_label4'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_means_label4'].'</td>';
}
}
+
if ($showSingleUnits == true) {
- echo '<td class="anl_bl anl_bt anl_br anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">'.$lang['srv_means_label4'].'</td>';
+ echo '<td class="cell_value">'.$lang['srv_means_label4'].'</td>';
}
echo '</tr>';
+
if (count($_means[0]['options']) > 0) {
-
+ $max_units=0;
foreach ($_means[0]['options'] as $ckey2 =>$crossVariabla2) {
$units_per_row = 0;
+
echo '<tr>';
- echo '<td class="anl_bt anl_bl anl_ac rsdl_bck_variable1 ctbCll">';
+
+ echo '<td class="cell_question">';
echo $crossVariabla2['naslov'];
# če ni tekstovni odgovor dodamo key
if ($crossVariabla2['type'] !== 't' ) {
if ($show_variables_values == true) {
- if ($crossVariabla2['vr_id'] == null) {
+ if (!isset($crossVariabla2['vr_id'])||$crossVariabla2['vr_id'] == null) {
echo '&nbsp;( '.$ckey2.' )';
} else {
echo '&nbsp;( '.$crossVariabla2['vr_id'].' )';
@@ -1142,48 +1174,61 @@ class SurveyMeans{
}
}
echo '</td>';
+
# celice z vsebino
for ($i = 0; $i < $cols; $i++) {
- echo '<td class="ct_in_cell anl_br'.'" k1="'.$ckey1.'" k2="'.$ckey2.'" n1="'.$crossVariabla1['naslov'].'" n2="'.$crossVariabla2['naslov'].'" v1="'.$crossVariabla1['vr_id'].'" v2="'.$crossVariabla2['vr_id'].'">';
- echo $this->formatNumber($_means[$i]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
+ echo '<td class="cell_value" k1="'./* $ckey1. */'" k2="'.$ckey2.'" n1="'./* $crossVariabla1['naslov']. */'" n2="'.$crossVariabla2['naslov'].'" v1="'./* $crossVariabla1['vr_id']. */'" v2="'.(isset($crossVariabla2['vr_id'])?$crossVariabla2['vr_id']:'').'">';
+ echo $this->formatNumber(isset($_means[$i]['result'][$ckey2])?$_means[$i]['result'][$ckey2]:null, SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
echo '</td>';
+
if ($showSingleUnits == false) {
- echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 crostabSuma">';
- echo (int)$_means[$i]['sumaVrstica'][$ckey2];
+ echo '<td class="cell_value">';
+ echo (isset($_means[$i]['sumaVrstica'][$ckey2])?(int)$_means[$i]['sumaVrstica'][$ckey2]:0);
echo '</td>';
- } else {
- $units_per_row = max($units_per_row,(int)$_means[$i]['sumaVrstica'][$ckey2]);
+ }
+ else {
+ $units_per_row = max($units_per_row,(isset($_means[$i]['sumaVrstica'][$ckey2])?(int)$_means[$i]['sumaVrstica'][$ckey2]:0));
}
}
+
if ($showSingleUnits == true) {
- echo '<td class="anl_ac anl_bl anl_bt anl_br rsdl_bck0 crostabSuma">';
+ echo '<td class="cell_value">';
echo $units_per_row;
echo '</tr>';
}
+
echo '</tr>';
+
$max_units += $units_per_row;
}
}
+
+
echo '<tr>';
- echo '<td class="anl_bb anl_bt anl_bl anl_ac red anl_ita anl_bck_text_0 rsdl_bck_variable1 ctbCll">'.$lang['srv_means_label3'].'</td>';
+
+ echo '<td class="cell_value">'.$lang['srv_means_label3'].'</td>';
+
for ($i = 0; $i < $cols; $i++) {
- echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo '<td class="cell_value">';
echo $this->formatNumber($_means[$i]['sumaMeans'], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
echo '</td>';
+
if ($showSingleUnits == false) {
- echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo '<td class="cell_value">';
echo (int)$_means[$i]['sumaSkupna'];
echo '</td>';
}
}
+
if ($showSingleUnits == true) {
- echo '<td class="anl_ac anl_bt anl_bl anl_br anl_bb rsdl_bck0 crostabSuma">';
+ echo '<td class="cell_value">';
echo $max_units;
- echo '</tr>';
+ echo '</td>';
}
echo '</tr>';
+
echo '</table>';
}
@@ -1230,20 +1275,20 @@ class SurveyMeans{
$which = $_POST['which'];
$variables = $this->getVariableList($which);
$multiple = true;
-
-
+
+
if ($which == '1') {
- echo '<br/>';
- echo '<span class="space_means_new">&nbsp;</span>';
- echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" onchange="change_means(); return false;" autocomplete="off"'
- .'>';
- # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
- if ( $variabla1['seq'] == null || $variabla1['seq'] == 0 ) {
+ echo '<div class="variabla_line">';
+
+ echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" class="dropdown large" onchange="change_means(); return false;" autocomplete="off">';
+
+ # ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
+ if ( !isset($this->variabla1['seq'])||$this->variabla1['seq'] == null || $this->variabla1['seq'] == 0 ) {
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_izberi_more'].'</option>';
}
foreach ($variables as $variable) {
- echo '<option value="'.$variable['sequence'].'" spr_id="'.$variable['spr_id'].'" '
+ echo '<option value="'.(isset($variable['sequence'])?$variable['sequence']:'').'" spr_id="'.(isset($variable['spr_id'])?$variable['spr_id']:'').'" '
. ( isset($variable['grd_id']) ? ' grd_id="'.$variable['grd_id'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
. '> '
@@ -1251,20 +1296,23 @@ class SurveyMeans{
. $variable['variableNaslov'] . '</option>';
}
+
echo '</select>';
- echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
-
- } else {
- # which = 2
- echo '<br/>';
- echo '<span class="space_means_new">&nbsp;</span>';
- echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" onchange="change_means(); return false;" autocomplete="off"'
- .'>';
+
+ echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle" title=""></span></span>';
+
+ echo '</div>';
+ }
+ else {
+ echo '<div class="variabla_line">';
+
+ echo '<select name="means_variable_'.$which.'" id="means_variable_'.$which.'" class="dropdown large" onchange="change_means(); return false;" autocomplete="off">';
# ce prva variabla ni izbrana, dodamo tekst za izbiro prve variable
if ((int)$this->variabla1['0']['seq'] > 0) {
echo '<option value="0" selected="selected" >'. $lang['srv_analiza_crosstab_najprej_prvo'].'</option>';
- } else {
+ }
+ else {
# če druga variabla ni izbrana dodamo tekst za izbiro druge variable
echo '<option value="0" selected="selected">'. $lang['srv_analiza_crosstab_izberi_more'].'</option>';
}
@@ -1279,7 +1327,10 @@ class SurveyMeans{
}
echo '</select>';
- echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle icon-orange_link" title=""></span></span>';
+
+ echo '<span class="pointer" id="means_remove" onclick="means_remove_variable(this);"><span class="faicon delete_circle" title=""></span></span>';
+
+ echo '</div>';
}
}
@@ -1291,7 +1342,7 @@ class SurveyMeans{
$sekvenca = $v_first['seq'];
$spremenljivka = $this->_HEADERS[$spremenljivka_id];
- $grid = $spremenljivka['grids'][$grid_id];
+ $grid = isset($spremenljivka['grids'][$grid_id])?$spremenljivka['grids'][$grid_id]:array();
# za multicheckboxe popravimo naslov, na podtip
@@ -1303,9 +1354,9 @@ class SurveyMeans{
$labela .= '<span class="anl_variabla">';
$labela .= '<a href="/" title="'.$lang['srv_predogled_spremenljivka'].'" onclick="showspremenljivkaSingleVarPopup(\''.$spremenljivka_id.'\'); return false;">';
$labela .= strip_tags($spremenljivka['naslov']);
- if ($show_variables_values == true) {
+ /* if ($show_variables_values == true) {
$labela .= '&nbsp;('.strip_tags($spremenljivka['variable']).')';
- }
+ } */
$labela .= '</a>';
$labela .= '</span>';
@@ -1313,14 +1364,17 @@ class SurveyMeans{
if (strip_tags($grid['naslov']) != $lang['srv_new_text']) {
$labela .= '<br/>'.strip_tags($grid['naslov']);
}
+
$labela .= '&nbsp;('.strip_tags($grid['variable']).')' ;
- } else {
- if (strip_tags($variable['naslov']) != $lang['srv_new_text']) {
+ }
+ else {
+ if (strip_tags($variable['naslov']) != $lang['srv_new_text'] && strip_tags($variable['naslov']) != $lang['srv_new_vprasanje']) {
$labela .= '<br/>'.strip_tags($variable['naslov']);
}
- if ($show_variables_values == true) {
+
+ /* if ($show_variables_values == true) {
$labela .= '&nbsp;('.strip_tags($variable['variable']).')';
- }
+ } */
}
}
@@ -1331,9 +1385,9 @@ class SurveyMeans{
$labela = '<span class="anl_variabla">';
$labela .= '<a href="/" title="'.$lang['srv_predogled_spremenljivka'].'" onclick="showspremenljivkaSingleVarPopup(\''.$spremenljivka_id.'\'); return false;">';
$labela .= strip_tags($spremenljivka['naslov']);
- if ($show_variables_values == true) {
+ /* if ($show_variables_values == true) {
$labela .= '&nbsp;('.strip_tags($spremenljivka['variable']).')';
- }
+ } */
$labela .= '</a>';
$labela .= '</span>'.NEW_LINE;
}
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyMultiCrosstabs.php b/admin/survey/classes/surveyAnalysis/class.SurveyMultiCrosstabs.php
index 67664da..98c2f59 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyMultiCrosstabs.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyMultiCrosstabs.php
@@ -1,8 +1,8 @@
<?php
-define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti
-define("EXPORT_FOLDER", "admin/survey/SurveyData");
-define("R_FOLDER", "admin/survey/R");
+if(!defined("AUTO_HIDE_ZERRO_VALUE")) define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti
+if(!defined("EXPORT_FOLDER")) define("EXPORT_FOLDER", "admin/survey/SurveyData");
+if(!defined("R_FOLDER")) define("R_FOLDER", "admin/survey/R");
class SurveyMultiCrosstabs {
@@ -74,9 +74,12 @@ class SurveyMultiCrosstabs {
# polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->ank_id);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+
+ // Pri glasovanju tega ne pustimo
+ if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
+ die();
+ }
$this->_CURRENT_STATUS_FILTER = STATUS_FIELD.' ~ /6|5/';
@@ -216,7 +219,7 @@ class SurveyMultiCrosstabs {
if($spr['canChoose'] && in_array($spr['tip'], array(1,3,6))){
echo '<li class="draggable mc_draggable" id="'.$spr['spr_id'].'-'.$spr['sequence'].'">';
- echo '<span class="strong">'.$spr['variable'].'</span> - '.$this->snippet($spr['naslov'], 25);
+ echo ' <span class="strong"><span class="faicon grip"></span>'.$spr['variable'].'</span> - '.$this->snippet($spr['naslov'], 25);
echo '</li>';
}
}
@@ -227,7 +230,7 @@ class SurveyMultiCrosstabs {
$this->displayMCTablesPopups();
// Izris diva za nastavitve tabele
- echo '<div id="mc_table_settings" class="mc_table_settings">';
+ echo '<div id="mc_table_settings" class="mc_table_settings divPopUp PopUpNarrow">';
$this->displayTableSettings();
echo '</div>';
@@ -252,9 +255,19 @@ class SurveyMultiCrosstabs {
// Napolnimo variable ki so ze izbrane
$this->getSelectedVars();
+ // Zvezdica za creport - ce smo v custom reportu tega ne izpisemo
+ /*if($_GET['m'] != 'analysis_creport'){
+
+ echo '<div class="mc_table_top_settings">';
+
+ // Zvezdica za vkljucitev v porocilo
+ SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=10, $sub_type=0, $spr1=$this->table_id);
+
+ echo '</div>';
+ }*/
+
echo '<table id="'.$this->table_id.'" cellspacing="0" cellpadding="0" class="mc_table">';
-
// Imamo 2 nivoja
if($this->colLevel2){
@@ -264,8 +277,10 @@ class SurveyMultiCrosstabs {
elseif(!$this->rowLevel2)
$colspan = ' colspan="2"';
else
- $colspan = ' colspan="4"';
+ $colspan = ' colspan="4"';
+
echo '<tr><td class="borderless" '.$colspan.'></td>';
+
if(count($this->selectedVars['ver'])){
foreach($this->selectedVars['ver'] as $var){
@@ -276,23 +291,27 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$var['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
}
// Izrisemo se zadnjo prazno navpicno celico vrstico
echo '<td id="undefined" class="spr vertical droppable empty" rowspan="4">'.$lang['srv_multicrosstabs_add'].'</td>';
- echo '</tr>';
+ echo '</tr>';
+
+
// Izrisemo VARIABLE za spremenljivko - 2. vrstica
if($this->rowSpan == 0)
$colspan = ' colspan="1"';
elseif(!$this->rowLevel2)
$colspan = ' colspan="2"';
else
- $colspan = ' colspan="4"';
+ $colspan = ' colspan="4"';
+
echo '<tr><td class="borderless" '.$colspan.'></td>';
+
if(count($this->selectedVars['ver'])){
foreach($this->selectedVars['ver'] as $var){
@@ -311,16 +330,18 @@ class SurveyMultiCrosstabs {
}
}
echo '</tr>';
+
// Izris vrstic za 2. nivo - 3. in 4. vrstica
-
if($this->rowSpan == 0)
$colspan = ' colspan="1"';
elseif(!$this->rowLevel2)
$colspan = ' colspan="2"';
else
- $colspan = ' colspan="4"';
+ $colspan = ' colspan="4"';
+
echo '<tr><td class="borderless" '.$colspan.'></td>';
+
if(count($this->selectedVars['ver'])){
foreach($this->selectedVars['ver'] as $parentVar){
@@ -335,7 +356,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$var['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -352,15 +373,19 @@ class SurveyMultiCrosstabs {
}
}
}
+
echo '</tr>';
+
if($this->rowSpan == 0)
$colspan = ' colspan="1"';
elseif(!$this->rowLevel2)
$colspan = ' colspan="2"';
else
- $colspan = ' colspan="4"';
+ $colspan = ' colspan="4"';
+
echo '<tr><td class="borderless" '.$colspan.'></td>';
+
if(count($this->selectedVars['ver'])){
foreach($this->selectedVars['ver'] as $parentVar){
@@ -375,7 +400,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($suboption, 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -384,10 +409,12 @@ class SurveyMultiCrosstabs {
}
}
}
+
echo '</tr>';
}
// Imamo samo 1 nivo
else{
+
// Izrisemo VERTIKALNO izbrane spremenljivkec - 1. vrstica
if($this->rowSpan == 0)
$colspan = ' colspan="1"';
@@ -395,8 +422,10 @@ class SurveyMultiCrosstabs {
$colspan = ' colspan="2"';
else
$colspan = ' colspan="4"';
+
echo '<tr><td class="borderless" '.$colspan.'></td>';
- if(count($this->selectedVars['ver'])){
+
+ if(isset($this->selectedVars['ver'])&&count($this->selectedVars['ver'])){
foreach($this->selectedVars['ver'] as $var){
$colspan = ' colspan="'.($this->table_settings[$this->table_id]['sums'] == 1 && !$this->rowLevel2 ? $var['span']+1 : $var['span']).'"';
@@ -405,7 +434,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$var['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -416,18 +445,22 @@ class SurveyMultiCrosstabs {
}
// Izrisemo se zadnjo prazno navpicno celico vrstico
- echo '<td id="undefined" class="spr vertical droppable empty" rowspan="2">'.$lang['srv_multicrosstabs_add'].'</td>';
+ echo '<td id="undefined" class="spr vertical droppable empty" rowspan="2">'.$lang['srv_multicrosstabs_add'].'</td>';
+
echo '</tr>';
+
// Izrisemo VARIABLE za spremenljivko - 2. vrstica
if($this->rowSpan == 0)
$colspan = ' colspan="1"';
elseif(!$this->rowLevel2)
$colspan = ' colspan="2"';
else
- $colspan = ' colspan="4"';
+ $colspan = ' colspan="4"';
+
echo '<tr><td class="borderless" '.$colspan.'></td>';
- if(count($this->selectedVars['ver'])){
+
+ if(isset($this->selectedVars['ver'])&&count($this->selectedVars['ver'])){
foreach($this->selectedVars['ver'] as $var){
// Loop cez variable spremenljivke
@@ -449,13 +482,14 @@ class SurveyMultiCrosstabs {
}
}
}
+
echo '</tr>';
}
// Izrisemo HORIZONTALNO izbrane variable
- if(count($this->selectedVars['hor'])){
+ if(isset($this->selectedVars['hor'])&&count($this->selectedVars['hor'])){
// Imamo 2 nivoja vrstic
if($this->rowLevel2){
@@ -486,7 +520,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$parentVar['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -507,7 +541,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$var['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -535,7 +569,7 @@ class SurveyMultiCrosstabs {
echo '<tr>';
- echo '<td class="var sums">'.$lang['srv_analiza_crosstab_skupaj'].'</td>';
+ echo '<td class="var sums horizontal">'.$lang['srv_analiza_crosstab_skupaj'].'</td>';
$crosstabs = $this->crosstabData[$parentVar['spr'].'-'.$var['spr']];
@@ -561,7 +595,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$parentVar['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -599,7 +633,7 @@ class SurveyMultiCrosstabs {
echo $this->snippet($this->variablesList[$var['spr']]['naslov'], 25);
// Gumb za brisanje
- echo '<div class="delete_var" onclick="deleteVariable(this);"></div>';
+ echo '<div class="delete_var" onclick="deleteVariable(this);"><span class="faicon remove"></span></div>';
echo '</td>';
}
@@ -622,7 +656,7 @@ class SurveyMultiCrosstabs {
// Vrstica za sumo (ce jo imamo vklopljeno)
if($this->table_settings[$this->table_id]['sums'] == 1 && count($this->selectedVars['ver']) > 0 && !$this->colLevel2){
echo '<tr>';
- echo '<td class="var sums">'.$lang['srv_analiza_crosstab_skupaj'].'</td>';
+ echo '<td class="var sums horizontal">'.$lang['srv_analiza_crosstab_skupaj'].'</td>';
// Loop cez vse stolpce
foreach($this->selectedVars['ver'] as $spr2){
@@ -683,37 +717,26 @@ class SurveyMultiCrosstabs {
echo '</tr>';
-
echo '</table>';
-
- echo '<div class="mc_table_bottom_settings">';
-
// Izrisemo legendo
+ echo '<div class="mc_table_bottom_settings">';
$this->displayLegend();
-
-
- // Ce smo v custom reportu tega ne izpisemo
- if($_GET['m'] != 'analysis_creport'){
-
- // Zvezdica za vkljucitev v porocilo
- SurveyAnalysisHelper::getInstance()->addCustomReportElement($type=10, $sub_type=0, $spr1=$this->table_id);
-
-
- echo '<script type="text/javascript">';
-
- // Nastavimo droppable (drugace po ajaxu ne dela)
- echo '$(function(){createDroppable();});';
-
- // Nastavimo gumb za brisanje spremenljivke
- echo '$(".mc_table tr td.spr").mouseover(function(){$(this).find(".delete_var").show();});';
- echo '$(".mc_table tr td.spr").mouseout(function(){$(this).find(".delete_var").hide();});';
-
- echo '</script>';
- }
-
echo '</div>';
+
+
+ // JS
+ echo '<script type="text/javascript">';
+
+ // Nastavimo droppable (drugace po ajaxu ne dela)
+ echo '$(function(){createDroppable();});';
+
+ // Nastavimo gumb za brisanje spremenljivke
+ echo '$(".mc_table tr td.spr").mouseover(function(){$(this).find(".delete_var").show();});';
+ echo '$(".mc_table tr td.spr").mouseout(function(){$(this).find(".delete_var").hide();});';
+
+ echo '</script>';
}
// Izpis celic v vrstici s podatki
@@ -1108,7 +1131,7 @@ class SurveyMultiCrosstabs {
// Numerus
if($this->table_settings[$this->table_id]['numerus'] == 1){
echo '<tr><td class="bold white">';
- echo $crosstabs['sumaSkupna'];
+ echo ($crosstabs['sumaSkupna'] != '') ? $crosstabs['sumaSkupna'] : '0';
echo '</td></tr>';
}
@@ -1390,91 +1413,84 @@ class SurveyMultiCrosstabs {
echo '<input type="hidden" name="table_id" value="'.$this->table_id.'" />';
- echo '<fieldset>';
- echo '<legend>'.$lang['srv_multicrosstabs_settings_val'].'</legend>';
-
+ echo '<h3>'.$lang['srv_multicrosstabs_settings_val'].'</h3>';
+
+ echo '<div class="setting_holder">';
+
// Prikaz numerusa
- echo '<span class="clr"><input type="checkbox" id="numerus_'.$this->table_id.'" name="numerus" '.($this->table_settings[$this->table_id]['numerus'] == 1 ? ' checked="checked"':'').' value="1" /><label for="numerus_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_numerus'].'</label></span>';
-
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" id="numerus_'.$this->table_id.'" name="numerus" '.($this->table_settings[$this->table_id]['numerus'] == 1 ? ' checked="checked"':'').' value="1" /><label for="numerus_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_numerus'].'</label>';
+ echo '</div>';
// Prikaz procentov
- echo '<span class="clr"><input type="checkbox" id="percent_'.$this->table_id.'" name="percent" '.($this->table_settings[$this->table_id]['percent'] == 1 ? ' checked="checked"':'').' value="1" /><label for="percent_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_percent'].'</label></span>';
-
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" id="percent_'.$this->table_id.'" name="percent" '.($this->table_settings[$this->table_id]['percent'] == 1 ? ' checked="checked"':'').' value="1" /><label for="percent_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_percent'].'</label>';
+ echo '</div>';
// Prikaz vsot
- echo '<span class="clr"><input type="checkbox" id="sums_'.$this->table_id.'" name="sums" '.($this->table_settings[$this->table_id]['sums'] == 1 ? ' checked="checked"':'').' value="1" /><label for="sums_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_sum'].'</label></span>';
-
- // Navedbe / enote
- /*if($this->isCheckbox){
- echo '<span class="clr" style="line-height: 20px;">';
- echo '<label for="navVsEno0_'.$this->table_id.'"><input type="radio" id="navVsEno0_'.$this->table_id.'" name="navVsEno" '.($this->table_settings[$this->table_id]['navVsEno'] == 0 ? ' checked="checked"':'').' value="0" />'.$lang['srv_analiza_crosstab_navedbe'].'</label>';
- echo ' <label for="navVsEno1_'.$this->table_id.'"><input type="radio" id="navVsEno1_'.$this->table_id.'" name="navVsEno" '.($this->table_settings[$this->table_id]['navVsEno'] == 1 ? ' checked="checked"':'').' value="1" />'.$lang['srv_analiza_crosstab_enote'].'</label>';
- echo '</span>';
- }*/
-
- echo '</fieldset>';
-
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" id="sums_'.$this->table_id.'" name="sums" '.($this->table_settings[$this->table_id]['sums'] == 1 ? ' checked="checked"':'').' value="1" /><label for="sums_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_sum'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
- echo '<fieldset>';
- echo '<legend>'.$lang['srv_multicrosstabs_settings_avg'].'</legend>';
+ echo '<h3>'.$lang['srv_multicrosstabs_settings_avg'].'</h3>';
// Variabla za racunanje povprecja - numeric in ordinal (radio, dropdown, mg)
$checked = $this->table_settings[$this->table_id]['avgVar'] == '' ? false : true;
- echo '<span class="clr"><input type="checkbox" id="avgSetting_'.$this->table_id.'" name="avgSetting" '.($checked ? ' checked="checked"':'').' onClick="toggleMCSetting(\'avgVar\');" /><label for="avgSetting_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_avg'].'</label>';
- echo '<span id="avgVar" class="spaceLeft" '.($checked ? '' : ' style="display: none;"').'><select id="avgVar_'.$this->table_id.'" name="avgVar">';
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" id="avgSetting_'.$this->table_id.'" name="avgSetting" '.($checked ? ' checked="checked"':'').' onClick="toggleMCSetting(\'avgVar\');" /><label for="avgSetting_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_avg'].'</label>';
+ echo '</div>';
+ echo '<div id="avgVar" class="setting_item" '.($checked ? '' : ' style="display: none;"').'>';
+ echo '<select class="dropdown medium" id="avgVar_'.$this->table_id.'" name="avgVar">';
echo '<option value="">'.$lang['srv_select_spr'].'...</option>';
foreach($this->variablesList AS $spr){
- if( $spr['canChoose'] && ($spr['tip'] == 7 || (in_array($spr['tip'], array(1,3,6)) && $spr['skala'] == 0)) ){
+ if( $spr['canChoose'] && ($spr['tip'] == 7 || (in_array($spr['tip'], array(1,3,6)) && (!isset($spr['skala'])||$spr['skala'] == 0))) ){
echo '<option value="'.$spr['spr_id'].'-'.$spr['sequence'].'" '.($this->table_settings[$this->table_id]['avgVar'] == $spr['spr_id'].'-'.$spr['sequence'] ? ' selected="selected"' : '').'>('.$spr['variable'].') '.$this->snippet($spr['naslov'], 25).'</option>';
}
}
- echo '</select></span>';
- echo '</span>';
-
- echo '</fieldset>';
+ echo '</select>';
+ echo '</div>';
+
+ echo '</div>';
- echo '<fieldset>';
- echo '<legend>'.$lang['srv_multicrosstabs_settings_del'].'</legend>';
+ echo '<h3>'.$lang['srv_multicrosstabs_settings_del'].'</h3>';
// Variabla za racunanje deleza - ordinal in nominal (radio, dropdown, mg, po novem tudi checkbox, multicheckbox)
$checked = $this->table_settings[$this->table_id]['delezVar'] == '' ? false : true;
- echo '<span class="clr"><input type="checkbox" id="delezSetting_'.$this->table_id.'" name="delezSetting" '.($checked ? ' checked="checked"':'').' onClick="toggleMCSetting(\'delezVar\');" /><label for="delezSetting_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_delez'].'</label>';
-
- echo '<span id="delezVar" class="spaceLeft" '.($checked ? '' : ' style="display: none;"').'><select id="delezVar_'.$this->table_id.'" name="delezVar" onChange="setDelez(this.value);">';
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" id="delezSetting_'.$this->table_id.'" name="delezSetting" '.($checked ? ' checked="checked"':'').' onClick="toggleMCSetting(\'delezVar\');" /><label for="delezSetting_'.$this->table_id.'"> '.$lang['srv_multicrosstabs_delez'].'</label>';
+ echo '</div>';
+ echo '<div id="delezVar" class="setting_item" '.($checked ? '' : ' style="display: none;"').'>';
+ echo '<select class="dropdown medium" id="delezVar_'.$this->table_id.'" name="delezVar" onChange="setDelez(this.value);">';
echo '<option value="">'.$lang['srv_select_spr'].'...</option>';
foreach($this->variablesList AS $spr){
if($spr['canChoose'] && in_array($spr['tip'], array(1,3,6,2,16))){
echo '<option value="'.$spr['spr_id'].'-'.$spr['sequence'].'" '.($this->table_settings[$this->table_id]['delezVar'] == $spr['spr_id'].'-'.$spr['sequence'] ? ' selected="selected"' : '').'>('.$spr['variable'].') '.$this->snippet($spr['naslov'], 25).'</option>';
}
}
- echo '</select></span>';
- echo '</span>';
+ echo '</select>';
+ echo '</div>';
+
+ echo '</div>';
echo '<div id="delez" '.($checked ? '' : ' style="display: none;"').'>';
$this->displayDelez($this->table_settings[$this->table_id]['delezVar']);
echo '</div>';
- echo '</fieldset>';
-
echo '</form>';
-
// Gumbi na dnu
- echo '<div id="mcSettingsButtons">';
-
- echo '<span class="buttonwrapper spaceRight floatLeft">';
- echo '<a class="ovalbutton ovalbutton_gray" onclick="closeMCSettings(\''.$this->table_id.'\');">';
- echo '<span>'.$lang['srv_zapri'].'</span>';
- echo '</a>';
- echo '</span>';
-
- echo '<span class="buttonwrapper spaceRight spaceLeft floatLeft">';
- echo '<a class="ovalbutton ovalbutton_orange" onclick="saveMCSettings(\''.$this->table_id.'\');">';
- echo '<span>'.$lang['srv_potrdi'].'</span>';
- echo '</a>';
- echo '</span>';
-
- echo '</div>';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="closeMCSettings(\''.$this->table_id.'\');">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium blue" onclick="saveMCSettings(\''.$this->table_id.'\');">'.$lang['srv_potrdi'].'</button>';
+ echo '</div>';
}
// Prikazemo opcije variable (checkboxe) za delez
@@ -1492,9 +1508,13 @@ class SurveyMultiCrosstabs {
else
$val = 0;
- echo '<span class="clr">';
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
echo '<input type="checkbox" id="delez_'.$cnt.'" name="delez_'.$cnt.'" value="1" '.($val == 1 ? ' checked="checked"' : '').' /><label for="delez_'.$cnt.'"> '.$option.'</label>';
- echo '</span>';
+ echo '</div>';
+
+ echo '</div>';
$cnt++;
}
@@ -1530,10 +1550,12 @@ class SurveyMultiCrosstabs {
$href_xls = makeEncodedIzvozUrlString('izvoz.php?b=export&m=multicrosstabs_izpis_xls&anketa='.$this->ank_id);
echo '<script>';
+
# nastavimopravilne linke
echo '$("#secondNavigation_links a#multicrosstabDoPdf").attr("href", "'.$href_pdf.'");';
echo '$("#secondNavigation_links a#multicrosstabDoRtf").attr("href", "'.$href_rtf.'");';
echo '$("#secondNavigation_links a#multicrosstabDoXls").attr("href", "'.$href_xls.'");';
+
# prikažemo linke
echo '$("#hover_export_icon a").removeClass("hidden");';
echo '$("#secondNavigation_links a").removeClass("hidden");';
@@ -1583,11 +1605,11 @@ class SurveyMultiCrosstabs {
$this->variablesList = array();
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($this->_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'))) {
continue;
}
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip'])?$spremenljivka['tip']:null;
if (is_numeric($tip)
# tekstovnih tipov ne dodajamo
@@ -1731,7 +1753,7 @@ class SurveyMultiCrosstabs {
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable'])&&$grid['variable'] != '') {
$sub++;
$this->variablesList[$skey] = array(
'tip'=>$tip,
@@ -1830,7 +1852,7 @@ class SurveyMultiCrosstabs {
else{
$this->selectedVars['ver'][$row['vrstni_red']] = $row;
-
+ $fullColSpan = 0;
$sql2 = sisplet_query("SELECT * FROM srv_mc_element WHERE table_id='$this->table_id' AND parent='$row[vrstni_red]' AND position='1'");
// Ce ni 2.nivoja
if(mysqli_num_rows($sql2) == 0){
@@ -1889,7 +1911,7 @@ class SurveyMultiCrosstabs {
foreach($variables as $key => $variable){
$spr[$key] = $this->_HEADERS[$variables[$key]['spr']];
- $grid[$key] = $spr[$key]['grids'][$variables[$key]['grd']];
+ $grid[$key] = isset($spr[$key]['grids'][$variables[$key]['grd']])?$spr[$key]['grids'][$variables[$key]['grd']]:null;
$sekvenca = $variables[$key]['seq'];
$spr_checkbox = false;
@@ -1910,7 +1932,7 @@ class SurveyMultiCrosstabs {
$sekvence[$key] = explode('_',$spr[$key]['sequences']);
}
}
- if ($spr1['tip'] == 16) {
+ if ($spr[$key]['tip'] == 16) {
foreach ($grid[$key]['variables'] AS $_variables) {
@@ -1946,7 +1968,7 @@ class SurveyMultiCrosstabs {
}
}
-
+ $crosstabVars = '';
// Nastavimo string s katerim filtriramo datoteko za prave stolpce
foreach($sekvence as $sekvenca){
if(count($sekvenca) > 1){
@@ -1968,6 +1990,7 @@ class SurveyMultiCrosstabs {
$avgVar = 1;
}
+ $delez=array();
// Ce imamo racunanje deleza
if($this->table_settings[$this->table_id]['delezVar'] != ''){
@@ -2046,9 +2069,9 @@ class SurveyMultiCrosstabs {
$status_filter = $this->_CURRENT_STATUS_FILTER;
# dodamo status filter za vse sekvence checkbox-a da so == 1
- if ($additional_status_filter != null) {
+ /* if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
- }
+ } */
# odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
@@ -2144,7 +2167,8 @@ class SurveyMultiCrosstabs {
$sql = sisplet_query("SELECT * FROM srv_mc_table WHERE id='$this->table_id' AND ank_id='$this->ank_id' AND usr_id='$global_user_id'");
$current_table = mysqli_fetch_array($sql);
- echo '<h2>'.$lang['srv_multicrosstabs_tables'].'</h2>';
+ echo '<h2>'.$lang['srv_multicrosstabs_tables'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onclick="close_mc_tables(); return false;">✕</a></div>';
echo '<div id="mc_tables_left">';
@@ -2158,68 +2182,85 @@ class SurveyMultiCrosstabs {
}
echo '</span>';
+
+ /*/ Cas kreiranja tabele
+ echo '<div id="table_create_time">';
+ $time_created = strtotime($current_table['time_created']);
+ echo $lang['srv_multicrosstabs_tables_time'].': <span class="bold">'.date("d.m.Y H:i", $time_created).'</span>';
+ echo '</div>';*/
- // Na dnu imamo gumba brisi in preimenuj
- echo '<div style="float:left;">';
- echo '<a href="#" onclick="mc_table_action(\'show_rename\'); return false;">'.$lang['srv_multicrosstabs_tables_rename'].'</a><br/>'."\n";
- echo '<a href="#" onclick="mc_table_action(\'show_delete\'); return false;">'.$lang['srv_multicrosstabs_tables_delete'].'</a>'."\n";
- echo '</div>';
+ // Na dnu imamo linka brisi in preimenuj
+ echo '<p class="blue pointer bottom8 top16" onClick="mc_table_action(\'show_rename\'); return false;">'.$lang['srv_multicrosstabs_tables_rename'].'</p>';
+ echo '<p class="blue pointer" onclick="mc_table_action(\'show_delete\'); return false;">'.$lang['srv_multicrosstabs_tables_delete'].'</p>';
- // Cas kreirranja tabele
- echo '<div style="float:right; text-align:right;">';
- $time_created = strtotime($current_table['time_created']);
- echo $lang['srv_multicrosstabs_tables_time'].': <span class="bold">'.date("d.m.Y H:i", $time_created).'</span><br />';
- echo '</div>';
-
echo '</div>';
// cover Div
- echo '<div id="dsp_cover_div"></div>'."\n";
+ echo '<div id="dsp_cover_div"></div>';
- echo '<span class="clr"></span>';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-black" onclick="close_mc_tables(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium white-blue" onClick="mc_table_action(\'show_new\'); return false;">'.$lang['srv_multicrosstabs_tables_add'].'</button>';
+ echo '<button class="medium blue" onClick="use_mc_table(); return false;">'.$lang['srv_multicrosstabs_tables_use'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
- echo '<div style="position:absolute; bottom:15px; right:15px;">';
-
- //echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="save_creport_profile(); return false;"><span>'.$lang['save'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="use_mc_table(); return false;"><span>'.$lang['srv_multicrosstabs_tables_use'].'</span></a></div></span>';
- echo '<span class="floatRight spaceRight" title="'.$lang['srv_multicrosstabs_tables_add'].'"><div class="buttonwrapper"><a class="ovalbutton" href="#" onclick="mc_table_action(\'show_new\'); return false;"><span>'.$lang['srv_multicrosstabs_tables_add'] . '</span></a></div></span>';
- echo '<span class="floatRight spaceRight"><div class="buttonwrapper"><a class="ovalbutton" href="#" onclick="close_mc_tables(); return false;"><span>'.$lang['srv_zapri'].'</span></a></div></span>';
-
- echo '</div>';
}
function displayMCTablesPopups(){
global $lang;
// div za kreacijo novega
- echo '<div id="newMCTable">';
+ echo '<div id="newMCTable" class="divPopUp PopUpNarrow">';
echo '<h2>'.$lang['srv_new_table'].'</h2>';
-
- echo '<div style="float:left; width:400px; text-align:right;">'.$lang['srv_multicrosstabs_tables_name'].': '."\n";
- echo '<input id="newMCTableName" name="newMCTableName" type="text" value="" size="50" /></div>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="mc_table_action(\'new\'); return false;"><span>'.$lang['save'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="mc_table_action(\'cancel_new\'); return false;"><span>'.$lang['srv_zapri'].'</span></a></span></span>'."\n";
- echo '<div class="floatRight clr" style="padding: 15px 5px 15px 0;"><a href="#" onClick="mc_table_action(\'goto_archive\');">'.$lang['srv_analiza_arhiv'].'</a></div>';
- echo '</div>'."\n";
+
+ echo '<div class="setting_holder">';
+ echo '<label>'.$lang['srv_multicrosstabs_tables_name'].':</label>';
+ echo '<input id="newMCTableName" class="text large" name="newMCTableName" type="text" value="" />';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-black" onclick="mc_table_action(\'goto_archive\');">'.$lang['srv_analiza_arhiv'].'</button>';
+ echo '<button class="medium white-blue" onClick="mc_table_action(\'cancel_new\'); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium blue" onClick="mc_table_action(\'new\'); return false;">'.$lang['save'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
// div za preimenovanje
- echo '<div id="renameMCTable">'.$lang['srv_multicrosstabs_tables_name'].': '."\n";
- echo '<input id="renameMCTableName" name="renameMCTableName" type="text" size="45" />'."\n";
- echo '<input id="renameMCTableId" type="hidden" value="' . $this->table_id . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="mc_table_action(\'rename\'); return false;"><span>'.$lang['srv_multicrosstabs_tables_rename_short'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="mc_table_action(\'cancel_rename\'); return false;"><span>'.$lang['srv_zapri'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="renameMCTable" class="divPopUp PopUpNarrow">';
+
+ echo '<div class="setting_holder">';
+ echo '<div class="setting_item">';
+ echo '<label>'.$lang['srv_multicrosstabs_tables_name'].':</label>';
+ echo '<input id="renameMCTableName" name="renameMCTableName" class="text large" type="text" value="' . $this->table_id . '" />';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="mc_table_action(\'cancel_rename\'); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium blue" onclick="mc_table_action(\'rename\');">'.$lang['srv_multicrosstabs_tables_rename_short'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
// div za brisanje
- echo '<div id="deleteMCTable">'.$lang['srv_multicrosstabs_tables_delete_confirm'].': <span id="deleteMCTableName" style="font-weight:bold;"></span>?'."\n";
- echo '<input id="deleteMCTableId" type="hidden" value="' . $this->table_id . '" />'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="mc_table_action(\'delete\'); return false;"><span>'.$lang['srv_multicrosstabs_tables_delete_short'].'</span></a></span></span>'."\n";
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="mc_table_action(\'cancel_delete\'); return false;"><span>'.$lang['srv_zapri'].'</span></a></span></span>'."\n";
- echo '</div>'."\n";
+ echo '<div id="deleteMCTable" class="divPopUp PopUpNarrow">';
+
+ echo $lang['srv_multicrosstabs_tables_delete_confirm'].': <span id="deleteMCTableName" class="semi-bold"></span>?';
+ echo '<input id="deleteMCTableId" type="hidden" value="' . $this->table_id . '" />';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="mc_table_action(\'cancel_delete\'); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '<button class="medium blue" onclick="mc_table_action(\'delete\');">'.$lang['srv_multicrosstabs_tables_delete_short'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
}
// Vrnemo vse tabele uporabnika
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyTTest.php b/admin/survey/classes/surveyAnalysis/class.SurveyTTest.php
index 34819a1..de3a5c2 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyTTest.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyTTest.php
@@ -8,9 +8,9 @@
*
*/
-define("EXPORT_FOLDER", "admin/survey/SurveyData");
-define("BC_PRECISION", 20);
-define("R_FOLDER", "admin/survey/R");
+if(!defined("EXPORT_FOLDER"))define("EXPORT_FOLDER", "admin/survey/SurveyData");
+if(!defined("BC_PRECISION"))define("BC_PRECISION", 20);
+if(!defined("R_FOLDER"))define("R_FOLDER", "admin/survey/R");
class SurveyTTest
{
@@ -28,19 +28,28 @@ class SurveyTTest
public $showChart = false; # ali prikazujemo graf pod tabelo
private $sessionData; # podatki ki so bili prej v sessionu - za nastavitve, ki se prenasajo v izvoze...
-
+
+ protected $currentMissingProfile = null;
+ protected $_HAS_TEST_DATA = null;
+ protected $_CURRENT_STATUS_FILTER = null;
+ protected $_CURRENT_LOOP = null;
+ protected $isArchive = null;
function __construct($sid) {
+ global $global_user_id;
if ((int)$sid > 0) {
+
$this->sid = $sid;
# polovimo vrsto tabel (aktivne / neaktivne)
SurveyInfo :: getInstance()->SurveyInit($this->sid);
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) {
- $this->db_table = '_active';
- }
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
+ // Pri glasovanju tega ne pustimo
+ if(SurveyInfo::getInstance()->getSurveyColumn("survey_type") == 0){
+ die();
+ }
# Inicializiramo in polovimo nastavitve missing profila
SurveyStatusProfiles::Init($this->sid);
@@ -142,16 +151,18 @@ class SurveyTTest
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
+ if(isset($_GET['a'])){
# izvedemo akcijo
switch ($_GET['a']) {
- case 'spremenljivkaChange':
- $this->spremenljivkaChange();
- break;
- case 'variableChange':
- $this->variableChange();
- break;
- default:
- break;
+ case 'spremenljivkaChange':
+ $this->spremenljivkaChange();
+ break;
+ case 'variableChange':
+ $this->variableChange();
+ break;
+ default:
+ break;
+ }
}
// Shranimo spremenjene nastavitve v bazo
SurveyUserSession::saveData($this->sessionData);
@@ -162,20 +173,14 @@ class SurveyTTest
# ali imamo testne podatke
if ($this->_HAS_TEST_DATA) {
# izrišemo bar za testne podatke
- $SSH -> displayTestDataBar(true);
$SSH = new SurveyStaticHtml($this->sid);
+ $SSH -> displayTestDataBar(true);
}
-
- /*echo '<div id="dataOnlyValid">';
- SurveyStatusProfiles::displayOnlyValidCheckbox();
- echo '</div>';*/
-
- //$this->DisplayLinks();
-
+
echo '<div id="ttest_variables">';
$this->DisplayVariables();
echo '</div>'; # id="ttest_variables"
- echo '<br class="clr">';
+
echo '<div id="ttestResults">';
$this->variableChange();
echo '</div>'; # id="ttestResults"
@@ -270,44 +275,48 @@ class SurveyTTest
$variables = $this->getVariableList(2);
- echo '<span id="ttestSpremenljivkaSpan" class="floatLeft">';
- echo $lang['srv_ttest_label1'];
- echo '<br />';
- echo '<select id="ttestSpremenljivka" name="ttestSpremenljivka" onchange="ttestSpremenljivkaChange();" autocomplete="off">';
+ echo '<div id="ttestSpremenljivkaSpan" class="ttestLeftHolder">';
+
+ echo '<span class="title">'.$lang['srv_ttest_label1'].':</span>';
+
+ echo '<select id="ttestSpremenljivka" name="ttestSpremenljivka" class="dropdown large" onchange="ttestSpremenljivkaChange();" autocomplete="off">';
echo '<option value="0" selected="selected" >'. $lang['srv_ttest_select1_option'] . '</option>';
if (count($variables)) {
foreach ($variables as $variable) {
- echo '<option value="'.$variable['spr_id'].'"'
+ echo '<option value="'.(isset($variable['spr_id'])?$variable['spr_id']:'').'"'
. ( isset($variable['grd_id']) ? ' grid="'.$variable['grd_id'].'" ' : '')
. ( isset($variable['vr_id']) ? ' vred="'.$variable['vr_id'].'" ' : '')
. ( isset($variable['sequence']) ? ' seq2="'.$variable['sequence'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- . ( $variable['spr_id'] != '' && $variable['spr_id'] == $this->sessionData['ttest']['spr2'] && $variable['sequence'] == $this->sessionData['ttest']['seq2'] ? ' selected="selected"':'')
+ . ( isset($variable['spr_id'])&&$variable['spr_id'] != '' && isset($this->sessionData['ttest']['spr2'] )&& $variable['spr_id'] == $this->sessionData['ttest']['spr2'] && $variable['sequence'] == $this->sessionData['ttest']['seq2'] ? ' selected="selected"':'')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
.$variable['variableNaslov'] . '</option>';
}
}
- echo '</select>'; # name="ttestSpremenljivka"
- echo '<br class="clr"/><br/>';
+ echo '</select>';
+
#.(count($this->sessionData['ttest']['sub_conditions']) == 2?'':'class="active"').
$_active = $this->checkSubConditionsActive();
- if ($this->sessionData['ttest']['spr2'] > 0) {
+ if (isset($this->sessionData['ttest']['spr2'])&&$this->sessionData['ttest']['spr2'] > 0) {
echo '<div id="ttestVariablesSpan"'.($_active < 2 ? ' class="active"' : '').'>';
$this->spremenljivkaChange();
echo '</div>';
} else {
echo '<div id="ttestVariablesSpan" style="display:none" '.($_active < 2 ? ' class="active"' : '').'></div>';
}
- echo '</span>';
+
+ echo '</div>';
+
$cntSubConditionsActive = $this->checkSubConditionsActive();
- echo '<span class="floatLeft spaceRight">&nbsp;</span>';
- echo '<span id="ttestNumerusSpan" class="floatLeft'.($cntSubConditionsActive == 2 ? '' : ' gray').'">'; #gray
- echo $lang['srv_ttest_label2'];
- echo '<br />';
- echo '<select id="ttestNumerus" name="ttestNumerus" onchange="ttestVariableChange();" autocomplete="off" '.($cntSubConditionsActive == 2 ? '' : ' disabled="disabled"').'>'; #
+
+ echo '<div id="ttestNumerusSpan" class="ttestRightHolder '.($cntSubConditionsActive == 2 ? '' : ' gray').'">';
+
+ echo '<span class="title">'.$lang['srv_ttest_label2'].':</span>';
+
+ echo '<select id="ttestNumerus" name="ttestNumerus" class="dropdown large" onchange="ttestVariableChange();" autocomplete="off" '.($cntSubConditionsActive == 2 ? '' : ' disabled="disabled"').'>'; #
echo '<option value="0" selected="selected" >'. $lang['srv_ttest_select2_option'] . '</option>';
if (count($numerus)) {
foreach ($numerus as $variable) {
@@ -316,22 +325,33 @@ class SurveyTTest
. ( isset($variable['vr_id']) ? ' vrd="'.$variable['vr_id'].'" ' : '')
. ( isset($variable['sequence']) ? ' seq="'.$variable['sequence'].'" ' : '')
. (( (int)$variable['canChoose'] == 1) ? '' : ' disabled="disabled" ')
- . ( $variable['spr_id'] != '' && $variable['spr_id'] == $selectedVar[0]['spr'] && $variable['sequence'] == $selectedVar[0]['seq']?' selected="selected"':'')
+ . ( isset($selectedVar[0]['spr'])&&$variable['spr_id'] != '' && $variable['spr_id'] == $selectedVar[0]['spr'] && $variable['sequence'] == $selectedVar[0]['seq']?' selected="selected"':'')
. '> '
. ( (int)$variable['sub'] == 0 ? '' : ( (int)$variable['sub'] == 1 ? '&nbsp;&nbsp;' : '&nbsp;&nbsp;&nbsp;&nbsp;' ))
. $variable['variableNaslov'] . '</option>';
}
}
- echo '</select>'; # name="ttestSpremenljivka"
- echo '</span>';
+ echo '</select>';
+
+ echo '</div>';
+
- echo '<br /><span style="margin-left: 30px;">';
- echo '<label><input id="showChart" type="checkbox" onchange="showTableChart(\'ttest\');" '.($this->sessionData['ttest_charts']['showChart']==true?' checked="checked"':'' ).'>'.$lang['srv_show_chart'].'</label>';
+ echo '<div class="ttestSubSetting">';
+
+ echo '<span class="title">'.$lang['settings'].':</span>';
+
+ echo '<span class="setting_line">';
+ echo ' <input id="showChart" type="checkbox" onchange="showTableChart(\'ttest\');" '.(isset($this->sessionData['ttest_charts']['showChart'])&&$this->sessionData['ttest_charts']['showChart']==true?' checked="checked"':'' ).'><label for="showChart">'.$lang['srv_show_chart'].'</label>';
echo '</span>';
- echo '<span style="margin-left: 30px;"><a href="https://www.1ka.si/d/sl/pomoc/prirocniki/ttest?from1ka=1" target="_blank">';
- echo $lang['srv_ttest_interpretacija_note'];
- echo '</a></span>';
+
+ /*echo '<span class="setting_line">';
+ echo ' <a href="https://www.1ka.si/d/sl/pomoc/prirocniki/ttest?from1ka=1" target="_blank">';
+ echo $lang['srv_ttest_interpretacija_note'];
+ echo ' </a>';
echo Help::display('srv_ttest_interpretation');
+ echo '</span>';*/
+
+ echo '</div>';
// Shranimo spremenjene nastavitve v bazo
@@ -346,7 +366,7 @@ class SurveyTTest
$this->variablesList = array();
# zloopamo skozi header in dodamo variable (potrebujemo posamezne sekvence)
foreach ($this->_HEADERS AS $skey => $spremenljivka) {
- $tip = $spremenljivka['tip'];
+ $tip = isset($spremenljivka['tip'])?$spremenljivka['tip']:null;
if ($witch == 1) {
# prvi drop down, morajo biti numerične ali ordinalne
# skala - 0 Ordinalna
@@ -497,7 +517,7 @@ class SurveyTTest
# imamo več gridov - tabele
foreach($spremenljivka['grids'] AS $gid => $grid) {
$sub = 0;
- if ($grid['variable'] != '') {
+ if (isset($grid['variable'])&&$grid['variable'] != '') {
$sub++;
$this->variablesList[] = array(
'tip'=>$tip,
@@ -536,16 +556,17 @@ class SurveyTTest
if (isset($this->sessionData['ttest']['spr2']) && $this->sessionData['ttest']['spr2'] != 0){
$_spr = explode('_',$this->sessionData['ttest']['spr2']);
- #$spr = $_spr[0];
$spr = $this->sessionData['ttest']['spr2'];
if (isset($this->sessionData['ttest']['grid2'])){
$grid = $this->sessionData['ttest']['grid2'];
}
+
# poiščemo pripadajoče variable
$_spr_data = $this->_HEADERS[$this->sessionData['ttest']['spr2']];
- echo $lang['srv_ttest_kategories_note'].' ('.$_spr_data['variable'].') '.$_spr_data['naslov'];
- echo '<br/>';
+
+ echo '<span class="title">'.$lang['srv_ttest_kategories_note'].' ('.$_spr_data['variable'].') '.$_spr_data['naslov'].'</span>';
+
switch ($_spr_data['tip']) {
case 1: #radio
case 3: #dropdown
@@ -553,31 +574,42 @@ class SurveyTTest
#nardimo inpute za vse opcije
$sekvenca = $_spr_data['sequences'];
foreach ($_spr_data['options'] as $value => $option) {
- echo '<label '.($this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value) == ' disabled="disabled"' ? 'class="gray"' : '').'><input name="subTtest" type="checkbox" value="'.$spr.'_'.$sekvenca.'_'.$value.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value).'/>('.$value.') - '.$option.'</label><br/>';
+ echo '<span class="setting_line '.($this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value) == ' disabled="disabled"' ? 'gray' : '').'">';
+ echo ' <input name="subTtest" id="subTtest_'.$spr.'_'.$sekvenca.'_'.$value.'" type="checkbox" value="'.$spr.'_'.$sekvenca.'_'.$value.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value).'/>';
+ echo ' <label for="subTtest_'.$spr.'_'.$sekvenca.'_'.$value.'">('.$value.') - '.$option.'</label>';
+ echo '</span>';
}
break;
- case 2: #checkbox
+ case 2: #checkbox
#nardimo inpute za vse opcije
$option = '1';
foreach ($_spr_data['grids'][0]['variables'] as $vid => $variable) {
- echo '<label '.($this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option) == ' disabled="disabled"' ? 'class="gray"' : '').'><input name="subTtest" type="checkbox" value="'.$spr.'_'.$variable['sequence'].'_'.$option. '" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option).'/>('.$variable['variable'].') - '.$variable['naslov'].'</label><br/>';
+ echo '<span class="setting_line '.($this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option) == ' disabled="disabled"' ? 'gray' : '').'">';
+ echo ' <input name="subTtest" id="subTtest_'.$spr.'_'.$variable['sequence'].'_'.$option.'" type="checkbox" value="'.$spr.'_'.$variable['sequence'].'_'.$option.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option).'/>';
+ echo ' <label for="subTtest_'.$spr.'_'.$variable['sequence'].'_'.$option.'">('.$variable['variable'].') - '.$variable['naslov'].'</label>';
+ echo '</span>';
}
break;
- case 6: #mgrid
+ case 6: #mgrid
#nardimo inpute za vse opcije
$sekvenca = $this->sessionData['ttest']['seq2'];
foreach ($_spr_data['options'] as $value => $option) {
- //$sekvenca = $_spr_data['grids'][$value]['variables'][0]['sequence'];
- echo '<label '.($this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value) == ' disabled="disabled"' ? 'class="gray"' : '').'><input name="subTtest" type="checkbox" value="'.$spr.'_'.$sekvenca.'_'.$value.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value).'/>('.$value.') - '.$option.'</label><br/>';
+ echo '<span class="setting_line '.($this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value) == ' disabled="disabled"' ? 'gray' : '').'">';
+ echo ' <input name="subTtest" id="subTtest_'.$spr.'_'.$sekvenca.'_'.$value.'" type="checkbox" value="'.$spr.'_'.$sekvenca.'_'.$value.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$sekvenca.'_'.$value).'/>';
+ echo ' <label for="subTtest_'.$spr.'_'.$sekvenca.'_'.$value.'">('.$value.') - '.$option.'</label>';
+ echo '</span>';
}
break;
- case 16: #mcheck
+ case 16: #mcheck
#nardimo inpute za vse opcije
# poiščemo pripadajočo sekvenco
#nardimo inpute za vse opcije
$option = '1';
foreach ($_spr_data['grids'][$grid]['variables'] as $vid => $variable) {
- echo '<label '.($this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option) == ' disabled="disabled"' ? 'class="gray"' : '').'><input name="subTtest" type="checkbox" value="'.$spr.'_'.$variable['sequence'].'_'.$option.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option).'/>('.$variable['variable'].') - '.$variable['naslov'].'</label><br/>';
+ echo '<span class="setting_line '.($this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option) == ' disabled="disabled"' ? 'gray' : '').'">';
+ echo ' <input name="subTtest" id="subTtest_'.$spr.'_'.$variable['sequence'].'_'.$option.'" type="checkbox" value="'.$spr.'_'.$variable['sequence'].'_'.$option.'" onchange="ttestVariableChange();"'.$this->checkboxSubCondition($spr.'_'.$variable['sequence'].'_'.$option).'/>';
+ echo ' <label for="subTtest_'.$spr.'_'.$variable['sequence'].'_'.$option.'">('.$variable['variable'].') - '.$variable['naslov'].'</label>';
+ echo '</span>';
}
break;
@@ -602,20 +634,16 @@ class SurveyTTest
function variableChange() {
global $admin_type;
- if (count($this->sessionData['ttest']['sub_conditions']) > 1 ) {
+ if (isset($this->sessionData['ttest']['sub_conditions'])&&count($this->sessionData['ttest']['sub_conditions']) > 1 ) {
$variables1 = $this->getSelectedVariables();
- if (count($variables1) > 0) {
+ if (isset($variables1)&&count($variables1) > 0) {
+
// ikone za izvoz
$this->displayExport();
+
foreach ($variables1 AS $v_first) {
- $ttest = null;
- /*$ttest = $this->createTTestOld($v_first, $this->sessionData['ttest']['sub_conditions']);
- $this->displayTtestTable($ttest);*/
- $ttest = $this->createTTest($v_first, $this->sessionData['ttest']['sub_conditions']);
- $this->displayTtestTable($ttest);
-
- // Zvezdica za vkljucitev v porocilo
+ // Zvezdica za vkljucitev v porocilo
$spid1 = $this->sessionData['ttest']['variabla'][0]['spr'];
$seq1 = $this->sessionData['ttest']['variabla'][0]['seq'];
$grid1 = $this->sessionData['ttest']['variabla'][0]['grd'];
@@ -629,6 +657,11 @@ class SurveyTTest
$spr1 = $seq2.'-'.$spid2.'-'.$grid2.'-'.$sub1.'-'.$sub2;
$spr2 = $seq1.'-'.$spid1.'-'.$grid1;
SurveyAnalysis::addCustomReportElement($type=7, $sub_type=0, $spr1, $spr2);
+
+ // Tabela
+ $ttest = null;
+ $ttest = $this->createTTest($v_first, $this->sessionData['ttest']['sub_conditions']);
+ $this->displayTtestTable($ttest);
// Izrisemo graf za tabelo
if(isset($this->sessionData['ttest_charts']['showChart']) && $this->sessionData['ttest_charts']['showChart'] == true){
@@ -646,7 +679,7 @@ class SurveyTTest
function getSelectedVariables() {
$selected = array();
- if (count($this->sessionData['ttest']['variabla']) > 0 ) {
+ if (isset($this->sessionData['ttest']['variabla'])&&count($this->sessionData['ttest']['variabla']) > 0 ) {
foreach ($this->sessionData['ttest']['variabla'] AS $var1) {
if ((int)$var1['seq'] > 0) {
$selected[] = $var1;
@@ -760,7 +793,7 @@ class SurveyTTest
}
}
-
+ $additional_status_filter = null;
# dodamo status filter za vse sekvence checkbox-a da so == 1
if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
@@ -931,9 +964,9 @@ class SurveyTTest
}
# dodamo status filter za vse sekvence checkbox-a da so == 1
- if ($additional_status_filter != null) {
+ /* if ($additional_status_filter != null) {
$status_filter .= $additional_status_filter;
- }
+ } */
# odstranimo vse zapise, kjer katerakoli od variabel vsebuje missing
$_allMissing_answers = SurveyMissingValues::GetMissingValuesForSurvey(array(1,2,3));
@@ -992,22 +1025,28 @@ class SurveyTTest
$grid1 = $this->sessionData['ttest']['variabla'][0]['grd'];
if (is_array($ttest) && count($ttest) > 0 && (int)$seq1 > 0) {
+
if ($this->isArchive == false) {
+
echo '<div id="displayFilterNotes">';
+
# če ne uporabljamo privzetega časovnega profila izpišemo opozorilo
SurveyTimeProfiles :: printIsDefaultProfile();
- # če imamo filter ifov ga izpišemo
- SurveyConditionProfiles:: getConditionString($doNewLine );
- # če imamo filter spremenljivk ga izpišemo
- SurveyVariablesProfiles:: getProfileString($doNewLine, true);
- SurveyDataSettingProfiles :: getVariableTypeNote($doNewLine );
- # če rekodiranje
+
+ # če imamo filter ifov ga izpišemo
+ SurveyConditionProfiles:: getConditionString();
+
+ # če imamo filter spremenljivk ga izpišemo
+ SurveyVariablesProfiles:: getProfileString();
+ SurveyDataSettingProfiles :: getVariableTypeNote();
+
+ # če rekodiranje
$SR = new SurveyRecoding($this->sid);
$SR -> getProfileString();
+
echo '</div>';
-
- echo '<br class="clr" />';
}
+
$spr_data_1 = $this->_HEADERS[$spid1];
if ($grid1 == 'undefined') {
@@ -1022,7 +1061,8 @@ class SurveyTTest
}
}
}
- } else {
+ }
+ else {
# imamo subgrid
$sprLabel1 = '('.$spr_data_1['grids'][$grid1]['variable'].') '. $spr_data_1['grids'][$grid1]['naslov'];
}
@@ -1032,84 +1072,101 @@ class SurveyTTest
$sprLabel2 = trim($this->sessionData['ttest']['label2']);
$label1 = $this->getVariableLabels($this->sessionData['ttest']['sub_conditions'][0]);
$label2 = $this->getVariableLabels($this->sessionData['ttest']['sub_conditions'][1]);
- echo '<table border="0" class="ttestTable">';
- echo '<tr>';
+
+
+ echo '<table class="table_ttest">';
+
+
+ echo '<tr class="row1">';
+
#labele
- echo '<td class="lightGreen" rowspan="2" >';
- echo '<span class="anl_variabla">';
- echo '<a href="#" onclick="showspremenljivkaSingleVarPopup(\''.$spid2.'\'); return false;">';
- echo $sprLabel2.'</a>';
- echo '</span>';
+ echo '<td class="cell_question" rowspan="2" >';
+ echo ' <span class="anl_variabla">';
+ echo ' <a href="#" onclick="showspremenljivkaSingleVarPopup(\''.$spid2.'\'); return false;">';
+ echo $sprLabel2;
+ echo ' </a>';
+ echo ' </span>';
echo '</td>';
- echo '<td class="lightGreen" colspan="9">';
- echo '<span class="anl_variabla">';
- echo '<a href="#" onclick="showspremenljivkaSingleVarPopup(\''.$spid1.'\'); return false;">';
- echo $sprLabel1.'</a>';
- echo '</span>';
+ echo '<td class="cell_question" colspan="9">';
+ echo ' <span class="anl_variabla">';
+ echo ' <a href="#" onclick="showspremenljivkaSingleVarPopup(\''.$spid1.'\'); return false;">';
+ echo $sprLabel1;
+ echo ' </a>';
+ echo ' </span>';
echo '</td>';
+
echo '</tr>';
- echo '<tr>';
- #echo '<th colspan="2">&nbsp;</th>';
+
+
+ echo '<tr class="row2">';
+
#frekvenca
- echo '<th >n</th>';
+ echo '<td class="cell_value">n</td>';
#povprečje
- echo '<th><span class="avg">x</span></th>';
+ echo '<td class="cell_value"><span class="avg">x</span></td>';
#varianca
- echo '<th>s&#178;</th>';
+ echo '<td class="cell_value">s&#178;</td>';
#standardna napaka
- echo '<th>se(<span class="avg">x</span>)</th>';
+ echo '<td class="cell_value">se(<span class="avg">x</span>)</td>';
#margini
- echo '<th>&#177;1,96&#215;se(<span class="avg">x</span>)</th>';
+ echo '<td class="cell_value">&#177;1,96&#215;se(<span class="avg">x</span>)</td>';
#d
- echo '<th>d</th>';
+ echo '<td class="cell_value">d</td>';
#sed
- echo '<th>se(d)</th>';
+ echo '<td class="cell_value">se(d)</td>';
#signifikanca
- echo '<th>Sig.</th>';
+ echo '<td class="cell_value">Sig.</td>';
#ttest
- echo '<th>t</th>';
+ echo '<td class="cell_value">t</td>';
+
echo '</tr>';
+
echo '<tr>';
- #labele
-
- echo '<td class="lightGreen">'.$label1.'</td>';
+ #labele
+ echo '<td class="cell_question">'.$label1.'</td>';
#frekvenca
- echo '<td>'.$this->formatNumber($ttest[1]['n'],0).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[1]['n'],0).'</td>';
#povprečje
- echo '<td>'.$this->formatNumber($ttest[1]['x'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[1]['x'],3).'</td>';
#varianca
- echo '<td>'.$this->formatNumber($ttest[1]['s2'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[1]['s2'],3).'</td>';
#standardna napaka
- echo '<td>'.$this->formatNumber($ttest[1]['se'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[1]['se'],3).'</td>';
#margini
- echo '<td>'.$this->formatNumber($ttest[1]['margin'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[1]['margin'],3).'</td>';
#d
- echo '<td rowspan="2">'.$this->formatNumber($ttest['d'],3).'</td>';
+ echo '<td class="cell_value" rowspan="2">'.$this->formatNumber($ttest['d'],3).'</td>';
#sed
- echo '<td rowspan="2">'.$this->formatNumber($ttest['sed'],3).'</td>';
+ echo '<td class="cell_value" rowspan="2">'.$this->formatNumber($ttest['sed'],3).'</td>';
#sig
- echo '<td rowspan="2">'.$this->formatNumber($ttest['sig'],3).'</td>';
+ echo '<td class="cell_value" rowspan="2">'.$this->formatNumber($ttest['sig'],3).'</td>';
#ttest
- echo '<td rowspan="2">'.$this->formatNumber($ttest['t'],3).'</td>';
+ echo '<td class="cell_value" rowspan="2">'.$this->formatNumber($ttest['t'],3).'</td>';
+
echo '</tr>';
+
echo '<tr>';
+
#labele
- echo '<td class="lightGreen">'.$label2.'</td>';
+ echo '<td class="cell_question">'.$label2.'</td>';
#frekvenca
- echo '<td>'.$this->formatNumber($ttest[2]['n'],0).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[2]['n'],0).'</td>';
#povprečje
- echo '<td>'.$this->formatNumber($ttest[2]['x'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[2]['x'],3).'</td>';
#varianca
- echo '<td>'.$this->formatNumber($ttest[2]['s2'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[2]['s2'],3).'</td>';
#standardna napaka
- echo '<td>'.$this->formatNumber($ttest[2]['se'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[2]['se'],3).'</td>';
#margini
- echo '<td>'.$this->formatNumber($ttest[2]['margin'],3).'</td>';
+ echo '<td class="cell_value">'.$this->formatNumber($ttest[2]['margin'],3).'</td>';
+
echo '</tr>';
+
+
echo '</table>';
}
@@ -1171,7 +1228,7 @@ class SurveyTTest
function checkboxSubCondition($checkCondition) {
$cnt = $this->checkSubConditionsActive();
- $sub_Conditions = $this->sessionData['ttest']['sub_conditions'];
+ $sub_Conditions = isset($this->sessionData['ttest']['sub_conditions'])?$this->sessionData['ttest']['sub_conditions']:array();
if (is_array($sub_Conditions) && count($sub_Conditions) > 0) {
foreach ($sub_Conditions AS $sub_condition) {
if ($sub_condition == $checkCondition) {
@@ -1190,9 +1247,9 @@ class SurveyTTest
$cnt = 0;
- $needle = $this->sessionData['ttest']['spr2'];
+ $needle = isset($this->sessionData['ttest']['spr2'])?$this->sessionData['ttest']['spr2']:"";
$length = strlen($needle);
- $sub_Conditions = $this->sessionData['ttest']['sub_conditions'];
+ $sub_Conditions = isset($this->sessionData['ttest']['sub_conditions'])?$this->sessionData['ttest']['sub_conditions']:array();
if (is_array($sub_Conditions) && count($sub_Conditions) > 0) {
foreach ($sub_Conditions AS $haystack) {
$cnt += (int)(substr($haystack, 0, $length) === $needle);
diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php b/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
index 8b51105..70cb499 100644
--- a/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
+++ b/admin/survey/classes/surveyAnalysis/class.SurveyTableChart.php
@@ -4,7 +4,7 @@
* @date April 2012
*/
-define("SAA_FOLDER", "AnalysisArchive");
+if(!defined("SAA_FOLDER"))define("SAA_FOLDER", "AnalysisArchive");
class SurveyTableChart {
@@ -166,7 +166,7 @@ class SurveyTableChart {
}
}
}
- if (count($this->classInstance->variabla1) > 0 && $is_check == false ) { # če še ni bil checkbox
+ if (count($this->classInstance->variabla1) > 0) { # če še ni bil checkbox
foreach ($this->classInstance->variabla1 AS $key => $var) {
$spr_tip = $this->classInstance->_HEADERS[$var['spr']]['tip'];
if ( $spr_tip == 2 || $spr_tip == 16 ) {
@@ -321,10 +321,10 @@ class SurveyTableChart {
// Cache
$Cache = new pCache(dirname(__FILE__).'/../../pChart/Cache/');
- $ID = $this->generateChartId($chartID, $this->settings, $DataSet->GetNumerus());
+ $ID = $this->generateChartId($chartID, $this->settings, ($DataSet!==null?$DataSet->GetNumerus():0));
// Ce se nimamo zgeneriranega grafa
- if( !$Cache->isInCache($ID, $DataSet->GetData()) ){
+ if( !$Cache->isInCache($ID, ($DataSet!==null?$DataSet->GetData():array())) ){
switch($this->settings['type']){
@@ -335,11 +335,11 @@ class SurveyTableChart {
}
// Shranimo v cache
- $Cache->WriteToCache($ID,$DataSet->GetData(),$Test);
+ $Cache->WriteToCache($ID,($DataSet!==null?$DataSet->GetData():array()),$Test);
}
// dobimo ime slike c cache-u
- $imgName = $Cache->GetHash($ID,$DataSet->GetData());
+ $imgName = $Cache->GetHash($ID,($DataSet!==null?$DataSet->GetData():array()));
if ($this->isArchive == false) {
$imgPath = 'pChart/Cache/'.$imgName;
@@ -356,7 +356,7 @@ class SurveyTableChart {
echo '<div class="chart_title">';
$title = $lang['srv_chart_ttest_title'].':<br />';
$title .= '<table><tr>';
- $title .= '<td style="width:380px; text-align: right;">'.$this->crosstabVars[0] . '</td><td style="width:40px;"> / </td><td style="width:380px; text-align: left;">' . $this->crosstabVars[1].'</td>';
+ $title .= '<td style="width:380px; text-align: right;">'.(isset($this->crosstabVars[0])?$this->crosstabVars[0]:'') . '</td><td style="width:40px;"> / </td><td style="width:380px; text-align: left;">' . (isset($this->crosstabVars[1])?$this->crosstabVars[1]:'') .'</td>';
$title .= '</tr></table>';
echo $title;
echo '</div>';
@@ -408,6 +408,7 @@ class SurveyTableChart {
// Napolnimo podatke za graf
$DataSet = $this->getTTestDataSet($chartID, $this->settings);
+ $DataSet = $DataSet!==null?$DataSet:new pData();
// Cache
$Cache = new pCache(dirname(__FILE__).'/../../pChart/Cache/');
@@ -520,8 +521,8 @@ class SurveyTableChart {
global $site_path;
global $lang;
- $tip = $this->break_spremenljivka['tip'];
- $skala = $this->break_spremenljivka['skala'];
+ $tip = isset($this->break_spremenljivka['tip'])?$this->break_spremenljivka['tip']:null;
+ $skala = isset($this->break_spremenljivka['tip'])?$this->break_spremenljivka['skala']:null;
// Izrisemo poseben break graf (multigrid, multicheckbox, multitext, multinumber)
if( in_array($tip, array(7,17,18,20,)) || ($tip == 6 && $skala == 0) ){
@@ -694,8 +695,8 @@ class SurveyTableChart {
$spr1 = $this->classInstance->_HEADERS[$v_first['spr']];
$spr2 = $this->classInstance->_HEADERS[$v_second['spr']];
- $grid1 = $spr1['grids'][$v_first['grd']];
- $grid2 = $spr2['grids'][$v_second['grd']];
+ $grid1 = isset($spr1['grids'][$v_first['grd']])?$spr1['grids'][$v_first['grd']]:array();
+ $grid2 = isset($spr2['grids'][$v_second['grd']])?$spr2['grids'][$v_second['grd']]:array();
#število vratic in število kolon
$cols = count($crosstabs['options1']);
@@ -804,8 +805,9 @@ class SurveyTableChart {
foreach ($crosstabs['options1'] as $ckey1 => $crossVariabla1) {
$cnt++;
- $dataArray[$cnt][] = ((int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
- $dataPercentArray[$cnt][] = $this->classInstance->getCrossTabPercentage($crosstabs['sumaVrstica'][$ckey2], $crosstabs_value[$ckey1][$ckey2]);
+ $dataArray[$cnt][] = (isset($crosstabs_value[$ckey1][$ckey2])&&(int)$crosstabs_value[$ckey1][$ckey2] > 0) ? $crosstabs_value[$ckey1][$ckey2] : 0;
+ $dataPercentArray[$cnt][] = $this->classInstance->getCrossTabPercentage((isset($crosstabs['sumaVrstica'][$ckey2])?$crosstabs['sumaVrstica'][$ckey2]:0)
+ , (isset($crosstabs_value[$ckey1][$ckey2])?$crosstabs_value[$ckey1][$ckey2]:0));
/*
# celica z vebino
@@ -886,11 +888,11 @@ class SurveyTableChart {
global $lang;
$DataSet = null;
-
+ $ttest = null;
$variables1 = $this->classInstance->getSelectedVariables();
foreach ($variables1 AS $v_first) {
- if($this->counter == $counter){
+ if($this->counter == null){
$ttest = null;
$ttest = $this->classInstance->createTTest($v_first, $this->sessionData['ttest']['sub_conditions']);
@@ -966,6 +968,7 @@ class SurveyTableChart {
if (is_array($variables2) && count($variables2) > 0) {
foreach ($variables2 AS $v_second) {
if (is_array($variables1) && count($variables1) > 0) {
+ $c1=0;
foreach ($variables1 AS $v_first) {
$_means = $this->classInstance->createMeans($v_first, $v_second);
if ($_means != null) {
@@ -994,20 +997,20 @@ class SurveyTableChart {
#število vratic in število kolon
- $cols = count($_means);
+ //$cols = count($_means);
# preberemo kr iz prvega loopa
- $rows = count($_means[0]['options']);
+ //$rows = count($_means[0]['options']);
// loop po vrsticah
- if (count($_means[0]['options']) > 0) {
+ if (isset($_means[0]['options'])&&count($_means[0]['options']) > 0) {
foreach ($_means[0]['options'] as $ckey2 =>$crossVariabla2) {
// IME VARIABLE
$variableArray[] = $crossVariabla2['naslov'];
// VREDNOST VARIABLE
- $dataArray[] = $this->classInstance->formatNumber($_means[0]['result'][$ckey2], SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
+ $dataArray[] = $this->classInstance->formatNumber((isset($_means[0]['result'][$ckey2])?$_means[0]['result'][$ckey2]:null), SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_RESIDUAL'));
}
}
@@ -1090,7 +1093,7 @@ class SurveyTableChart {
#povprečja
$avg = $this->classInstance->formatNumber($means[$fkey][$oKey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
# enote
- $enote = (int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt'];
+ $enote = isset($this->break_frequencys[$fkey][$oKey][$sequence]['validCnt'])? (int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt']:0;
$tempArray = array();
@@ -1101,8 +1104,8 @@ class SurveyTableChart {
$dataArray[] = $tempArray;
- $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*(int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt']);
- $totalFreq[$sequence]+= (int)$this->break_frequencys[$fkey][$oKey][$sequence]['validCnt'];
+ $totalMeans[$sequence] = (isset($totalMeans[$sequence])? $totalMeans[$sequence] += ($means[$fkey][$oKey][$sequence]*$enote): $means[$fkey][$oKey][$sequence]*$enote);
+ $totalFreq[$sequence] = (isset($totalFreq[$sequence])?$totalFreq[$sequence]+= $enote:$enote);
}
}
@@ -1493,7 +1496,7 @@ class SurveyTableChart {
else
$legend = '';
- $ID = $this->anketa.'_chart_'.$chartID.'_counter_'.$counter.'_mv_'.SurveyAnalysis::$missingProfileData['display_mv_type'];
+ $ID = $this->anketa.'_chart_'.$chartID.'_counter_'./* $counter .*/'_mv_'.SurveyAnalysis::$missingProfileData['display_mv_type'];
foreach ($settings AS $key => $val) {
if($key == 'colors'){
@@ -1506,7 +1509,7 @@ class SurveyTableChart {
}
elseif($key != 'name')
- $ID .= '_'.$key.'_'.$val;
+ $ID .= '_'.$key.'_'.json_encode($val);
}
$ID .= '_skin_'.$this->skin;
@@ -1705,8 +1708,7 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
$Test->drawGrid(4,TRUE,230,230,230,50);
@@ -1744,7 +1746,7 @@ class SurveyTableChart {
global $lang;
// Nastavimo visino grafa (ce imamo vec kot 7 variabel/gridov)
- $Data = $DataSet->GetData();
+ $Data = ($DataSet!==null?$DataSet->GetData():array());
$countGrids = count($Data);
$addHeight = $countGrids > 5 ? ($countGrids-5)*30 : 0;
@@ -1764,15 +1766,14 @@ class SurveyTableChart {
$Test->setGraphArea($this->settings['hq']*$startX,$this->settings['hq']*70,$this->settings['hq']*650,$this->settings['hq']*(220+$addHeight));
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
// Če gre za hierarhijo, potem je fiksna skala
if(SurveyInfo::checkSurveyModule('hierarhija', $this->anketa))
$Test->setFixedScale(1,5,4);
- $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
+ $Test->drawHorScale($Data,($DataSet!==null?$DataSet->GetDataDescription():array()),SCALE_START0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
$Test->drawHorGrid(4,TRUE,230,230,230,50);
// Draw the 0 line
@@ -1782,11 +1783,11 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
// Draw the bar graph
- $Test->drawHorBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(), $this->settings['barLabel']);
+ $Test->drawHorBarGraph($Data,($DataSet!==null?$DataSet->GetDataDescription():array()), $this->settings['barLabel']);
// Finish the graph
if($show_legend == 1)
- $Test->drawLegend($this->settings['hq']*680,$this->settings['hq']*60,$DataSet->GetDataDescription(),255,255,255);
+ $Test->drawLegend($this->settings['hq']*680,$this->settings['hq']*60,($DataSet!==null?$DataSet->GetDataDescription():array()),255,255,255);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
@@ -1810,7 +1811,7 @@ class SurveyTableChart {
// Prikaz t vrednosti pri ttest grafu
if($this->podstran == 'ttest' && $this->settings['show_numerus'] == '1'){
- $t = 't = '.$DataSet->GetNumerus();
+ $t = 't = '.($DataSet!==null?$DataSet->GetNumerus():0);
$Test->drawTextBox($this->settings['hq']*680,$this->settings['hq']*210,$this->settings['hq']*795,$this->settings['hq']*220,$t,$Angle=0,$R=0,$G=0,$B=0,$Align=ALIGN_LEFT,$Shadow=FALSE,$BgR=-1,$BgG=-1,$BgB=-1,$Alpha=0);
}
@@ -1849,8 +1850,7 @@ class SurveyTableChart {
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
$Test->drawGrid(4,TRUE,230,230,230,50);
@@ -1905,24 +1905,12 @@ class SurveyTableChart {
$roundText = ($this->settings['labelWidth'] == 20) ? 35 : 65;
// Pri navadnem radio in checkbox vprasanju imamo samo en stolpec - zato so dimenzije drugacne
- /*if($spremenljivka['tip'] == 1 || $spremenljivka['tip'] == 2 || $spremenljivka['tip'] == 3){
- $Test->setGraphArea($this->settings['hq']*200,$this->settings['hq']*50,$this->settings['hq']*630,$this->settings['hq']*220);
- $Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*243,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*295,200,200,200);
- $Test->drawGraphArea(255,255,255,TRUE);
- $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE);
- $Test->drawHorGrid(4,TRUE,230,230,230,50);
- }
- else{*/
- $Test->setGraphArea($this->settings['hq']*$startX,$this->settings['hq']*70,$this->settings['hq']*650,$this->settings['hq']*(220+$addHeight));
- $Test->drawFilledRoundedRectangle(7,7,793,243+$addHeight,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(295+$addHeight),200,200,200);
- $Test->drawGraphArea(255,255,255,TRUE);
- $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
- $Test->drawHorGrid(4,TRUE,230,230,230,50);
- //}
+ $Test->setGraphArea($this->settings['hq']*$startX,$this->settings['hq']*70,$this->settings['hq']*650,$this->settings['hq']*(220+$addHeight));
+ $Test->drawFilledRoundedRectangle(7,7,793,243+$addHeight,5,255,255,255);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(295+$addHeight),200,200,200);
+ $Test->drawGraphArea(255,255,255,TRUE);
+ $Test->drawHorScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_ADDALLSTART0,0,0,0,TRUE,0,0,TRUE,1,FALSE,$roundText);
+ $Test->drawHorGrid(4,TRUE,230,230,230,50);
// Draw the 0 line
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*6);
@@ -1951,7 +1939,7 @@ class SurveyTableChart {
$strings = explode('<br />',$this->crosstabVars[1]);
$substr1 = (strlen($strings[0]) > 50) ? substr($strings[0], 0, 47).'...' : $strings[0];
- $substr2 = (strlen($strings[1]) > 50) ? substr($strings[1], 0, 47).'...' : $strings[1];
+ $substr2 = isset($strings[1]) ? ((strlen($strings[1]) > 50) ? substr($strings[1], 0, 47).'...' : $strings[1]):'';
$Test->drawTextBox($this->settings['hq']*50,$this->settings['hq']*20,$this->settings['hq']*280,$this->settings['hq']*30,$substr1,$Angle=0,$R=0,$G=0,$B=0,$Align=ALIGN_CENTER,$Shadow=FALSE,$BgR=-1,$BgG=-1,$BgB=-1,$Alpha=0);
$Test->drawTextBox($this->settings['hq']*50,$this->settings['hq']*38,$this->settings['hq']*280,$this->settings['hq']*43,$substr2,$Angle=0,$R=0,$G=0,$B=0,$Align=ALIGN_CENTER,$Shadow=FALSE,$BgR=-1,$BgG=-1,$BgB=-1,$Alpha=0);
@@ -1975,12 +1963,8 @@ class SurveyTableChart {
$Test->setLineStyle($this->settings['hq'],$DotSize=0);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
- //$Test->setGraphArea(50,40,685,220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
- //$Test->createColorGradientPalette(195,204,56,223,110,41,3);
- //$Test->createColorGradientPalette(168,188,56,248,255,136,5);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
// Draw the pie graph
$labels = ($this->settings['sort'] == 1) ? 'custom_percent_sort' : 'custom_percent';
@@ -2018,12 +2002,8 @@ class SurveyTableChart {
$Test->setLineStyle($this->settings['hq'],$DotSize=0);
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
- //$Test->setGraphArea(50,40,685,220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
- //$Test->createColorGradientPalette(195,204,56,223,110,41,3);
- //$Test->createColorGradientPalette(168,188,56,248,255,136,5);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
// Draw the pie graph
$labels = ($this->settings['sort'] == 1) ? 'custom_percent_sort' : 'custom_percent';
@@ -2067,8 +2047,7 @@ class SurveyTableChart {
$Test->setGraphArea($this->settings['hq']*270,$this->settings['hq']*50,$this->settings['hq']*530,$this->settings['hq']*(220+$addHeight));
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*(243+$addHeight),5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*(245+$addHeight),200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
@@ -2122,11 +2101,7 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*320);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*343,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*345,200,200,200);
- //$Test->drawGraphArea(255,255,255,TRUE);
- //$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,20,20,20,TRUE,$angle,0,TRUE,1,FALSE,$roundText);
- //$Test->drawGrid(4,TRUE,230,230,230,50);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*345,200,200,200);
// Draw the 0 line
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
@@ -2179,8 +2154,7 @@ class SurveyTableChart {
$Test->setFontProperties(dirname(__FILE__).'/../../pChart/Fonts/verdana.ttf',$this->settings['hq']*$this->fontSize);
$Test->setGraphArea($this->settings['hq']*100,$this->settings['hq']*40,$this->settings['hq']*650,$this->settings['hq']*220);
$Test->drawFilledRoundedRectangle($this->settings['hq']*7,$this->settings['hq']*7,$this->settings['hq']*793,$this->settings['hq']*273,5,255,255,255);
- //$Test->drawRoundedRectangle(5,5,795,245,5,128,128,128);
- $Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
+ //$Test->drawRectangle($this->settings['hq']*5,$this->settings['hq']*5,$this->settings['hq']*795,$this->settings['hq']*275,200,200,200);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,0,0,0,TRUE,$angle,0,TRUE);
if($count <= 20)
@@ -2213,13 +2187,16 @@ class SurveyTableChart {
global $lang;
// Ikone izvoza na vrhu posameznih nastavitev
- //$this->displayExportIcons($chartID);
-
-
- echo '<div id="switch_left_'.$chartID.'_loop_0" class="switch_left '.($this->settings_mode == 1 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'0\', \'0\')">'.$lang['srv_chart_settings_basic'].'</div>';
- //echo '<span id="switch_middle_'.$chartID.'_loop_0" class="'.($this->settings_mode == 1 ? 'rightHighlight' : 'leftHighlight').'"></span>';
- echo '<div id="switch_right_'.$chartID.'_loop_0" class="switch_right '.($this->settings_mode == 0 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'1\', \'0\')">'.$lang['srv_chart_settings_advanced'].'</div>';
+ $this->displayExportIcons($chartID);
+
+ echo '<div class="chart_settings_content">';
+
+
+ echo '<div class="tab_holder">';
+ echo ' <div id="switch_left_'.$chartID.'_loop_0" class="tab switch_left '.($this->settings_mode == 1 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'0\', \'0\')">'.$lang['srv_chart_settings_basic'].'</div>';
+ echo ' <div id="switch_right_'.$chartID.'_loop_0" class="tab switch_right '.($this->settings_mode == 0 ? ' non-active' : '').'" onClick="chartSwitchSettings(\''.$chartID.'\', \'1\', \'0\')">'.$lang['srv_chart_settings_advanced'].'</div>';
+ echo '</div>';
// OSNOVNE NASTAVITVE
echo '<div class="chart_settings_inner" id="chart_settings_basic_'.$chartID.'_loop_0" '.($this->settings_mode == 1 ? ' style="display:none;"' : '').'>';
@@ -2261,8 +2238,8 @@ class SurveyTableChart {
// visoka locljivost grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hq'].': ';
echo '<input type="checkbox" id="tablechart_hq_'.$chartID.'" name="tablechart_hq" '.($settings['hq']=='3'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \''.$this->podstran.'\', \'hq\');">';
+ echo '<label for="tablechart_hq_'.$chartID.'">'.$lang['srv_chart_hq'].'</label>';
echo '</div>';
break;
@@ -2273,33 +2250,18 @@ class SurveyTableChart {
$checked = ($settings['show_numerus']=='1') ? ' checked="checked"': '';
- echo $lang['srv_chart_showNumerus'].': ';
echo '<input type="checkbox" id="tablechart_show_numerus_'.$chartID.'" name="tablechart_show_numerus" '.$checked.' onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'show_numerus\');">';
+ echo '<label for="tablechart_show_numerus_'.$chartID.'">'.$lang['srv_chart_showNumerus'].'</label>';
echo '</div>';
default:
break;
- }
-
-
- // Link na urejanje label
- //echo '<span class="edit" style="margin-top:15px;" onclick="chartAdvancedSettings(\''.$this->counter.'\');">'.$lang['srv_chart_advancedLink_labels'].'</span>';
- // Vprasajcek za pomoc
- //echo Help :: display('displaychart_settings_labels');
-
- // Link na urejanje barv
- echo '<span class="edit" onclick="tableChartAdvancedSettings(\''.$chartID.'\', \''.$this->podstran.'\')">'.$lang['srv_chart_advancedLink_colors'].'</span>';
- // Vprasajcek za pomoc
- echo Help :: display('displaychart_settings_colors');
-
- // Link na rekodiranje
- //echo '<span class="edit" onclick="chartAdvancedSettings(\''.$this->counter.'\', \'3\');">'.$lang['srv_chart_advancedLink_recoding'].'</span>';
- // Vprasajcek za pomoc
- //echo Help :: display('displaychart_settings_recoding');
-
+ }
echo '</div>';
+
+ echo '</div>';
}
// ikone na vrhu posameznih nastavitev (izvozi)
@@ -2310,16 +2272,9 @@ class SurveyTableChart {
// linki
echo '<div class="chart_setting_exportLinks">';
- // Ikona za print
- echo '<a href="#" onclick="showAnalizaSingleChartPopup(\''.$chartID.'\',\''.M_ANALYSIS_CHARTS.'\'); return false;">';
- echo '<span class="faicon print_small icon-grey_dark_link" title="' . $lang['PRN_Izpis'] . '"></span>';
- echo '</a>';
+ // Gumb za nastavitve
+ echo '<button class="small white-blue" onClick="tableChartAdvancedSettings(\''.$chartID.'\', \''.$this->podstran.'\');"><span class="faicon wheel_32"></span>'.$lang['settings'].'</button>';
- // Izvoz posameznega grafa v PDF/RTF/PPT
- echo '&nbsp;<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts&anketa='.$this->anketa.'&sprID='.$chartID).'" target="_blank" title="'.$lang['PDF_Izpis'].'"><span class="faicon pdf"></span>&nbsp;</a>';
- echo '&nbsp;<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_rtf&anketa='.$this->anketa.'&sprID='.$chartID).'" target="_blank" title="'.$lang['RTF_Izpis'].'"><span class="faicon rtf"></span>&nbsp;</a>';
- echo '&nbsp;<a href="'.makeEncodedIzvozUrlString('izvoz.php?m=charts_ppt&anketa='.$this->anketa.'&sprID='.$chartID).'" target="_blank" title="'.$lang['PPT_Izpis'].'"><span class="faicon ppt"></span>&nbsp;</a>';
-
echo '</div>';
}
@@ -2331,7 +2286,7 @@ class SurveyTableChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'type\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'type\');">';
if($this->crossCheck){
// navedbe
@@ -2364,7 +2319,7 @@ class SurveyTableChart {
// tip izpisa vrednosti
echo '<div class="chart_setting">';
- echo $lang['srv_chart_valtype'].': <select id="tablechart_value_type_'.$chartID.'" name="tablechart_value_type" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'value_type\');">';
+ echo $lang['srv_chart_valtype'].': <select id="tablechart_value_type_'.$chartID.'" name="tablechart_value_type" class="dropdown small" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'value_type\');">';
echo ' <option value="0" '.($settings['value_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_percent'].'</option>';
echo ' <option value="1" '.($settings['value_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_freq'].'</option>';
@@ -2374,29 +2329,12 @@ class SurveyTableChart {
// prikaz label v stolpcih
- //if($settings['type'] == 0 || $settings['type'] == 1){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_chart_barLabel'].': ';
- echo '<input type="checkbox" id="tablechart_barLabel_'.$chartID.'" name="tablechart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'barLabel\');">';
+ echo '<div class="chart_setting">';
+
+ echo '<input type="checkbox" id="tablechart_barLabel_'.$chartID.'" name="tablechart_barLabel" '.($settings['barLabel']=='1'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'barLabel\');">';
+ echo '<label for="tablechart_barLabel_'.$chartID.'">'.$lang['srv_chart_barLabel'].'</label>';
- echo '</div>';
- //}
-
-
- // sirina label
- /*if($settings['type'] == 0 || $settings['type'] == 3){
- echo '<div class="chart_setting">';
-
- echo $lang['srv_wide_chart'].': <select id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'crosstab\', \'labelWidth\');">';
-
- echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
- echo ' <option value="20" '.($settings['labelWidth']=='20'?' selected="selected"':'').'>20%</option>';
-
- echo '</select>';
-
- echo '</div>';
- }*/
+ echo '</div>';
}
// Nastavitve za ttest graf
@@ -2407,7 +2345,7 @@ class SurveyTableChart {
// sirina label
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'labelWidth\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'labelWidth\');">';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
echo ' <option value="20" '.($settings['labelWidth']=='20'?' selected="selected"':'').'>20%</option>';
@@ -2420,8 +2358,8 @@ class SurveyTableChart {
// visoka locljivost grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_hq'].': ';
echo '<input type="checkbox" id="tablechart_hq_'.$chartID.'" name="tablechart_hq" '.($settings['hq']=='3'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'ttest\', \'hq\');">';
+ echo '<label for="tablechart_hq_'.$chartID.'">'.$lang['srv_chart_hq'].'</label>';
echo '</div>';
}
@@ -2433,7 +2371,7 @@ class SurveyTableChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'type\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'type\');">';
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_avg_hor'].'</option>';
echo ' <option value="1" '.($settings['type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_avg_radar'].'</option>';
@@ -2446,8 +2384,8 @@ class SurveyTableChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': ';
echo '<input type="checkbox" id="tablechart_sort_'.$chartID.'" name="tablechart_sort" '.($settings['sort']=='1'?' checked="checked"':'').' onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'sort\');">';
+ echo '<label for="tablechart_sort_'.$chartID.'">'.$lang['srv_chart_sort'].'</label>';
echo '</div>';
@@ -2456,7 +2394,7 @@ class SurveyTableChart {
if($settings['type'] == 0){
echo '<div class="chart_setting">';
- echo $lang['srv_wide_chart'].': <select id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'labelWidth\');">';
+ echo $lang['srv_wide_chart'].': <select class="dropdown small" id="tablechart_labelWidth_'.$chartID.'" name="tablechart_labelWidth" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'labelWidth\');">';
echo ' <option value="50" '.($settings['labelWidth']=='50'?' selected="selected"':'').'>50%</option>';
echo ' <option value="20" '.($settings['labelWidth']=='20'?' selected="selected"':'').'>20%</option>';
@@ -2470,7 +2408,7 @@ class SurveyTableChart {
// Tip radarja
if($settings['type'] == 1){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_type\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_type\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -2482,7 +2420,7 @@ class SurveyTableChart {
// Postavitev skale pri radarju
if($settings['type'] == 1){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_scale\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'mean\', \'radar_scale\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -2501,7 +2439,7 @@ class SurveyTableChart {
// Tip grafa
echo '<div class="chart_setting">';
- echo $lang['srv_chart_type'].':<br /> <select style="width:140px;" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'type\');">';
+ echo $lang['srv_chart_type'].': <select class="dropdown small" id="tablechart_type_'.$chartID.'" name="tablechart_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'type\');">';
if($tip != 7)
echo ' <option value="0" '.($settings['type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar'].'</option>';
@@ -2515,7 +2453,7 @@ class SurveyTableChart {
// sortiranje
echo '<div class="chart_setting">';
- echo $lang['srv_chart_sort'].': <select id="tablechart_sort_'.$chartID.'" name="tablechart_sort" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'sort\');">';
+ echo $lang['srv_chart_sort'].': <select class="dropdown small" id="tablechart_sort_'.$chartID.'" name="tablechart_sort" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'sort\');">';
echo ' <option value="0" '.($settings['sort']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_sort_no'].'</option>';
if($tip != 7)
@@ -2531,13 +2469,13 @@ class SurveyTableChart {
if($settings['rotate']=='1'){
echo $lang['srv_chart_rotate_grids'].' ';
- echo '<span onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="tablechart_rotate_'.$chartID.'" name="tablechart_rotate" value="0">';
echo ' '.$lang['srv_chart_rotate_vars'].' ';
}
else{
echo $lang['srv_chart_rotate_vars'].' ';
- echo '<span onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;"><img src="img_0/random_off.png" title="Obrni grafe/variable" /></span>';
+ echo '<span class="faicon refresh" onclick="changeTableChart(\''.$chartID.'\', \'break\', \'rotate\');" style="cursor: pointer;" title="Obrni grafe/variable"></span>';
echo '<input type="hidden" id="tablechart_rotate_'.$chartID.'" name="tablechart_rotate" value="1">';
echo ' '.$lang['srv_chart_rotate_grids'];
}
@@ -2546,7 +2484,7 @@ class SurveyTableChart {
// Tip radarja
if($settings['type'] == '0'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_type'].': <select id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_type\');">';
+ echo $lang['srv_chart_radar_type'].': <select class="dropdown small" id="tablechart_radar_type_'.$chartID.'" name="tablechart_radar_type" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_type\');">';
echo ' <option value="0" '.($settings['radar_type']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type0'].'</option>';
echo ' <option value="1" '.($settings['radar_type']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_type1'].'</option>';
@@ -2558,7 +2496,7 @@ class SurveyTableChart {
// Postavitev skale pri radarju
if($settings['type'] == '0'){
echo '<div class="chart_setting">';
- echo $lang['srv_chart_radar_scale'].': <select id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_scale\');">';
+ echo $lang['srv_chart_radar_scale'].': <select class="dropdown small" id="tablechart_radar_scale_'.$chartID.'" name="tablechart_radar_scale" onchange="changeTableChart(\''.$chartID.'\', \'break\', \'radar_scale\');">';
echo ' <option value="0" '.($settings['radar_scale']=='0'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale0'].'</option>';
echo ' <option value="1" '.($settings['radar_scale']=='1'?' selected="selected"':'').'>'.$lang['srv_chart_radar_scale1'].'</option>';
@@ -2590,7 +2528,6 @@ class SurveyTableChart {
// urejanje label
echo '<div id="chartSettingsArea2" class="chartSettingsArea" style="visibility: hidden;">';
- //$this->displayAdvancedSettingsLabels($chartID);
echo '</div>';
echo '</form>';