diff options
Diffstat (limited to '')
-rw-r--r-- | admin/survey/classes/surveyAnalysis/class.SurveyBreak.php | 783 |
1 files changed, 464 insertions, 319 deletions
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 ? ' ' : ' ' ))
. $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 |