summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
commit75160b12821f7f4299cce7f0b69c83c1502ae071 (patch)
tree27e25e4ccaef45f0c58b22831164050d1af1d4db /admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php
parentprvi-commit (diff)
download1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip
Diffstat (limited to 'admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php')
-rw-r--r--admin/survey/classes/surveyAnalysis/class.SurveyAnalysisHelper.php88
1 files changed, 49 insertions, 39 deletions
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