summaryrefslogtreecommitdiffstats
path: root/admin/survey/classes/class.SurveyList.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/survey/classes/class.SurveyList.php')
-rw-r--r--admin/survey/classes/class.SurveyList.php1561
1 files changed, 717 insertions, 844 deletions
diff --git a/admin/survey/classes/class.SurveyList.php b/admin/survey/classes/class.SurveyList.php
index a9377e1..9efbcb0 100644
--- a/admin/survey/classes/class.SurveyList.php
+++ b/admin/survey/classes/class.SurveyList.php
@@ -21,55 +21,55 @@ if(session_id() == '') {session_start();}
class SurveyList {
- private $surveys_ids = array(); # array z id-ji anket
- private $settingsArray = array(); # array z nastavitvami
+ protected $surveys_ids = array(); # array z id-ji anket
+ protected $settingsArray = array(); # array z nastavitvami
- private $parentFolder; # osnovni direktorij
- private $currentFolder; # trenutni direktorij
- private $folders = array(); # array z direktoriji
+ protected $parentFolder; # osnovni direktorij
+ protected $currentFolder; # trenutni direktorij
+ protected $folders = array(); # array z direktoriji
- private $user_id = null; # ali filtriramo po userju
- private $g_uid = null; # globalna nastavitev user_id
- private $g_adminType = null; # globalna nastavitev adminType
+ protected $user_id = null; # ali filtriramo po userju
+ protected $g_uid = null; # globalna nastavitev user_id
+ protected $g_adminType = null; # globalna nastavitev adminType
- private $onlyPhone = false; # Ali prikazujemo samo telefonske ankete
+ protected $onlyPhone = false; # Ali prikazujemo samo telefonske ankete
- private $lang_id = 0; # nastavitev languageType
+ protected $lang_id = 0; # nastavitev languageType
- private $gdpr = 0; # nastavitev gdpr filter za ankete
+ protected $gdpr = 0; # nastavitev gdpr filter za ankete
- private $dostopCondition = null; # shranimo omejitve dostopa (glede na tip uporabnika in uporabniški uid)
- private $folderCondition = null; # shranimo omejevanja folderjev
+ protected $dostopCondition = null; # shranimo omejitve dostopa (glede na tip uporabnika in uporabniški uid)
+ protected $folderCondition = null; # shranimo omejevanja folderjev
- private $libraryCondition = null; # shranimo novo omejevanje folderjev (moja knjiznica)
- private $currentLibrary; # trenutni direktorij moje knjiznice
+ protected $libraryCondition = null; # shranimo novo omejevanje folderjev (moja knjiznica)
+ protected $currentLibrary; # trenutni direktorij moje knjiznice
- private $filter = null; # filter za ime ankete
+ protected $filter = null; # filter za ime ankete
- private $show_folders = 0; # ali prikazujemo mape ali ne (default zaenkrat da)
+ protected $show_folders = 0; # ali prikazujemo mape ali ne (default zaenkrat da)
- private $isSearch = 0; # ali izvajamo search po anektah
- private $searchString = ''; # geslo po katerem iscemo po anketah
- private $searchStringProcessed = array(); # geslo po katerem iscemo po anketah, obdelano (skrajsano da isce tudi po drugih sklanjatvah)
- private $searchSettings = array(); # nastavitve searcha
+ protected $isSearch = 0; # ali izvajamo search po anektah
+ protected $searchString = ''; # geslo po katerem iscemo po anketah
+ protected $searchStringProcessed = array(); # geslo po katerem iscemo po anketah, obdelano (skrajsano da isce tudi po drugih sklanjatvah)
+ protected $searchSettings = array(); # nastavitve searcha
# privzete nastavitve
- private $pageno = 1; # na kateri strani navigacije smo
- private $max_pages = 1; # koliko strani imamo
- private $sortby = SRV_LIST_ORDER_BY; # id polja po katerem sortiramo
- private $sorttype = SRV_LIST_ORDER_TYPE; # tip sortiranja 1= deac, 0 = asc
- private $rec_per_page = SRV_LIST_REC_PER_PAGE; # število zapisov na stran
- private $orderByText = false; # ali sortiramo po tekstovnem polju (takrat uporabimo upper)
+ protected $pageno = 1; # na kateri strani navigacije smo
+ protected $max_pages = 1; # koliko strani imamo
+ protected $sortby = SRV_LIST_ORDER_BY; # id polja po katerem sortiramo
+ protected $sorttype = SRV_LIST_ORDER_TYPE; # tip sortiranja 1= deac, 0 = asc
+ protected $rec_per_page = SRV_LIST_REC_PER_PAGE; # število zapisov na stran
+ protected $orderByText = false; # ali sortiramo po tekstovnem polju (takrat uporabimo upper)
# privzete možnosti
- private $sort_types_options = array(1=>'DESC',2=>'ASC'); # možni načini sortiranja
- private $appropriateStatus = '5,6'; # statusi ki veljajo kot ustrezni
+ protected $sort_types_options = array(1=>'DESC',2=>'ASC'); # možni načini sortiranja
+ protected $appropriateStatus = '5,6'; # statusi ki veljajo kot ustrezni
# možni načini sortiranja
- private $order_by_options = array(
+ protected $order_by_options = array(
1=>'naslov',
2=>'active',
3=>'lib_glb',
@@ -95,7 +95,7 @@ class SurveyList {
);
# polja za prikaz
- private $dataFields = array(
+ protected $dataFields = array(
1=>array('id'=>1,'visible'=>1,'order_by'=>'naslov','header_field'=>'sl_naslov','alsoResize'=>'.sl_naslov','minWidth'=>100,'data_field'=>'naslov','data_type'=>'naslov', 'data_css'=>'sl_naslov_padding', 'order_text'=>true),
2=>array('id'=>2,'visible'=>1,'order_by'=>'active','header_field'=>'sl_active','lang_label'=>'sl_active_1','alsoResize'=>'.sl_active','minWidth'=>20,'maxWidth'=>30,'data_field'=>'active','data_type'=>'active','data_css'=>'anl_ac'),
3=>array('id'=>3,'visible'=>0,'order_by'=>'lib_glb','header_field'=>'sl_lib_glb','lang_label'=>'sl_lib_glb_1','alsoResize'=>'.sl_lib_glb','minWidth'=>20,'maxWidth'=>30,'data_field'=>'lib_glb','data_type'=>'lib_glb','data_css'=>'anl_ac'),
@@ -168,7 +168,7 @@ class SurveyList {
// Ali prikazujemo folderje ali ne
$userAccess = UserAccess::getInstance($global_user_id);
- $detect = New Mobile_Detect();
+ $detect = New \Detection\MobileDetect;
if($userAccess->checkUserAccess('my_survey_folders') && !$detect->isMobile() && !$detect->isTablet())
$this->show_folders = UserSetting::getInstance()->getUserSetting('survey_list_folders');
@@ -228,11 +228,33 @@ class SurveyList {
}
+ // Vrnemo, ce imamo vklopljene folderje ali ne
+ public static function hasFolders(){
+ global $global_user_id;
+
+ $show_folders = 0;
+
+ $userAccess = UserAccess::getInstance($global_user_id);
+
+ $detect = New \Detection\MobileDetect;
+
+ if($userAccess->checkUserAccess('my_survey_folders') && !$detect->isMobile() && !$detect->isTablet()){
+ UserSetting::getInstance()->Init($global_user_id);
+ $show_folders = UserSetting::getInstance()->getUserSetting('survey_list_folders');
+ }
+
+ if($show_folders == '1')
+ return true;
+ else
+ return false;
+ }
+
+
/**
* @desc prikaze zgornjo navigacijo
*/
function display_sub_tabs () {
- global $lang, $global_user_id, $admin_type, $site_domain, $aai_instalacija;
+ global $lang, $global_user_id, $admin_type, $site_domain;
$SLCount = $this->countSurveys();
@@ -247,55 +269,45 @@ class SurveyList {
if ($admin_type == 0) {
echo '<ul class="secondNavigation">';
- #zavihek osnovni pregled uporabnikov
- echo '<li>';
- echo '<a class="no-img single '.((!isset($_GET['m']) || $_GET['m'] == 'my') ? 'active' : '').'"'
- .' href="index.php?a=diagnostics&t=uporabniki" title="'.$lang['n_users_list_all'].'">';
+ #zavihek moji uporabniki
+ echo '<li class="'.((!isset($_GET['m']) || $_GET['m'] == 'my') ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki" title="'.$lang['n_users_list'].'">';
echo $lang['n_users_list'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
+ #zavihek dodajanje uporabnikov
+ echo '<li class="'.($_GET['m'] == 'add' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=add" title="'.$lang['n_users_list_add'].'">';
+ echo $lang['n_users_list_add'].'</a>';
+ echo '</li>';
+
#zavihek seznam vseh uporabnikov
- echo '<li>';
- echo '<a class="no-img single '.($_GET['m'] == 'all' ? 'active' : '').'"'
- .' href="index.php?a=diagnostics&t=uporabniki&m=all" title="'.$lang['n_users_list_all'].'">';
+ echo '<li class="'.($_GET['m'] == 'all' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=all" title="'.$lang['n_users_list_all'].'">';
echo $lang['n_users_list_all'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
#zavihek izbrisani uporabniki
- echo '<li>';
- echo '<a class="no-img single '.(!empty($_GET['m']) && $_GET['m'] == 'izbrisani' ? 'active' : '').'"'
- .' href="index.php?a=diagnostics&t=uporabniki&m=izbrisani" title="'.$lang['n_deleted_users'].'">';
+ echo '<li class="'.(!empty($_GET['m']) && $_GET['m'] == 'izbrisani' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=izbrisani" title="'.$lang['n_deleted_users'].'">';
echo $lang['n_deleted_users'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
#zavihek odjavljeni uporabniki
- echo '<li>';
- echo '<a class="no-img single '.(!empty($_GET['m']) && $_GET['m'] == 'nepotrjeni' ? 'active' : '').'"'
- .' href="index.php?a=diagnostics&t=uporabniki&m=nepotrjeni" title="'.$lang['n_unconfirmed_users'].'">';
+ echo '<li class="'.(!empty($_GET['m']) && $_GET['m'] == 'nepotrjeni' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=nepotrjeni" title="'.$lang['n_unconfirmed_users'].'">';
echo $lang['n_unconfirmed_users'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
#zavihek nepotrjenih uporabnikov
- echo '<li>';
- echo '<a class="no-img single '.(!empty($_GET['m']) && $_GET['m'] == 'odjavljeni' ? 'active' : '').'"'
- .' href="index.php?a=diagnostics&t=uporabniki&m=odjavljeni" title="'.$lang['n_unsigned_users'].'">';
+ echo '<li class="'.(!empty($_GET['m']) && $_GET['m'] == 'odjavljeni' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=odjavljeni" title="'.$lang['n_unsigned_users'].'">';
echo $lang['n_unsigned_users'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
#zavihek sa modul
- echo '<li>';
- echo '<a class="no-img single '.(!empty($_GET['m']) && $_GET['m'] == 'sa-modul' ? 'active' : '').'"'
- .' href="index.php?a=diagnostics&t=uporabniki&m=sa-modul" title="'.$lang['srv_hierarchy_users_access'].'">';
+ echo '<li class="'.(!empty($_GET['m']) && $_GET['m'] == 'sa-modul' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=sa-modul" title="'.$lang['srv_hierarchy_users_access'].'">';
echo $lang['srv_hierarchy_users_access'].'</a>';
echo '</li>';
@@ -307,11 +319,17 @@ class SurveyList {
echo '<ul class="secondNavigation">';
- #zavihek osnovni pregled uporabnikov
- echo '<li>';
- echo '<a class="no-img single active" href="index.php?a=diagnostics&t=uporabniki" title="'.$lang['n_users_list_all'].'">';
+ #zavihek moji uporabniki
+ echo '<li class="'.((!isset($_GET['m']) || $_GET['m'] == 'my') ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki" title="'.$lang['n_users_list'].'">';
echo $lang['n_users_list'].'</a>';
echo '</li>';
+
+ #zavihek dodajanje uporabnikov
+ echo '<li class="'.($_GET['m'] == 'add' ? 'active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=uporabniki&m=add" title="'.$lang['n_users_list_add'].'">';
+ echo $lang['n_users_list_add'].'</a>';
+ echo '</li>';
echo '</ul>';
}
@@ -320,50 +338,35 @@ class SurveyList {
if ($admin_type == 0) {
echo '<ul class="secondNavigation">';
+
#zavihek ankete
- echo '<li>';
- echo '<a class="no-img side-left'.(($_GET['t']=='ankete'||$_GET['a']=='diagnostics')&& !isset($_GET['t']) ? ' active' : '').'"'
- .' href="index.php?a=diagnostics" title="'.$lang['srv_ankete'].'">';
+ echo '<li class="'.(($_GET['t']=='ankete'||$_GET['a']=='diagnostics')&& !isset($_GET['t']) ? ' active' : '').'">';
+ echo '<a href="index.php?a=diagnostics" title="'.$lang['srv_ankete'].'">';
echo $lang['srv_ankete'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img'.(($_GET['t']=='time_span_daily') ? ' active' : '').'"'
- .' href="index.php?a=diagnostics&t=time_span_daily" title="'.$lang['srv_weekly_diagnostics'].'">';
+ echo '<li class="'.(($_GET['t']=='time_span_daily') ? ' active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=time_span_daily" title="'.$lang['srv_weekly_diagnostics'].'">';
echo $lang['srv_weekly_diagnostics'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img'.(($_GET['t']=='time_span_monthly') ? ' active' : '').'"'
- .' href="index.php?a=diagnostics&t=time_span_monthly" title="'.$lang['srv_monthly_diagnostics'].'">';
+ echo '<li class="'.(($_GET['t']=='time_span_monthly') ? ' active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=time_span_monthly" title="'.$lang['srv_monthly_diagnostics'].'">';
echo $lang['srv_monthly_diagnostics'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img'.(($_GET['t']=='time_span_yearly') ? ' active' : '').'"'
- .' href="index.php?a=diagnostics&t=time_span_yearly" title="'.$lang['srv_yearly_diagnostics'].'">';
+ echo '<li class="'.(($_GET['t']=='time_span_yearly') ? ' active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=time_span_yearly" title="'.$lang['srv_yearly_diagnostics'].'">';
echo $lang['srv_yearly_diagnostics'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img side-right'.(($_GET['t']=='time_span') ? ' active' : '').'"'
- .' href="index.php?a=diagnostics&t=time_span&uvoz=0&ustrezni=1&delnoustrezni=1&neustrezni=0" title="'.$lang['srv_all_diagnostics'].'">';
+ echo '<li class="'.(($_GET['t']=='time_span') ? ' active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=time_span&uvoz=0&ustrezni=1&delnoustrezni=1&neustrezni=0" title="'.$lang['srv_all_diagnostics'].'">';
echo $lang['srv_all_diagnostics'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img side-right'.(($_GET['t']=='paradata') ? ' active' : '').'"'
- .' href="index.php?a=diagnostics&t=paradata" title="'.$lang['srv_metapodatki'].'">';
+ echo '<li class="'.(($_GET['t']=='paradata') ? ' active' : '').'">';
+ echo '<a href="index.php?a=diagnostics&t=paradata" title="'.$lang['srv_metapodatki'].'">';
echo $lang['srv_metapodatki'].'</a>';
echo '</li>';
@@ -378,17 +381,14 @@ class SurveyList {
echo '<ul class="secondNavigation">';
#zavihek javna knjižnica
- echo '<li>';
- echo '<a class="no-img side-left'.(($_GET['t']=='javne_ankete'||$_GET['a']=='knjiznica')&& !isset($_GET['t']) ? ' active' : '').'"'
- .' href="index.php?a=knjiznica" title="'.$lang['srv_javna_knjiznica'].'">';
+ echo '<li class="'.(($_GET['t']=='javne_ankete'||$_GET['a']=='knjiznica')&& !isset($_GET['t']) ? ' active' : '').'">';
+ echo '<a href="index.php?a=knjiznica" title="'.$lang['srv_javna_knjiznica'].'">';
echo $lang['srv_javna_knjiznica'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
# Zavihek moja knjižnica
- echo '<li>';
- echo '<a class="no-img side-right'.($_GET['t'] == 'moje_ankete' ? ' active' : '').'"'
- .' href="index.php?a=knjiznica&t=moje_ankete" title="'.$lang['srv_moja_knjiznica'].'">';
+ echo '<li class="'.($_GET['t'] == 'moje_ankete' ? ' active' : '').'">';
+ echo '<a href="index.php?a=knjiznica&t=moje_ankete" title="'.$lang['srv_moja_knjiznica'].'">';
echo $lang['srv_moja_knjiznica'].'</a>';
echo '</li>';
@@ -402,75 +402,77 @@ class SurveyList {
echo '<ul class="secondNavigation">';
if ($admin_type == '0') {
+
#zavihek sistemske
- echo '<li>';
- echo '<a class="no-img side-left'.($tab=='system' || $tab == '' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=system" title="'.$lang['srv_settingsSystem'].'">';
+ echo '<li class="'.($tab=='system' || $tab == '' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=system" title="'.$lang['srv_settingsSystem'].'">';
echo $lang['srv_settingsSystem'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
+
# Zavihek ocenjevanje trajanja
- echo '<li>';
- echo '<a class="no-img'.($tab=='predvidenicasi' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=predvidenicasi" title="'.$lang['srv_testiranje_predvidenicas'].'">';
+ echo '<li class="'.($tab=='predvidenicasi' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=predvidenicasi" title="'.$lang['srv_testiranje_predvidenicas'].'">';
echo $lang['srv_testiranje_predvidenicas'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
- # Zavihek mape
- echo '<li>';
- echo '<a class="no-img'.($tab=='collectData' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=collectData" title="'.$lang['srv_collectData'].'">';
- echo $lang['srv_collectData'].'</a>';
- echo '</li>';
- echo '<li class="space"></li>';
+
# Zavihek lep url
- echo '<li>';
- echo '<a class="no-img'.($tab=='nice_links' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=nice_links" title="'.$lang['srv_nice_url'].'">';
+ echo '<li class="'.($tab=='nice_links' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=nice_links" title="'.$lang['srv_nice_url'].'">';
echo $lang['srv_nice_url'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
+
# ankete z administrativnim dostopom
- echo '<li>';
- echo '<a class="no-img'.($tab=='anketa_admin' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=anketa_admin" title="'.$lang['srv_anketa_admin'].'">';
+ echo '<li class="'.($tab=='anketa_admin' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=anketa_admin" title="'.$lang['srv_anketa_admin'].'">';
echo $lang['srv_anketa_admin'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
+
# zbrisane ankete
- echo '<li>';
- echo '<a class="no-img'.($tab=='anketa_deleted' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=anketa_deleted" title="'.$lang['srv_anketa_deleted'].'">';
+ echo '<li class="'.($tab=='anketa_deleted' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=anketa_deleted" title="'.$lang['srv_anketa_deleted'].'">';
echo $lang['srv_anketa_deleted'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
+
# Zbrisani podatki
- echo '<li>';
- echo '<a class="no-img'.($tab=='data_deleted' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=data_deleted" title="'.$lang['srv_data_deleted'].'">';
+ echo '<li class="'.($tab=='data_deleted' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=data_deleted" title="'.$lang['srv_data_deleted'].'">';
echo $lang['srv_data_deleted'].'</a>';
echo '</li>';
+
+ # Vprasajcki
+ echo '<li class="'.($tab=='help_settings' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=help_settings" title="'.$lang['help_settings'].'">';
+ echo $lang['help_settings'].'</a>';
+ echo '</li>';
}
-
- // nastavitve uporabnika
- if($admin_type == 0)
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img side-right'.($tab=='global_user_settings' ? ' active' : '').'"'
- .' href="index.php?a=nastavitve&amp;m=global_user_settings" title="'.$lang['srv_user_settings'].'">';
+
+ echo '<li class="'.($tab=='global_user_settings' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=global_user_settings" title="'.$lang['srv_user_settings'].'">';
echo $lang['srv_user_settings'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
-
+
// Moj profil
- echo '<li>';
- echo '<a class="no-img side-right' . ($tab == 'global_user_myProfile' ? ' active' : '') . '"' . ' href="index.php?a=nastavitve&amp;m=global_user_myProfile" title="' . $lang['edit_data'] . '">';
+ echo '<li class="'.($tab == 'global_user_myProfile' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=global_user_myProfile" title="' . $lang['edit_data'] . '">';
echo $lang['edit_data'] . '</a>';
echo '</li>';
-
+
echo '</ul>';
+
+ echo '<div class="separator"></div>';
+
+ // Arhiv sprememb
+ echo '<ul class="secondNavigationArchive">';
+
+ echo '<li class="'.($tab == 'global_user_ChangeArchive' ? ' active' : '').'">';
+ echo '<a href="index.php?a=nastavitve&amp;m=global_user_ChangeArchive" title="' . $lang['srv_survey_archives_tracking_archive'] . '">';
+ echo $lang['srv_survey_archives_tracking_archive'] . '</a>';
+ echo '</li>';
+
+ echo '</ul>';
+
+
+
}
#podnavigacija za obvestila
if(($_GET['a']=='obvestila')) {
@@ -478,20 +480,16 @@ class SurveyList {
echo '<ul class="secondNavigation">';
# prejeta obvestila
- echo '<li>';
- echo '<a class="no-img side-right'.(!isset($_GET['t']) ? ' active' : '').'"'
- .' href="index.php?a=obvestila" title="'.$lang['srv_notifications_recieved'].'">';
+ echo '<li class="'.(!isset($_GET['t']) ? ' active' : '').'">';
+ echo '<a href="index.php?a=obvestila" title="'.$lang['srv_notifications_recieved'].'">';
echo $lang['srv_notifications_recieved'].'</a>';
echo '</li>';
if ($admin_type == '0') {
-
- echo '<li class="space"></li>';
-
+
# poslana obvestila
- echo '<li>';
- echo '<a class="no-img side-left'.($_GET['t']=='sent' ? ' active' : '').'"'
- .' href="index.php?a=obvestila&amp;t=sent" title="'.$lang['srv_notifications_sent'].'">';
+ echo '<li class="'.($_GET['t']=='sent' ? ' active' : '').'">';
+ echo '<a href="index.php?a=obvestila&amp;t=sent" title="'.$lang['srv_notifications_sent'].'">';
echo $lang['srv_notifications_sent'].'</a>';
echo '</li>';
}
@@ -504,19 +502,15 @@ class SurveyList {
echo '<ul class="secondNavigation">';
# moja narocila
- echo '<li>';
- echo '<a class="no-img side-right'.(!isset($_GET['m']) ? ' active' : '').'"'
- .' href="index.php?a=narocila" title="'.$lang['srv_narocila_my'].'">';
+ echo '<li class="'.(!isset($_GET['m']) ? ' active' : '').'">';
+ echo '<a href="index.php?a=narocila" title="'.$lang['srv_narocila_my'].'">';
echo $lang['srv_narocila_my'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
# placila - samo admini
if ($admin_type == '0') {
- echo '<li>';
- echo '<a class="no-img side-right'.((isset($_GET['m']) && $_GET['m'] == 'placila') ? ' active' : '').'"'
- .' href="index.php?a=narocila&m=placila" title="'.$lang['srv_placila'].'">';
+ echo '<li class="'.((isset($_GET['m']) && $_GET['m'] == 'placila') ? ' active' : '').'">';
+ echo '<a href="index.php?a=narocila&m=placila" title="'.$lang['srv_placila'].'">';
echo $lang['srv_placila'].'</a>';
echo '</li>';
}
@@ -529,49 +523,35 @@ class SurveyList {
echo '<ul class="secondNavigation">';
// Nastavitve uporabnika
- echo '<li>';
- echo '<a class="no-img side-right'.(!isset($_GET['m']) || $_GET['m']=='gdpr_user' ? ' active' : '').'"'
- .' href="index.php?a=gdpr&amp;m=gdpr_user" title="'.$lang['srv_gdpr_user_settings'].'">';
+ echo '<li class="'.(!isset($_GET['m']) || $_GET['m']=='gdpr_user' ? ' active' : '').'">';
+ echo '<a href="index.php?a=gdpr&amp;m=gdpr_user" title="'.$lang['srv_gdpr_user_settings'].'">';
echo $lang['srv_gdpr_user_settings'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
// Seznam anket
- echo '<li>';
- echo '<a class="no-img side-right'.($_GET['m']=='gdpr_survey_list' ? ' active' : '').'"'
- .' href="index.php?a=gdpr&amp;m=gdpr_survey_list" title="'.$lang['srv_gdpr_survey_list'].'">';
+ echo '<li class="'.($_GET['m']=='gdpr_survey_list' ? ' active' : '').'">';
+ echo '<a href="index.php?a=gdpr&amp;m=gdpr_survey_list" title="'.$lang['srv_gdpr_survey_list'].'">';
echo $lang['srv_gdpr_survey_list'].'</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
// DPA
- echo '<li>';
- echo '<a class="no-img side-right'.($_GET['m']=='gdpr_dpa' ? ' active' : '').'"'
- .' href="index.php?a=gdpr&amp;m=gdpr_dpa" title="'.$lang['srv_gdpr_dpa'].'">';
+ echo '<li class="'.($_GET['m']=='gdpr_dpa' ? ' active' : '').'">';
+ echo '<a href="index.php?a=gdpr&amp;m=gdpr_dpa" title="'.$lang['srv_gdpr_dpa'].'">';
echo $lang['srv_gdpr_dpa'].'</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
// Zahteve za izbris
- echo '<li>';
+ echo '<li class="'.($_GET['m']=='gdpr_requests' ? ' active' : '').'">';
$request_counter = GDPR::countUserUnfinishedRequests();
$request_counter_text = ($request_counter > 0) ? ' <sup class="red" style="vertical-align: top;">('.$request_counter.')</sup>' : '';
- echo '<a class="no-img side-right'.($_GET['m']=='gdpr_requests' ? ' active' : '').'"'
- .' href="index.php?a=gdpr&amp;m=gdpr_requests" title="'.$lang['srv_gdpr_requests'].'">';
+ echo '<a href="index.php?a=gdpr&amp;m=gdpr_requests" title="'.$lang['srv_gdpr_requests'].'">';
echo $lang['srv_gdpr_requests'].$request_counter_text.'</a>';
echo '</li>';
// Vse zahteve za izbris - samo ADMINI
- if($admin_type == '0'){
-
- echo '<li class="space"></li>';
-
- echo '<li>';
- echo '<a class="no-img side-right'.($_GET['m']=='gdpr_requests_all' ? ' active' : '').'"'
- .' href="index.php?a=gdpr&amp;m=gdpr_requests_all" title="'.$lang['srv_gdpr_requests_all'].'">';
+ if($admin_type == '0'){
+ echo '<li class="'.($_GET['m']=='gdpr_requests_all' ? ' active' : '').'">';
+ echo '<a href="index.php?a=gdpr&amp;m=gdpr_requests_all" title="'.$lang['srv_gdpr_requests_all'].'">';
echo $lang['srv_gdpr_requests_all'].'</a>';
echo '</li>';
}
@@ -582,36 +562,29 @@ class SurveyList {
echo '<ul class="secondNavigation">';
# Izvozi za ul evalvacijo
- echo '<li>';
- echo '<a class="no-img side-right'.((!isset($_GET['t']) || $_GET['t'] == 'export') ? ' active' : '').'"'
- .' href="index.php?a=ul_evalvation" title="Izvozi">';
+ echo '<li class="'.((!isset($_GET['t']) || $_GET['t'] == 'export') ? ' active' : '').'">';
+ echo '<a href="index.php?a=ul_evalvation" title="Izvozi">';
echo 'Izvozi</a>';
echo '</li>';
if ($admin_type == 0) {
- echo '<li class="space"></li>';
-
+
# Uvozi - samo admini
- echo '<li>';
- echo '<a class="no-img side-left'.($_GET['t']=='import' ? ' active' : '').'"'
- .' href="index.php?a=ul_evalvation&amp;t=import" title="Uvozi">';
+ echo '<li class="'.($_GET['t']=='import' ? ' active' : '').'">';
+ echo '<a href="index.php?a=ul_evalvation&amp;t=import" title="Uvozi">';
echo 'Uvozi</a>';
echo '</li>';
- echo '<li class="space"></li>';
-
# Testiranje - samo admini
- echo '<li>';
- echo '<a class="no-img side-left'.($_GET['t']=='test' ? ' active' : '').'" href="index.php?a=ul_evalvation&amp;t=test" title="Testiranje">';
+ echo '<li class="'.($_GET['t']=='test' ? ' active' : '').'">';
+ echo '<a href="index.php?a=ul_evalvation&amp;t=test" title="Testiranje">';
echo 'Testiranje</a>';
echo '</li>';
-
- echo '<li class="space"></li>';
-
+
# GC - samo admini
- echo '<li>';
- echo '<a class="no-img side-left'.($_GET['t']=='gc' ? ' active' : '').'" href="index.php?a=ul_evalvation&amp;t=gc" title="GC">';
+ echo '<li class="'.($_GET['t']=='gc' ? ' active' : '').'">';
+ echo '<a href="index.php?a=ul_evalvation&amp;t=gc" title="GC">';
echo 'GC</a>';
echo '</li>';
}
@@ -620,9 +593,10 @@ class SurveyList {
}
echo '<div id="secondNavigation_links"></div>'; # id="secondNavigation_links"
+
+ $this->language_change();
+
echo '</div>'; #<div class="secondNavigation" >
-
- $this->language_change();
}
/**
@@ -687,22 +661,25 @@ class SurveyList {
$css_1 = 'off';
$css_10 = 'on';
}
+ if ($_GET['a'] == 'kolektor') {
+ $css_1 = 'off';
+ $css_11 = 'on';
+ }
echo '<div id="firstNavigation" class="frontpage">';
- echo '<ol class="smaller left-side left-1ka">';
- echo '<li class="moja1ka">';
+ echo '<ol class="navigation_buttons_list">';
+
+ echo '<li class="moja1ka active_'.$css_1.'">';
echo '<a href="index.php?a=pregledovanje" title="' . $lang['srv_pregledovanje'] . '">';
- echo '<div class="smaller-singlebutton-'.$css_1.'">'. $lang['srv_pregledovanje'] . '</div>';
+ echo '<div class="smaller-singlebutton-'.$css_1.'"><span class="faicon clipboard_notes"></span>'. $lang['srv_pregledovanje'] . '</div>';
echo '</a>';
echo '</li>';
$SLCountPhoneSurvey = $this->countPhoneSurveys();
if ($SLCountPhoneSurvey > 0 && $admin_type != '0') {
- #echo '<li class="spaceLarge">&nbsp;</li>';
- echo '<li class="spaceBig">&nbsp;</li>';
- echo '<li>';
+ echo '<li class="active_'.$css_6.'">';
echo '<a href="index.php?a=phoneSurveys" title="' . $lang['srv_telephone_surveys'] . '">';
echo '<div class="smaller-singlebutton-'.$css_6.'">' . $lang['srv_telephone_surveys'] . '</div>';
echo '</a>';
@@ -712,9 +689,7 @@ class SurveyList {
$SLCount = $this->countSurveys();
if ($SLCount > 0 && $admin_type <= 1) {
- #echo '<li class="spaceLarge">&nbsp;</li>';
- echo '<li class="spaceBig">&nbsp;</li>';
- echo '<li>';
+ echo '<li class="active_'.$css_2.'">';
echo '<a href="index.php?a=diagnostics" title="' . $lang['srv_diagnostics'] . '">';
echo '<div class="smaller-singlebutton-'.$css_2.'">'. $lang['srv_diagnostics'] . '</div>';
echo '</a>';
@@ -724,47 +699,30 @@ class SurveyList {
# uporabniki
if ($admin_type <= 1 /*or true*/) {
# ni smiselno da ostali uporabniki vidijo zavihek, ker so tako prikazane samo njihove ankete
- echo '<li class="spaceBig">&nbsp;</li>';
- echo '<li>';
+ echo '<li class="active_'.$css_5.'">';
echo '<a href="index.php?a=diagnostics&t=uporabniki" title="' . $lang['hour_users'] . '">';
echo '<div class="smaller-singlebutton-'.$css_5.'">'. $lang['hour_users'] . '</div>';
echo '</a>';
echo '</li>';
}
- echo '<li class="spaceBig">&nbsp;</li>';
- echo '<li>';
+
+ // Knjiznica
+ echo '<li class="active_'.$css_3.'">';
echo '<a href="index.php?a=knjiznica" title="' . $lang['srv_library'] . '">';
echo '<div class="smaller-singlebutton-'.$css_3.'">'. $lang['srv_library'] . '</div>';
echo '</a>';
echo '</li>';
- # Nastavitve
- //if ($admin_type == 0) {
- echo '<li class="spaceBig">&nbsp;</li>';
-
- echo '<li>';
- echo '<a href="index.php?a=nastavitve'.($admin_type != 0 ? '&m=global_user_settings' : '').'" title="' . $lang['settings'] . '">';
- echo '<div class="smaller-singlebutton-'.$css_4.'">' . $lang['settings'] . '</div>';
- echo '</a>';
- echo '</li>';
- //}
-
- # Streznik
- if ($admin_type == 0 && false) {
- echo '<li class="spaceBig">&nbsp;</li>';
-
- echo '<li>';
- echo '<a href="http://www.1ka.si/SAR/" title="'.$lang['srv_sar'].'" target="_blank">';
- echo '<div class="smaller-singlebutton-off">'/*<span class="sprites streznik_off"></span>'*/.$lang['srv_sar'].'</div>';
- echo '</a>';
- echo '</li>';
- }
+ // Nastavitve
+ echo '<li class="active_'.$css_4.'">';
+ echo '<a href="index.php?a=nastavitve'.($admin_type != 0 ? '&m=global_user_settings' : '').'" title="' . $lang['settings'] . '">';
+ echo '<div class="smaller-singlebutton-'.$css_4.'">' . $lang['settings'] . '</div>';
+ echo '</a>';
+ echo '</li>';
# Obvestila - zaenkrat samo admin
if ($admin_type == 0) {
- echo '<li class="spaceBig">&nbsp;</li>';
-
- echo '<li>';
+ echo '<li class="active_'.$css_7.'">';
echo '<a href="index.php?a=obvestila'.($admin_type == 0 ? '&t=sent' : '').'" title="' . $lang['srv_notifications'] . '">';
echo '<div class="smaller-singlebutton-'.$css_7.'">'.$lang['srv_notifications'].'</div>';
echo '</a>';
@@ -772,11 +730,8 @@ class SurveyList {
}
# Narocila - samo ce imamo vklopljene pakete
- global $app_settings;
- if($app_settings['commercial_packages']){
- echo '<li class="spaceBig">&nbsp;</li>';
-
- echo '<li>';
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
+ echo '<li class="active_'.$css_10.'">';
echo '<a href="index.php?a=narocila" title="' . $lang['srv_narocila'] . '">';
echo '<div class="smaller-singlebutton-'.$css_10.'">'.$lang['srv_narocila'].'</div>';
echo '</a>';
@@ -784,9 +739,7 @@ class SurveyList {
}
# GDPR
- echo '<li class="spaceBig">&nbsp;</li>';
-
- echo '<li>';
+ echo '<li class="active_'.$css_9.'">';
$request_counter = GDPR::countUserUnfinishedRequests();
$request_counter_text = (true) ? ' <sup class="red" style="vertical-align: baseline; position: relative; top: -0.4em;">('.$request_counter.')</sup>' : '';
echo '<a href="index.php?a=gdpr'.($request_counter > 0 ? '&m=gdpr_requests' : '').'" title="' . $lang['srv_gdpr_settings'] . '">';
@@ -796,14 +749,21 @@ class SurveyList {
# UL evalvacija razne nastavitve, uvozi, izvozi - samo na anketa.uni-lj.si/student (zaenkrat samo admin)
if (Common::checkModule('evalvacija') == '1' && $admin_type == 0) {
- echo '<li class="spaceBig">&nbsp;</li>';
-
- echo '<li>';
+ echo '<li class="active_'.$css_8.'">';
echo '<a href="index.php?a=ul_evalvation" title="UL evalvacije">';
echo '<div class="smaller-singlebutton-'.$css_8.'">UL evalvacije</div>';
echo '</a>';
echo '</li>';
}
+
+ # kolektor modul - samo na njihovi instalaciji
+ if (Common::checkModule('kolektor') == '1') {
+ echo '<li class="active_'.$css_11.'">';
+ echo '<a href="index.php?a=kolektor" title="Kolektor">';
+ echo '<div class="smaller-singlebutton-'.$css_11.'">Kolektor</div>';
+ echo '</a>';
+ echo '</li>';
+ }
echo '</ol>';
@@ -834,7 +794,7 @@ class SurveyList {
break;
}
- echo '<ol class="smaller left-side help-1ka" >';
+ echo '<ol class="help-1ka">';
echo ' <li>';
echo ' <a href="'.$help_url.'" title="'.$lang['srv_settings_help'].'" target="_blank" >';
echo ' <div class="smaller-singlebutton-off">'.$lang['srv_settings_help'].'</div>';
@@ -952,252 +912,135 @@ class SurveyList {
public function getSurveys() {
global $global_user_id;
global $lang;
-
- // ali imamo star napreden vmesnik za moje ankete
- $advancedMySurveys = UserSetting::getInstance()->getUserSetting('advancedMySurveys');
-
- // Nastavitve zgoraj - nekatere niso prikazane pri searchu
+
+
+ // Gumba za ustvarjanje ankete - nekatere niso prikazane pri searchu
if($this->isSearch != 1){
- // Gumb za ustvarjanje ankete
- echo '<div id="anketa_new_float">';
- $this->new_anketa_div();
- echo '</div>';
-
- // Paginacija
- echo '<div id="pagination">';
- $this->displayPagiantion();
- echo '</div>';
+ // Gumb za ustvarjanje ankete
+ if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
+ /*echo '<div class="first_line">';
+ $this->new_anketa_div();
+ echo '</div>';*/
+ }
+ else{
+ echo '<div class="first_line">';
+ $this->new_anketa_div();
+ echo '</div>';
+ }
}
- // Sort gumb - samo v novem vmesniku
- if($advancedMySurveys != 1 && $this->onlyPhone == false){
- echo '<div id="sortButton">';
- $this->displaySortButton();
- echo '</div>';
- }
-
- // Gumb za filtriranje - samo v novem vmesniku
- //if($this->g_adminType <= 1){
- if($advancedMySurveys != 1 && $this->onlyPhone == false){
- //echo '<div id="filterButton">';
- $this->displayFilterButton();
- //echo '</div>';
- }
-
- // Preklop na pogled s folderji (samo ce imamo nov vmesnik)
- if($this->isSearch != 1){
- if($advancedMySurveys != 1 && $this->onlyPhone == false){
- //echo '<div id="folderSwitch">';
- $this->displayFolderSwitch();
- //echo '</div>';
- }
- }
-
- // Nastavitve zgoraj - nekatere niso prikazane pri searchu
+
+ // Druga vrstica - filtri in iskanje
+ echo '<div class="second_line '.($this->isSearch == 1 ? 'advanced_search' : '').'">';
+
+ // Nastavitve zgoraj - nekatere niso prikazane pri searchu
if($this->isSearch != 1){
- // Gumb z nastavitvami pogleda - za star vmesnik
- if ($this->onlyPhone == false && $advancedMySurveys == 1){
- $this->displaySettingsUrl();
- }
// Okno za search po mojeih anketah
echo '<div id="searchMySurveys">';
$this->displaySearch();
echo '</div>';
- }
-
- // Izris seznama anket - star oz. nov design
- if($advancedMySurveys == 1){
- $this->displaySurveyList();
- }
- else{
- if($this->show_folders == 1 && $this->isSearch != 1){
-
- // Info box za posamezno anketo (hover)
- echo '<div id="survey_list_info"></div>';
-
- echo '<div class="clr"></div>';
-
- // Loop po vseh folderjih prvega nivoja - samo na prvi strani
- if($this->pageno == 1){
- // Plus za dodajanje folderja
- echo '<div style="margin: 15px 0 -15px 0"><a style="vertical-align:0px; line-height:18px;" href="#" title="'.$lang['srv_mySurvey_create_folder'].'" onClick="create_folder(\''.$folder['id'].'\'); return false;">';
- echo '<span style="vertical-align:middle;" class="faicon add icon-blue-hover-orange pointer"></span> <span style="vertical-align:middle;" class="bold">'.$lang['srv_mySurvey_create_folder'].'</span>';
- echo '</a></div>';
-
- $sql = sisplet_query("SELECT * FROM srv_mysurvey_folder WHERE usr_id='$global_user_id' AND parent='0' ORDER BY naslov ASC");
- if(mysqli_num_rows($sql) > 0) {
- while($row = mysqli_fetch_array($sql)){
- echo '<div id="folder_holder_'.$row['id'].'" class="folder_holder level1">';
- $this->displayNewFolder($row);
- echo '</div>';
- }
- }
- }
-
- // Na koncu se izpisemo ankete ki niso v nobenem folderju
- $row = array('id'=>0, 'naslov'=>$lang['srv_mySurvey_unallocated']);
- echo '<div id="folder_holder_0" class="folder_holder level1">';
- $this->displayNewFolder($row);
- echo '</div>';
-
- echo '<script type="text/javascript">surveyList_folder_init();</script>';
- }
- // Ce ne prikazujemo map je vse po starem
- else{
- // Info box za posamezno anketo (hover)
- echo '<div id="survey_list_info"></div>';
-
- echo '<div id="div_sl_new_-1" class="div_sl_new">';
- $this->displayNewSurveyList($folder=-1);
- echo '</div>';
- }
-
- // Paginacija - se na dnu - ni prikazana pri searchu
- if($this->isSearch != 1){
- echo '<div id="pagination" class="bottom">';
- $this->displayPagiantion();
- echo '</div><br /><br />';
- }
- }
- }
-
- function displaySurveyList() {
- global $lang;
-
- if ($this->onlyPhone == true) {
- $this->settingsArray = array();
- # prikažemo samo naslov
- $this->settingsArray['naslov'] = $this->dataFields[1];;
- echo '<input type="hidden" id="onlyPhone" name="onlyPhone" value="1">';
- }
-
- echo '<div id="div_sl">';
- if ( SRV_LIST_GET_AS_LIST == true) {
- echo '<br class="clr" />';
- // labelo za aktivno, in knji?nico popravimo kar ro?no - nardimo slikice
- $lang['srv_h_sl_active_1'] = '<span class="faicon star_on" title="'.$lang['srv_anketa_active'].'"></span>';
- $lang['srv_h_sl_delete_1'] = '';
- $lang['srv_h_sl_lib_glb_1'] = '<span class="sprites library_admin_on" title="'.$lang['srv_ank_lib_on'].'"></span>';
- $lang['srv_h_sl_lib_usr_1'] = '<span class="sprites library_on" title="'.$lang['srv_ank_mylib_on'].'"></span>';
- $ankete = $this->getSurveysAsList();
-
- echo '<input type="hidden" id="sortby" value="'.(isset($_POST['sortby']) ? $_POST['sortby'] : null).'">';
- echo '<input type="hidden" id="sorttype" value="'.(isset($_POST['sorttype']) ? $_POST['sorttype'] : null).'">';
-
- echo '<ul id="surveyList" >';
- // izpi?emo header celice
- echo '<li class="sl_header">';
- $grupaName = "";
- $groupWidths = array();
-
- if (count($this->settingsArray) > 0 ){
- foreach ( $this->settingsArray as $opcija ) {
- if ($opcija['visible'] == 1) {
- // preverimo ali smo zaklju?ili prej?njo grupo
- if ((!isset($opcija['header_grupa']) && $grupaName != "") || // nismo ve? v grupi stara ?e obstaja
- ( isset($opcija['header_grupa']) && $grupaName != "" && $opcija['header_grupa'] != $grupaName)) { // smo v grupi ampak ime ni enako prej?njemu
- echo '<div class="clr"></div>';
- echo '</div>';
- echo '</div>';
- $grupaName = "";
- }
- // preverimo ali naredimo novo grupo (Vnesel / urejal)
- if (isset($opcija['header_grupa']) && $grupaName == "") { // smo v grupi polj pod in imamo podpolja: ime priimek, email, datum
- // imamo za?etek grupe nari?emo ?tartne dive
- echo '<div id="'.$opcija['header_grupa'].'_holder" class="floatLeft" style="padding:0px; margin:0px; border:none; height:100%;">';
- echo '<div id="'.$opcija['header_grupa'].'_title" style="height:26px; /*border-bottom: 1px solid #C2D2C9;*/ padding:0px; margin:0px; /*border-right:1px solid #C2D2C9;*/">';
- echo '<div id="'.$opcija['header_grupa'].'" class="floatLeft anl_ac" style="border:none;">'.$lang['srv_'.$opcija['header_grupa']].'</div>';
- // nastavimo sirino grupe na 0
- $groupWidths[$opcija['header_grupa']] = 0;
- echo '<div class="clr"></div>';
- echo '</div>';
- echo '<div style="height:26px;padding:0px; margin:0px; border:none;">';
- $grupaName = $opcija['header_grupa'];
- }
- echo '<div id="h_'.$opcija['header_field'].'" class="floatLeft sl_header_field '.$opcija['header_field'].' anl_ac" baseCss="'.$opcija['header_field'].'">'
- . $this->createOrderUrl( $opcija['id'], (isset($opcija['lang_label']) ? $lang['srv_h_'.$opcija['lang_label']] : $lang['srv_h_'.$opcija['header_field']] ) )
- . '</div>';
- }
- flush(); @ob_flush();
- }
- }
- // na koncu ?e preverimo ali imamo kon?ano grupo ?ene nardimo zaklju?na diva
- if ($grupaName != "") {
- echo '<div class="clr"></div>';
- echo '</div>';
- echo '</div>';
- $grupaName = "";
- }
- echo '</li>';
- $cnt = 1;
- if (count($ankete)) {
- foreach ( $ankete as $anketa ) {
- $eavenOdd = $cnt&1;
- $cnt++;
- $anketa_answers_cnt = $anketa['answers'];
- $anketa_is_active = $anketa['active'];
- $anketa_is_copy = isset($anketa['insert_uid']) && $anketa['insert_uid'] == -1 ? true : false;
- $anketa_i_uid= isset($anketa['insert_uid']) ? $anketa['insert_uid'] : null;
- $anketa_e_uid= isset($anketa['edit_uid']) ? $anketa['edit_uid'] : null;
- $anketa_canEdit= $anketa['canEdit'];
- echo '<li id="anketa_list_'.$anketa['id'].'" class="sl_bck_'.$eavenOdd.'">';
- // za vsako vidno polje za header izpi?emopodatek
- foreach ( $this->settingsArray as $opcija ) {
-
- if (isset($opcija['visible']) && $opcija['visible'] == 1) {
- echo '<div class="floatLeft '.$opcija['header_field'].' '.(isset($opcija['data_css']) ? $opcija['data_css'] : null).' sl_bck_br_'.$eavenOdd.'" title="'.$anketa[$opcija['data_field']].'" >';
- if (isset($opcija['data_type'])) {
- $this->echoText($anketa[$opcija['data_field']], $opcija['data_type'], $anketa['id'], array('answers_cnt'=>$anketa_answers_cnt, 'is_active'=>$anketa_is_active, 'anketa_is_copy'=>$anketa_is_copy, 'anketa_i_uid'=>$anketa_i_uid, 'anketa_e_uid'=>$anketa_e_uid,'anketa_canEdit'=>$anketa_canEdit));
- } else {
- $this->echoText($anketa[$opcija['data_field']], 'text', $anketa['id'], array('answers_cnt'=>$anketa_answers_cnt, 'is_active'=>$anketa_is_active, 'anketa_is_copy'=>$anketa_is_copy, 'anketa_i_uid'=>$anketa_i_uid, 'anketa_e_uid'=>$anketa_e_uid,'anketa_canEdit'=>$anketa_canEdit));
- }
- echo '</div>';
- }
- }
- echo '</li>';
- }
- }
- echo '</ul>';
- // izpi?emo javascript za resizable
- echo '<script type="text/javascript">';
- echo '$(document).ready(function() {';
- // echo '$().ready(function() {';
- foreach ( $this->settingsArray as $opcija ) {
- if ($opcija['visible'] == 1) {
- echo '$("#h_'.$opcija['header_field'].'").resizable({handles:"e", alsoResize: "'.$opcija['alsoResize'].'"'.
- (isset($opcija['minWidth'])?', minWidth: '.$opcija['minWidth']:'').(isset($opcija['maxWidth'])?', maxWidth: '.$opcija['maxWidth']:'').
- ', stop: function(event, ui) { save_surveyListCssSettings(event, ui); }'.'});';
- }
- }
+ // Paginacija
+ echo '<div class="pagination top">';
+ $this->displayPagiantion();
+ echo '</div>';
- // ponastavimo ?irine celic z JS
- $css_data = $this->getCssSetings();
- if (isset($css_data) && count($css_data)>0) {
- foreach ($css_data as $css_key => $css) {
- echo '$(".'.$css_key.'").width('.$css.');';
- }
- }
-
- // prika?emo seznam
- echo '$("#surveyList").show();';
- // header title priredimo sirino
+ // Filtri na desni
+ if($this->onlyPhone == false){
- foreach ( $groupWidths as $grupa => $widths ) {
- //echo '$("#'.$grupa.'").css( { "width": ($("#'.$grupa.'_holder").width()-5)+"px"});';
- // chrome bux fix --mitja
- echo '$("#'.$grupa.'").css( { "width": "100%"});';
- }
- echo '});';
- echo '</script>';
+ echo '<div class="filters">';
+
+ // Preklop na pogled s folderji (samo ce imamo nov vmesnik)
+ //echo '<div id="folderSwitch">';
+ $this->displayFolderSwitch();
+ //echo '</div>';
+
+ // Gumb za filtriranje
+ //echo '<div id="filterButton">';
+ $this->displayFilterButton();
+ //echo '</div>';
+
+ // Gumb za sortiranje
+ echo '<div id="sortButton">';
+ $this->displaySortButton();
+ echo '</div>';
+
+ echo '</div>';
+ }
}
+ else{
+ // Okno z nastavitvami searcha
+ echo '<div id="searchSettings">';
+ $this->displaySearchSettings();
+ echo '</div>';
+ }
+
+ echo '</div>';
+
- echo '</div>'; // id="div_sl"
-
- }
+ // Izris seznama anket
+ if($this->show_folders == 1 && $this->isSearch != 1){
+
+ echo '<div class="div_sl_new folders">';
+ // Loop po vseh folderjih prvega nivoja - samo na prvi strani
+ if($this->pageno == 1){
+
+ // Plus za dodajanje folderja
+ echo '<div class="folder_add_first"><a href="#" title="'.$lang['srv_mySurvey_create_folder'].'" onClick="create_folder(\''.(isset($folder['id'])?$folder['id']:0).'\'); return false;">';
+ echo ' <span class="faicon add"></span><span>'.$lang['srv_mySurvey_create_folder'].'</span>';
+ echo '</a></div>';
+
+ $sql = sisplet_query("SELECT * FROM srv_mysurvey_folder WHERE usr_id='$global_user_id' AND parent='0' ORDER BY naslov ASC");
+ if(mysqli_num_rows($sql) > 0) {
+ while($row = mysqli_fetch_array($sql)){
+ echo '<div id="folder_holder_'.$row['id'].'" class="folder_holder level1">';
+ $this->displayNewFolder($row);
+ echo '</div>';
+ }
+ }
+ }
+
+ // Na koncu se izpisemo ankete ki niso v nobenem folderju
+ $row = array('id'=>0, 'naslov'=>$lang['srv_mySurvey_unallocated']);
+ echo '<div id="folder_holder_0" class="folder_holder level1">';
+ $this->displayNewFolder($row);
+ echo '</div>';
+
+ echo '<script type="text/javascript">surveyList_folder_init();</script>';
+
+ echo '</div>';
+ }
+ // Ce ne prikazujemo map je vse po starem
+ else{
+
+ echo '<div class="div_sl_new">';
+ $this->displayNewSurveyList($folder=-1);
+ echo '</div>';
+ }
+
+ // Paginacija - se na dnu - ni prikazana pri searchu
+ if($this->isSearch != 1){
+ echo '<div class="pagination_bottom_holder">';
+ echo ' <div class="pagination bottom">';
+ $this->displayPagiantion();
+ echo ' </div>';
+ echo '</div>';
+ }
+
+ // Klik izven "Vec" - zapremo okno
+ echo '<script>
+ $(document).mouseup(function(e){
+ var container = $(".survey_other_box, .dots");
+
+ if (!container.is(e.target) && container.has(e.target).length === 0){
+ $(".survey_other_box").addClass("displayNone");
+ }
+ });
+ </script>';
+ }
/** Kreacija nove ankete
*/
@@ -1206,14 +1049,20 @@ class SurveyList {
global $admin_type;
global $site_url;
- echo '<span id="buttonCreate" class="floatLeft"><a href="' . $site_url . 'admin/survey/index.php?a=ustvari_anketo" title="' . $lang['srv_create_survey'] . '">';
+ echo '<a href="'.$site_url.'admin/survey/index.php?a=ustvari_anketo" title="'.$lang['srv_create_survey'].'">';
+ echo ' <button class="large blue button_create">';
echo $lang['srv_create_survey'];
- echo '</a></span>';
+ echo ' </button>';
+ echo '</a>';
// uporabniki z vklopljeno moznostjo imajo tudi hitro ustvarjanje ankete (brez vnosa imena in izbire skina)
$oneclickCreateMySurveys = UserSetting::getInstance()->getUserSetting('oneclickCreateMySurveys');
if ($oneclickCreateMySurveys == 1) {
- echo '<span class="floatLeft" style="margin:10px 0 0 20px; font-weight:600;"><a style="vertical-align:0px; line-height:18px;" href="#" onclick="newAnketaBlank();" title="' . $lang['one_click_create'] . '"><span style="vertical-align:top;" class="faicon add icon-blue-hover-orange"></span> <span>'.$lang['one_click_create'].'</span></a>';
+ echo '<div class="button_quick_create">';
+ echo ' <a href="#" onclick="newAnketaBlank();" title="'.$lang['one_click_create'].'">';
+ echo ' <span class="faicon add"></span><span>'.$lang['one_click_create'].'</span>';
+ echo ' </a>';
+ echo '</div>';
}
}
@@ -1225,16 +1074,7 @@ class SurveyList {
if (SRV_LIST_GET_AS_LIST == true) {
$ankete = $this->getSurveysAsListNew($folder);
-
- // Ce searchamo izrisemo napredne nastavitve za search
- if($this->isSearch == 1){
- echo '<div id="searchSettings">';
- $this->displaySearchSettings();
- echo '</div>';
-
- echo '<div class="clr"></div>';
- }
-
+
echo '<input type="hidden" id="sortby" value="'.(isset($_POST['sortby']) ? $_POST['sortby'] : null).'">';
echo '<input type="hidden" id="sorttype" value="'.(isset($_POST['sorttype']) ? $_POST['sorttype'] : null).'">';
@@ -1265,80 +1105,48 @@ class SurveyList {
// HEADER VRSTICA
echo '<tr class="sl_header_new">';
-
- // Info ikona
- echo '<td class="col1">';
- echo '</td>';
-
- // Tip ankete (forma, navadna, glasovanje)
- //echo '<td class="col2"></td>';
- // Aktivnost ankete
- echo '<td class="col2"></td>';
-
+
// Naslov
- echo '<td class="col3">';
+ echo '<td class="col1">';
echo $this->createOrderUrlNew(1, $lang['title']);
echo '</td>';
// Trajanje - status
- echo '<td class="col4">';
+ echo '<td class="col2">';
echo $this->createOrderUrlNew(18, 'Status');
echo '</td>';
- // Tip + st. vprasanj
- echo '<td class="col5">';
- echo '';
- echo $this->createOrderUrlNew(19, $lang['srv_tip']);
+ // Ustvarjeno
+ echo '<td class="col3">';
+ echo $this->createOrderUrlNew(10, $lang['srv_created']);
echo '</td>';
// Zadnji vnos
- echo '<td class="col6">';
+ echo '<td class="col4">';
echo $this->createOrderUrlNew(16, $lang['srv_last_insrt']);
echo '</td>';
// Sprememba
- echo '<td class="col7">';
+ echo '<td class="col5">';
echo $this->createOrderUrlNew(14, $lang['change']);
echo '</td>';
- // Ikona1
- echo '<td class="col8"></td>';
-
- // Ikona2
- echo '<td class="col9"></td>';
-
+ // Ostalo
+ echo '<td class="col6">';
+ echo $lang['more2'];
+ echo '</td>';
+
echo '</tr>';
// VRSTICE Z ANKETAMI
foreach ( $ankete as $anketa ) {
- echo '<tr id="anketa_list_'.$anketa['id'].'" class="anketa_list '.($this->show_folders == 1 ? ' mySurvey_draggable' : '').'" anketa_id="'.$anketa['id'].'">';
-
- // Info ikona
- echo '<td class="col1">';
- //var_dump($anketa);
- echo '<span id="info_icon_'.$anketa['id'].'" anketa="'.$anketa['id'].'" class="faicon info icon-as_link pointer icon-center" title="'.$lang['srv_survey_info'].'" onClick="surveyList_info(\''.$anketa['id'].'\');"></span>';
- echo '</td>';
-
- // Aktivnost - neaktivna, aktivna, zakljucena
- echo '<td class="col2">';
- if ($anketa['active'] == 1) {
- echo '<div class="dot blue" title="'.$lang['srv_anketa_active2'].'"></div>';
- } else {
- $sqlA = sisplet_query("SELECT sid FROM srv_activity WHERE sid='".$anketa['id']."'");
- if (mysqli_num_rows($sqlA) > 0) {
- # anketa je zaključena
- echo '<div class="dot grey" title="'.$lang['srv_survey_non_active'].'"></div>';
- } else {
- # anketa je neaktivna
- echo '<div class="dot grey" title="'.$lang['srv_survey_non_active_notActivated'].'"></div>';
- }
- }
- echo '</td>';
-
+ echo '<tr id="anketa_list_'.$anketa['id'].'" class="anketa_list '.($this->show_folders == 1 ? ' mySurvey_draggable' : '').'" anketa_id="'.$anketa['id'].'">';
+
// Naslov
- echo '<td class="col3">';
+ echo '<td class="col1">';
+
if(strlen($anketa['naslov']) > 60)
$text = substr($anketa['naslov'],0,60);
else
@@ -1352,133 +1160,199 @@ class SurveyList {
// Pobarvamo najden niz v naslovu ankete
preg_match_all("/$search_word+/i", $text_searched, $matches);
if (is_array($matches[0]) && count($matches[0]) >= 1) {
- foreach ($matches[0] as $match) {
- $text_searched = str_replace($match, '<span class="red">'.$match.'</span>', $text_searched);
- }
+
+ // Drugace vcasih pobrise presledek, ne vem kako drugace resit:)
+ $text_searched = str_replace(' ', '&nbsp;', $text_searched);
+
+ $text_searched = str_replace($matches[0][0], '<span class="red">'.$matches[0][0].'</span>', $text_searched);
}
}
}
- echo '<a href="'.$site_url.'admin/survey/index.php?anketa='.$anketa['id'].'&a='.A_REDIRECTLINK.'" title="'.$text.'">';
- echo '<span class="title">'.$text_searched.'</span>';
- echo '</a>';
+ // Zgornja vrstica
+ echo '<div class="top_line">';
+ echo ' <a href="'.$site_url.'admin/survey/index.php?anketa='.$anketa['id'].'&a='.A_REDIRECTLINK.'" title="'.$text.'">'.$text_searched.'</a>';
+ echo '</div>';
- $i_time = substr($anketa['i_time'], 0, 8);
- $i_time = explode('.', $i_time);
- echo '<br /><span class="small">';
+ // Spodnja vrstica
+ echo '<div class="bottom_line">';
+
if($anketa['mobile_created'] == '1')
echo '<span class="red spaceRight pointer" title="'.$lang['srv_mobile_survey'].'">M</span>';
- // Ce gre za search moramo ustrezno pobarvati najden del besede
- $name_searched = $anketa['i_name'];
- $surname_searched = $anketa['i_surname'];
- if($this->isSearch == 1 && $this->searchSettings['stype'] == '1'){
- foreach($this->searchStringProcessed as $search_word){
-
- // Pobarvamo najden niz v imenu
- preg_match_all("/$search_word+/i", $name_searched, $matches);
- if (is_array($matches[0]) && count($matches[0]) >= 1) {
- foreach ($matches[0] as $match) {
- $name_searched = str_replace($match, '<span class="red">'.$match.'</span>', $name_searched);
- }
- }
-
- // Pobarvamo najden niz v priimku
- preg_match_all("/$search_word+/i", $surname_searched, $matches);
- if (is_array($matches[0]) && count($matches[0]) >= 1) {
- foreach ($matches[0] as $match) {
- $surname_searched = str_replace($match, '<span class="red">'.$match.'</span>', $surname_searched);
- }
- }
- }
- }
- echo $lang['srv_h_sl_avtor'].': '.$name_searched.' '.$surname_searched.', '.$i_time[0].'.'.$i_time[1].'.20'.$i_time[2].'</span>';
+
+ if($anketa['survey_type'] == 0)
+ echo $lang['srv_vrsta_survey_type_0'];
+ elseif($anketa['survey_type'] == 1)
+ echo $lang['srv_vrsta_survey_type_1'];
+ elseif(SurveyInfo::checkSurveyModule('hierarhija', $anketa['id']))
+ echo $lang['srv_vrsta_survey_type_10'];
+ else
+ echo $lang['srv_vrsta_survey_type_2'];
+
+ echo ', '.$lang['srv_h_sl_stvprasanj'].': '. $anketa['variables'];
+ echo '</div>';
+
echo '</td>';
+
// Trajanje - status
- echo '<td class="col4">';
+ echo '<td class="col2">';
+
if ($anketa['active'] == 1) {
$now = time();
$do = explode('.', $anketa['trajanjedo']);
$do = strtotime($do[0].'.'.$do[1].'.20'.$do[2]);
$trajanje = $do - $now;
$trajanje = floor($trajanje/60/60/24) + 1;
- if($trajanje >= 0){
+
+ if($trajanje >= 0){
+
// Ce je aktivna za vec kot 2000 dni je trajna
- if($trajanje > 2000)
- echo $lang['srv_trajna_anketa'];
- else
- echo $lang['more'].' '.$trajanje.' '.$lang['hour_days'];
+ if($trajanje > 2000){
+ $status_text = $lang['srv_trajna_anketa'];
+ }
+ else{
+ $status_text = $lang['more'].' '.$trajanje.' '.$lang['hour_days'];
+ }
}
else{
- echo $lang['srv_trajna_anketa'];
+ $status_text = $lang['srv_trajna_anketa'];
}
+
+ $status_color = 'green';
}
else {
$sqlA = sisplet_query("SELECT sid FROM srv_activity WHERE sid='".$anketa['id']."'");
- if (mysqli_num_rows($sqlA) > 0) {
+
+ if (mysqli_num_rows($sqlA) > 0) {
# anketa je zaključena
- echo $lang['srv_survey_list_closed'];
- } else {
+ $status_text = $lang['srv_survey_list_closed'];
+ $status_color = 'blue';
+ }
+ else {
# anketa je neaktivna
- echo $lang['srv_survey_list_inpreparation'];
+ $status_text = $lang['srv_survey_list_inpreparation'];
+ $status_color = 'gray';
}
}
+
+ echo ' <div class="status_box '.$status_color.'">'.$status_text.'</div>';
+
echo '</td>';
- // Tip + st. vprasanj
- echo '<td class="col5">';
- if($anketa['survey_type'] == 0)
- echo $lang['srv_vrsta_survey_type_0'];
- elseif($anketa['survey_type'] == 1)
- echo $lang['srv_vrsta_survey_type_1'];
- elseif(SurveyInfo::checkSurveyModule('hierarhija', $anketa['id']))
- echo $lang['srv_vrsta_survey_type_10'];
- else
- echo $lang['srv_vrsta_survey_type_2'];
-
- echo '<br /><span class="small">'.$lang['srv_h_sl_stvprasanj'].': '. $anketa['variables'].'</span>';
+
+ // Ustvarjeno
+ echo '<td class="col3">';
+
+ // Ce gre za search moramo ustrezno pobarvati najden del besede
+ $name_searched = $anketa['i_name'];
+ $surname_searched = $anketa['i_surname'];
+ if($this->isSearch == 1 && $this->searchSettings['stype'] == '1'){
+ foreach($this->searchStringProcessed as $search_word){
+
+ // Pobarvamo najden niz v imenu
+ preg_match_all("/$search_word+/i", $name_searched, $matches);
+ if (is_array($matches[0]) && count($matches[0]) >= 1) {
+ foreach ($matches[0] as $match) {
+ $name_searched = str_replace($match, '<span class="red">'.$match.'</span>', $name_searched);
+ }
+ }
+
+ // Pobarvamo najden niz v priimku
+ preg_match_all("/$search_word+/i", $surname_searched, $matches);
+ if (is_array($matches[0]) && count($matches[0]) >= 1) {
+ foreach ($matches[0] as $match) {
+ $surname_searched = str_replace($match, '<span class="red">'.$match.'</span>', $surname_searched);
+ }
+ }
+ }
+ }
+
+ $i_time = substr($anketa['i_time'], 0, 8);
+ $i_time = explode('.', $i_time);
+
+ echo '<div class="top_line">';
+ echo $i_time[0].'.'.$i_time[1].'.20'.$i_time[2];
+ echo '</div>';
+
+ echo '<div class="bottom_line">';
+ echo $name_searched.' '.$surname_searched;
+ echo '</div>';
+
echo '</td>';
+
// Zadnji vnos
- echo '<td class="col6">';
+ echo '<td class="col4">';
+
+ echo '<div class="top_line">';
if($anketa['answers'] > 0){
$v_time = substr($anketa['v_time_last'], 0, 8);
$v_time = explode('.', $v_time);
- echo $v_time[0].'.'.$v_time[1].'.20'.$v_time[2].'<br />';
+
+ // Nimamo parapodatkov
+ if($anketa['v_time_last'] == '00.00.00 0:00')
+ echo $lang['srv_survey_list_no_paradata'];
+ else
+ echo $v_time[0].'.'.$v_time[1].'.20'.$v_time[2];
}
else{
- echo '/<br />';
+ echo '/';
}
- echo '<span class="small">'.$lang['srv_info_answers'].': '.$anketa['answers'].'</span>';
+ echo '</div>';
+
+ echo '<div class="bottom_line">';
+ echo $lang['srv_info_answers_no'].': '.$anketa['answers'];
+ echo '</div>';
+
echo '</td>';
+
// Sprememba
- echo '<td class="col7">';
+ echo '<td class="col5">';
+
+ echo '<div class="top_line">';
$e_time = substr($anketa['e_time'], 0, 8);
$e_time = explode('.', $e_time);
- echo $e_time[0].'.'.$e_time[1].'.20'.$e_time[2].'<br />';
-
- echo '<a href="#" onclick="surveyList_user(\'e\',\'#edit_user_'.$anketa['id'].'\');">';
- echo '<span id="edit_user_'.$anketa['id'].'" euid="'.$anketa['edit_uid'].'" class="email">'.$anketa['e_email'].'</span>';
- echo '</a>';
+ echo $e_time[0].'.'.$e_time[1].'.20'.$e_time[2];
+ echo '</div>';
+
+ echo '<div class="bottom_line">';
+ echo ' <span id="edit_user_'.$anketa['id'].'" euid="'.$anketa['edit_uid'].'" onclick="surveyList_user(\'e\',\'#edit_user_'.$anketa['id'].'\');">'.$anketa['e_email'].'</span>';
+ echo '</div>';
+
echo '</td>';
- // Knjiznica - uporabnik
- echo '<td class="col8">';
- echo '<a href="#" title="'.($anketa['lib_usr'] == 1 ? $lang['srv_ank_mylib_off'] : $lang['srv_ank_mylib_on']).'" onclick="surveyList_myknjiznica_new(\''.$anketa['id'].'\'); return false;">';
- echo '<span class="sprites '.($anketa['lib_usr'] == 1 ? ' sl_active_on': ' sl_active_off').'"></span>';
- echo '</a>';
- echo '</td>';
+
+ // Ostalo
+ echo '<td class="col6 other_link">';
- // Knjiznica - global (samo admin)
- echo '<td class="col9">';
- if ($this->g_adminType == 0){
- echo '<a href="#" title="'.($anketa['lib_glb'] == 1 ? $lang['srv_ank_lib_off'] : $lang['srv_ank_lib_on']).'" onclick="surveyList_knjiznica_new(\''.$anketa['id'].'\'); return false;">';
- echo '<span class="sprites '.($anketa['lib_glb'] == 1 ? ' sl_library_on': ' sl_library_off').'"></span>';
- echo '</a>';
- }
+ echo ' <span class="faicon dots" onClick="surveyList_show_more(\''.$anketa['id'].'\');"></span>';
+
+ // Hover okno
+ echo ' <div class="survey_other_box_holder">';
+ echo ' <div id="survey_other_box_'.$anketa['id'].'" class="survey_other_box displayNone"><ul>';
+
+ SurveyInfo::getInstance()->SurveyInit($anketa['id']);
+ echo ' <li><a href="' . SurveyInfo::getSurveyLink() . '?preview=on" target="_blank" title="'.$lang['srv_poglejanketo2'].'"><span class="faicon monitor"></span> '.$lang['srv_poglejanketo2'].'</a></li>';
+ echo ' <li><a href="index.php?anketa='.$anketa['id'].'&a=testiranje"><span class="faicon test"></span>'.$lang['srv_testiranje'].'</a></li>';
+ echo ' <li><a href="index.php?anketa='.$anketa['id'].'&a=vabila"><span class="faicon publish"></span>'.$lang['srv_vabila'].'</a></li>';
+ echo ' <li><a href="index.php?anketa='.$anketa['id'].'&a=data"><span class="faicon data"></span>'.$lang['srv_podatki'].'</a></li>';
+ echo ' <li><a href="index.php?anketa='.$anketa['id'].'&a=analysis"><span class="faicon chart"></span>'.$lang['srv_analiza'].'</a></li>';
+
+ echo ' <li><div class="line"></li>';
+
+ echo ' <li><input type="checkbox" id="lib_private_'.$anketa['id'].'" '.($anketa['lib_usr'] == 1 ? 'checked="checked"' : '').' onclick="surveyList_myknjiznica_new(\''.$anketa['id'].'\'); return false;"><label for="lib_private_'.$anketa['id'].'">'.$lang['srv_moja_knjiznica'].'</label></li>';
+ if ($this->g_adminType == 0){
+ echo ' <li><input type="checkbox" id="lib_public_'.$anketa['id'].'" '.($anketa['lib_glb'] == 1 ? 'checked="checked"' : '').' onclick="surveyList_knjiznica_new(\''.$anketa['id'].'\'); return false;"><label for="lib_public_'.$anketa['id'].'">'.$lang['srv_javna_knjiznica'].'</label></li>';
+ }
+
+ echo ' </ul></div>';
+ echo ' </div>';
+
echo '</td>';
-
+
+
echo '</tr>';
}
@@ -1499,41 +1373,56 @@ class SurveyList {
// Izris nerazvrscenih anket
if($folder['id'] == 0){
- echo '<div class="folder_title droppable" id="folder_0" folder_id="0">';
+ echo '<div class="folder_title open droppable" id="folder_0" folder_id="0">';
- echo '<a href="#" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"><span class="faicon minus icon-blue pointer"></span></a>';
+ echo '<span class="faicon folder_arrow_icon" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"></span>';
- echo ' <span class="spaceRight" style="vertical-align:0px;">'.$folder['naslov'].'</span>';
+ echo ' <span>'.$folder['naslov'].'</span>';
+
+ // Dodaten div za klik za razpiranje
+ echo '<div class="folder_clickable" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"></div>';
// Ikona za dodajanje folderja
echo '</div>';
- echo '<div id="folder_content_0" class="folder_content '.(/*$this->pageno == 1*/false ? ' closed' : '').'">';
+ echo '<div id="folder_content_0" class="folder_content">';
$this->displayNewSurveyList($folder=0);
echo '</div>';
}
else{
- echo '<div class="folder_title mySurvey_draggable droppable" id="folder_'.$folder['id'].'" folder_id="'.$folder['id'].'">';
- if($folder['open'] == 1)
- echo '<a href="#" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"><span class="faicon minus icon-blue pointer"></span></a>';
- else
- echo '<a href="#" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"><span class="faicon plus icon-blue pointer"></span></a>';
+ echo '<div class="folder_title '.($folder['open'] == 1 ? 'open' : 'closed').' mySurvey_draggable droppable" id="folder_'.$folder['id'].'" folder_id="'.$folder['id'].'">';
+ // Puscica za odpiranje/zapiranje
+ echo '<span class="faicon folder_arrow_icon" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"></span>';
+
+ // Ikona mape
+ echo '<span class="faicon folder_icon"></span>';
+
// Naslov folderja
- echo ' <span class="faicon folder icon-blue"></span> <span id="folder_title_text_'.$folder['id'].'" class="folder_title_text spaceRight" style="vertical-align:0px;"><a href="#" onClick="edit_title_folder(\''.$folder['id'].'\'); return false;">'.$folder['naslov'].'</a></span>';
+ echo '<div id="folder_title_text_'.$folder['id'].'" class="folder_title_text" onClick="edit_title_folder(\''.$folder['id'].'\'); return false;">'.$folder['naslov'].'</div>';
- // Ikona za dodajanje folderja
- echo ' <a href="#" title="'.$lang['srv_mySurvey_create_subfolder'].'" onClick="create_folder(\''.$folder['id'].'\'); return false;"><span class="faicon add icon-blue pointer map_holder_control"></span></a>';
+
+ echo '<div class="map_holder_control">';
+
+ // Ikona za dodajanje folderja
+ echo '<a href="#" title="'.$lang['srv_mySurvey_create_subfolder'].'" onClick="create_folder(\''.$folder['id'].'\'); return false;"><span class="faicon add"></span></a>';
// Ikona za brisanje folderja
- echo ' <a href="#" title="'.$lang['srv_mySurvey_delete_folder'].'" onClick="delete_folder(\''.$folder['id'].'\'); return false;"><span class="faicon remove icon-orange pointer map_holder_control"></span></a>';
+ echo '<a href="#" title="'.$lang['srv_mySurvey_delete_folder'].'" onClick="delete_folder(\''.$folder['id'].'\'); return false;"><span class="faicon remove"></span></a>';
// Ikona za kopiranje folderja - samo admini
if($admin_type == 0)
- echo ' &nbsp;<a href="#" title="'.$lang['srv_mySurvey_copy_folder'].'" onClick="copy_folder(\''.$folder['id'].'\'); return false;"><span class="faicon copy icon-blue_soft pointer map_holder_control"></span></a>';
+ echo '<a href="#" title="'.$lang['srv_mySurvey_copy_folder'].'" onClick="copy_folder(\''.$folder['id'].'\'); return false;"><span class="faicon copy"></span></a>';
echo '</div>';
+
+
+ // Dodaten div za klik za razpiranje
+ echo '<div class="folder_clickable" onClick="toggle_folder(\''.$folder['id'].'\'); return false;"></div>';
+
+
+ echo '</div>';
echo '<div id="folder_content_'.$folder['id'].'" class="folder_content '.($folder['open'] == 1 ? '' : ' closed').' '.($folder['parent'] != 0 ? ' subfolder' : '').'">';
@@ -1565,6 +1454,7 @@ class SurveyList {
# ali sploh izrisujemo paginacijo
if ($this->max_pages > 1) {
+
if ($this->onlyPhone == false) {
$baseUrl = $site_url."admin/survey/index.php?pageno=";
} else {
@@ -1574,12 +1464,11 @@ class SurveyList {
# povezava na prejšnjo stran
$prev_page = $this->pageno - 1;
if($prev_page >= 1) {
- //echo('<div><a href="'.$baseUrl.$prev_page.'">'.$lang['previous_page_short'].'</a></div>');
- echo('<div><a href="'.$baseUrl.$prev_page.'"><span class="faicon pagination_left icon-blue"></span></a></div>');
- } else {
+ echo '<a href="'.$baseUrl.$prev_page.'"><div class="arrow left"><span class="faicon pagination_left"></span></div></a>';
+ }
+ else {
# brez href povezave
- //echo('<div class="disabledPage">'.$lang['previous_page_short'].'</div>');
- echo('<div class="disabledPage"><span class="faicon pagination_left icon-blue_soft"></span></div>');
+ echo '<div class="arrow left disabledPage"><span class="faicon pagination_left"></span></div>';
}
# povezave za vmesne strani
@@ -1587,44 +1476,46 @@ class SurveyList {
$skipped = false;
for($a = 1; $a <= $this->max_pages; $a++) {
if ($this->max_pages < ((SRV_LIST_GROUP_PAGINATE+1) * 2) || $a <= SRV_LIST_GROUP_PAGINATE || $a > ($this->max_pages-SRV_LIST_GROUP_PAGINATE)
-
|| ( abs($a-$this->pageno) < SRV_LIST_GROUP_PAGINATE)) {
if ($skipped == true) {
+
echo '<div class="spacePage">.&nbsp;.&nbsp;.</div>';
+
$skipped = false;
}
+
if($a == $this->pageno) {
# brez href povezave
- echo('<div class="currentPage">'.$a.'</div>');
- } else {
- echo('<div><a href="'.$baseUrl.$a.'">'.$a.'</a></div>');
+ echo '<div class="page_number currentPage">'.$a.'</div>';
+ }
+ else {
+ echo '<a href="'.$baseUrl.$a.'"><div class="page_number">'.$a.'</div></a>';
}
- } else {
+ }
+ else {
$skipped = true;
}
}
+
# povezava na naslednjo stran
$next_page = $this->pageno + 1;
if($next_page <= $this->max_pages) {
- //echo('<div><a href="'.$baseUrl.$next_page.'">'.$lang['next_page_short'].'</a></div>');
- echo('<div><a href="'.$baseUrl.$next_page.'"><span class="faicon pagination_right icon-blue"></span></a></div>');
- } else {
+ echo '<a href="'.$baseUrl.$next_page.'"><div class="arrow right"><span class="faicon pagination_right"></span></div></a>';
+ }
+ else {
# brez href povezave
- //echo('<div class="disabledPage">'.$lang['next_page_short'].'</div>');
- echo('<div class="disabledPage"><span class="faicon pagination_right icon-blue_soft"></span></div>');
+ echo '<div class="arrow right disabledPage"><span class="faicon pagination_right"></span></div>';
}
}
}
// Prikazemo gumb za sortiranje seznama anket
- private function displaySortButton(){
+ protected function displaySortButton(){
global $lang, $site_url;
- echo $lang['orderby'];
- //echo ' <img style="margin-left:5px; vertical-align:middle;" src="'.$site_url.'admin/survey/img_new/bullet_arrow_down.png">';
-
-
+ echo '<span class="faicon sort"></span>';
+
echo '<div id="sortSettings">';
echo '<ul>';
@@ -1638,14 +1529,14 @@ class SurveyList {
$img_src = 'sort_descending';
}
- echo '<a href="#" onClick="surveyList_goTo(\'1\',\''.($this->sortby != 1 ? '1' : $sort).'\')"><li '.($this->sortby == 1 ? ' class="active"' : '').'>'.$lang['sort_by_title'].' <span class="faicon '.($this->sortby != 1 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'6\',\''.($this->sortby != 6 ? '1' : $sort).'\')"><li '.($this->sortby == 6 ? ' class="active"' : '').'>'.$lang['sort_by_qcount'].' <span class="faicon '.($this->sortby != 6 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'5\',\''.($this->sortby != 5 ? '1' : $sort).'\')"><li '.($this->sortby == 5 ? ' class="active"' : '').'>'.$lang['sort_by_answercount'].' <span class="faicon '.($this->sortby != 5 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'16\',\''.($this->sortby != 16 ? '1' : $sort).'\')"><li '.($this->sortby == 16 ? ' class="active"' : '').'>'.$lang['sort_by_insert'].' <span class="faicon '.($this->sortby != 16 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'14\',\''.($this->sortby != 14 ? '1' : $sort).'\')"><li '.($this->sortby == 14 ? ' class="active"' : '').'>'.$lang['sort_by_edit'].' <span class="faicon '.($this->sortby != 14 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'18\',\''.($this->sortby != 18 ? '1' : $sort).'\')"><li '.($this->sortby == 18 ? ' class="active"' : '').'>Status <span class="faicon '.($this->sortby != 18 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'7\',\''.($this->sortby != 7 ? '1' : $sort).'\')"><li '.($this->sortby == 7 ? ' class="active"' : '').'>'.$lang['sort_by_author'].' <span class="faicon '.($this->sortby != 7 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
- echo '<a href="#" onClick="surveyList_goTo(\'11\',\''.($this->sortby != 11 ? '1' : $sort).'\')"><li '.($this->sortby == 11 ? ' class="active"' : '').' style="border:0;">'.$lang['sort_by_editor'].' <span class="faicon '.($this->sortby != 11 ? 'sort_unsorted' : $img_src).'"></span></li></a>';
+ echo '<li '.($this->sortby == 1 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'1\',\''.($this->sortby != 1 ? '1' : $sort).'\')">'.$lang['sort_by_title'].' <span class="faicon '.($this->sortby != 1 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 6 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'6\',\''.($this->sortby != 6 ? '1' : $sort).'\')">'.$lang['sort_by_qcount'].' <span class="faicon '.($this->sortby != 6 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 5 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'5\',\''.($this->sortby != 5 ? '1' : $sort).'\')">'.$lang['sort_by_answercount'].' <span class="faicon '.($this->sortby != 5 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 16 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'16\',\''.($this->sortby != 16 ? '1' : $sort).'\')">'.$lang['sort_by_insert'].' <span class="faicon '.($this->sortby != 16 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 14 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'14\',\''.($this->sortby != 14 ? '1' : $sort).'\')">'.$lang['sort_by_edit'].' <span class="faicon '.($this->sortby != 14 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 18 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'18\',\''.($this->sortby != 18 ? '1' : $sort).'\')">Status <span class="faicon '.($this->sortby != 18 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 7 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'7\',\''.($this->sortby != 7 ? '1' : $sort).'\')"><li '.($this->sortby == 7 ? ' class="active"' : '').'>'.$lang['sort_by_author'].' <span class="faicon '.($this->sortby != 7 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
+ echo '<li '.($this->sortby == 11 ? ' class="active"' : '').' style="border:0;"><a href="#" onClick="surveyList_goTo(\'11\',\''.($this->sortby != 11 ? '1' : $sort).'\')">'.$lang['sort_by_editor'].' <span class="faicon '.($this->sortby != 11 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '</ul>';
@@ -1653,29 +1544,26 @@ class SurveyList {
}
// Prikazemo gumb za filtriranje seznama anket
- private function displayFilterButton(){
+ protected function displayFilterButton(){
global $lang, $site_url, $admin_languages;
echo '<div id="filterButton" '.(($this->user_id || $this->lang_id != 0 || $this->gdpr != 0) ? 'class="active"' : '').'>';
- echo $lang['srv_analiza_filter'];
- //echo ' <img style="margin-left:5px; vertical-align:middle;" src="'.$site_url.'admin/survey/img_new/bullet_arrow_down.png">';
-
+ echo '<span class="faicon filter"></span>';
echo '<div id="filterSettings">';
echo '<ul>';
-
-
+
# filter po uporabniku
echo '<li>';
- echo '<span class="filter_title">'.$lang['srv_list_author'].'</span><br />';
+ echo '<span class="filter_title">'.$lang['srv_list_author'].'</span>';
// Ce preklapljamo v searchu moramo refreshati celo stran (druga js funkcija)
$reload = ($this->isSearch == 1) ? '_reload' : '';
- echo '<input type="radio" name="filter_mySurveys" id="filter_mySurveys_0" value="0" '.(!$this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'clr\',\'0\');"> <label for="filter_mySurveys_0">'.$lang['srv_list_all_surveys'].'</label>';
- echo '<br /><input type="radio" name="filter_mySurveys" id="filter_mySurveys_1" value="1" '.($this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'uid\',\''.$this->g_uid.'\');"> <label for="filter_mySurveys_1">'.$lang['srv_list_my_surveys'].'</label>';
+ echo '<span class="filter_line"><input type="radio" name="filter_mySurveys" id="filter_mySurveys_0" value="0" '.(!$this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'clr\',\'0\');"> <label for="filter_mySurveys_0">'.$lang['srv_list_all_surveys'].'</label></span>';
+ echo '<span class="filter_line"><input type="radio" name="filter_mySurveys" id="filter_mySurveys_1" value="1" '.($this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'uid\',\''.$this->g_uid.'\');"> <label for="filter_mySurveys_1">'.$lang['srv_list_my_surveys'].'</label></span>';
echo '</li>';
@@ -1683,11 +1571,11 @@ class SurveyList {
# filter po jeziku
echo '<li>';
- echo '<span class="filter_title">'.$lang['srv_sl_set_language'].'</span><br />';
+ echo '<span class="filter_title">'.$lang['srv_sl_set_language'].'</span>';
- echo '<input type="radio" name="filter_language" id="filter_language_0" value="0" '.((int)$this->lang_id == 0 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'0\');"> <label for="filter_language_0">'.$lang['srv_sl_set_language_all'].'</label>';
- echo '<br /><input type="radio" name="filter_language" id="filter_language_1" value="1" '.((int)$this->lang_id == 1 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'1\');"> <label for="filter_language_1">'.$admin_languages['1'].'</label>';
- echo '<br /><input type="radio" name="filter_language" id="filter_language_2" value="2" '.((int)$this->lang_id == 2 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'2\');"> <label for="filter_language_2">'.$admin_languages['2'].'</label>';
+ echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_0" value="0" '.((int)$this->lang_id == 0 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'0\');"> <label for="filter_language_0">'.$lang['srv_sl_set_language_all'].'</label></span>';
+ echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_1" value="1" '.((int)$this->lang_id == 1 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'1\');"> <label for="filter_language_1">'.$admin_languages['1'].'</label></span>';
+ echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_2" value="2" '.((int)$this->lang_id == 2 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'2\');"> <label for="filter_language_2">'.$admin_languages['2'].'</label></span>';
echo '</li>';
@@ -1695,11 +1583,10 @@ class SurveyList {
# filter po GDPR anketah
echo '<li>';
- echo '<span class="filter_title">'.$lang['srv_gdpr'].'</span><br />';
+ echo '<span class="filter_title">'.$lang['srv_gdpr'].'</span>';
- echo '<input type="radio" name="filter_gdpr" id="filter_gdpr_0" value="0" '.((int)$this->gdpr == 0 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'0\');"> <label for="filter_gdpr_0">'.$lang['srv_list_all_surveys'].'</label>';
- echo '<br /><input type="radio" name="filter_gdpr" id="filter_gdpr_1" value="1" '.((int)$this->gdpr == 1 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'1\');"> <label for="filter_gdpr_1">'.$lang['srv_list_gdpr_gdpr'].'</label>';
- //echo '<br /><input type="radio" name="filter_gdpr" id="filter_gdpr_2" value="2" '.((int)$this->gdpr == 2 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'2\');"> <label for="filter_gdpr_2">'.$lang['srv_list_gdpr_no_gdpr'].'</label>';
+ echo '<span class="filter_line"><input type="radio" name="filter_gdpr" id="filter_gdpr_0" value="0" '.((int)$this->gdpr == 0 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'0\');"> <label for="filter_gdpr_0">'.$lang['srv_list_all_surveys'].'</label></span>';
+ echo '<span class="filter_line"><input type="radio" name="filter_gdpr" id="filter_gdpr_1" value="1" '.((int)$this->gdpr == 1 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'1\');"> <label for="filter_gdpr_1">'.$lang['srv_list_gdpr_gdpr'].'</label></span>';
echo '</li>';
@@ -1711,8 +1598,8 @@ class SurveyList {
}
// Prikazemo preklop med navadnim pogledom in pogledom s folderji
- private function displayFolderSwitch(){
- global $lang, $global_user_id;
+ protected function displayFolderSwitch(){
+ global $lang, $global_user_id, $site_url;
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
@@ -1721,11 +1608,19 @@ class SurveyList {
if(!$userAccess->checkUserAccess('my_survey_folders')){
echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" class="user_access_locked" onClick="popupUserAccess(\'my_survey_folders\');">';
echo $lang['srv_mySurvey_show_folders'];
+ echo ' <div class="switch_folders off"></div>';
echo '</div>';
}
else{
- echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" '.($this->show_folders == 1 ? ' class="active"' : '').' onClick="switchFolder(\''.$this->show_folders.'\');">';
- echo $lang['srv_mySurvey_show_folders'];
+ echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" onClick="switchFolder(\''.$this->show_folders.'\');">';
+ echo ' <span>'.$lang['srv_mySurvey_show_folders'].'</span>';
+
+ // Stikalo za folderje
+ if($this->show_folders == 1)
+ echo ' <div class="switch_folders on"></div>';
+ else
+ echo ' <div class="switch_folders off"></div>';
+
echo '</div>';
}
}
@@ -1739,103 +1634,101 @@ class SurveyList {
}
// Prikazemo nastavitve za napredno iskanje ce iscemo po anketah
- private function displaySearchSettings(){
+ protected function displaySearchSettings(){
global $lang;
global $site_url;
- // Posebej imamo skrito polje s parametri da jih ohranimo pri ajax klicih
- echo '<input type="hidden" id="searchParams" name="searchParams" value="'.$this->getSearchParams().'" />';
-
- echo '<span class="title">'.$lang['s_search_settings_my'].'</span>';
+ // NAPREDNE NASTAVITVE ISKANJA
+ $show_advanced_search = false;
+ if($this->searchSettings['sstatus'] != '0'
+ || $this->searchSettings['sidatefrom'] != ''
+ || $this->searchSettings['sidateto'] != ''
+ || $this->searchSettings['sedatefrom'] != ''
+ || $this->searchSettings['sedateto'] != ''){
- echo '<form method="GET" id="1kasf2" action="'.$site_url.'admin/survey/index.php">';
+ $show_advanced_search = true;
+ }
+
+ echo '<form method="GET" id="1kasf2" action="'.$site_url.'admin/survey/index.php">';
+
+
+ // Zgornja vrstica z geslom in gumbom za iskanje
+ echo '<div class="search_settings_top">';
+
+ // Posebej imamo skrito polje s parametri da jih ohranimo pri ajax klicih
+ echo '<input type="hidden" id="searchParams" name="searchParams" value="'.$this->getSearchParams().'" />';
// Iskano geslo
- echo '<p>';
- echo ' <span class="bold">'.$lang['s_search2'].':</span> <input type="text" name="search" id="searchMySurveyText" value="'.htmlentities($this->searchString).'" placeholder="' . $lang['s_search'] . '" />';
- echo '</p>';
+ echo '<div class="search_text">';
+ echo ' <input type="text" name="search" id="searchMySurveyText" value="'.htmlentities($this->searchString).'" placeholder="'.$lang['s_search'].'" />';
+ echo '</div>';
// Iskanje po naslovu ali avtorju ali besedilu
- echo '<p>';
- echo ' <span>'.$lang['s_thru'].': </span>';
- echo ' <label for="stype_0"><input type="radio" name="stype" id="stype_0" value="0" '.($this->searchSettings['stype'] == '0' ? ' checked="checked"' : '').' />'.$lang['s_title'].'</label>';
- echo ' <label for="stype_1"><input type="radio" name="stype" id="stype_1" value="1" '.($this->searchSettings['stype'] == '1' ? ' checked="checked"' : '').' />'.$lang['s_author'].'</label>';
- echo ' <label for="stype_2"><input type="radio" name="stype" id="stype_2" value="2" '.($this->searchSettings['stype'] == '2' ? ' checked="checked"' : '').' />'.$lang['s_text'].'</label>';
- echo '</p>';
-
-
- // NAPREDNE NASTAVITVE ISKANJA
- $show_advanced_search = false;
- if($this->searchSettings['sstatus'] != '0'
- || $this->searchSettings['sidatefrom'] != ''
- || $this->searchSettings['sidateto'] != ''
- || $this->searchSettings['sedatefrom'] != ''
- || $this->searchSettings['sedateto'] != ''){
+ echo '<div class="search_type">';
+ echo ' <select name="stype" id="stype">';
+ echo ' <option value="0" '.($this->searchSettings['stype'] == '0' ? ' selected="selected"' : '').'>'.$lang['s_title'].'</option>';
+ echo ' <option value="1" '.($this->searchSettings['stype'] == '1' ? ' selected="selected"' : '').'>'.$lang['s_author'].'</option>';
+ echo ' <option value="2" '.($this->searchSettings['stype'] == '2' ? ' selected="selected"' : '').'>'.$lang['s_text'].'</option>';
+ echo ' </select>';
+ echo '</div>';
+
+ // Gumb isci
+ echo '<div class="search_button">';
+ echo ' <a href="#" onclick="$(\'#1kasf2\').submit(); return false;"><button class="medium blue">'.$lang['s_search'].'</button></a>';
+ echo '</div>';
+
+ echo '</div>';
- $show_advanced_search = true;
- }
- echo '<span class="advancedSearchButton clr bold spaceLeft">';
- echo ' <a href="#" onClick="showAdvancedSearch(); return false;">';
- echo '<span class="faicon '.($show_advanced_search ? ' minus': 'plus').'"></span> ' . $lang['s_advanced'];
- echo ' </a>';
- echo '</span>';
+ // Gumba za napredne nastavitve
+ echo '<div class="search_settings_advanced_buttons">';
- echo '<div id="advancedSearch" '.($show_advanced_search ? '' : ' style="display:none;"').'>';
+ echo ' <button type="button" id="advanced_settings_button" class="white-black small '.($show_advanced_search ? 'active': '').'" onClick="showAdvancedSearch(); return false;">';
+ echo ' <span class="faicon search"></span>'.$lang['s_advanced'];
+ echo ' </button>';
+
+ // Gumb nazaj na moje ankete
+ echo ' <a href="'.$site_url.'admin/survey/index.php?a=pregledovanje"><button type="button" class="white-black small">';
+ echo ' <span class="faicon clipboard_notes"></span>'.$lang['s_search_mySurvey_back'];
+ echo ' </button></a>';
+
+ echo '</div>';
+
- // Metaadmin lahko dodatno omeji search po avtorju
- if(Dostop::isMetaAdmin()){
- echo '<p>';
- echo ' <span class="bold">'.$lang['s_search_metaadmin'].':</span> <input type="text" name="onlyAuthor" id="onlyAuthor" value="'.htmlentities($this->searchSettings['onlyAuthor']).'" placeholder="' . $lang['s_search'] . '" />';
- echo '</p>';
- }
+ // Okno z naprednimi nastavitvami
+ echo '<div id="advancedSearch" class="search_settings_advanced" '.($show_advanced_search ? '' : ' style="display:none;"').'>';
// Status ankete (aktivna, neaktivna, zakljucena)
- echo '<p>';
- echo ' <span>'.$lang['s_activity'].': </span>';
- echo ' <label for="sstatus_0"><input type="radio" name="sstatus" id="sstatus_0" value="0" '.($this->searchSettings['sstatus'] == '0' ? ' checked="checked"' : '').' />'.$lang['s_all_surveys'].'</label>';
- echo ' <label for="sstatus_1"><input type="radio" name="sstatus" id="sstatus_1" value="1" '.($this->searchSettings['sstatus'] == '1' ? ' checked="checked"' : '').' />'.$lang['s_active_surveys'].'</label>';
- echo ' <label for="sstatus_2"><input type="radio" name="sstatus" id="sstatus_2" value="2" '.($this->searchSettings['sstatus'] == '2' ? ' checked="checked"' : '').' />'.$lang['s_nonactive_surveys'].'</label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo ' <span class="setting_title">'.$lang['s_activity'].': </span>';
+ echo ' <div class="setting_line"><input type="radio" name="sstatus" id="sstatus_0" value="0" '.($this->searchSettings['sstatus'] == '0' ? ' checked="checked"' : '').'><label for="sstatus_0">'.$lang['s_all_surveys'].'</label></div>';
+ echo ' <div class="setting_line"><input type="radio" name="sstatus" id="sstatus_1" value="1" '.($this->searchSettings['sstatus'] == '1' ? ' checked="checked"' : '').'><label for="sstatus_1">'.$lang['s_active_surveys'].'</label></div>';
+ echo ' <div class="setting_line"><input type="radio" name="sstatus" id="sstatus_2" value="2" '.($this->searchSettings['sstatus'] == '2' ? ' checked="checked"' : '').'><label for="sstatus_2">'.$lang['s_nonactive_surveys'].'</label></div>';
+ echo '</div>';
// Datum ustvarjanja ankete
- echo '<p>';
- echo ' <span class="spaceRight">'.$lang['s_itime'].': </span>';
- echo ' <span class="spaceRight">'.$lang['s_from2'].' <input type="text" id="sidatefrom" name="sidatefrom" value="'.$this->searchSettings['sidatefrom'].'" autocomplete="off" size="12" /></span>';
- echo ' <span>'.$lang['s_to'].' <input type="text" id="sidateto" name="sidateto" value="'.$this->searchSettings['sidateto'].'" autocomplete="off" size="12" /></span>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo ' <span class="setting_title">'.$lang['s_itime'].': </span>';
+ echo ' <div class="setting_line"><span>'.$lang['srv_activate_duration_manual_from'].' <input type="text" id="sidatefrom" name="sidatefrom" value="'.$this->searchSettings['sidatefrom'].'" autocomplete="off" size="12" /></span></div>';
+ echo ' <div class="setting_line"><span>'.$lang['srv_activate_duration_manual_to'].' <input type="text" id="sidateto" name="sidateto" value="'.$this->searchSettings['sidateto'].'" autocomplete="off" size="12" /></span></div>';
+ echo '</div>';
// Datum zadnjega urejanja ankete
- echo '<p>';
- echo ' <span class="spaceRight">'.$lang['s_etime'].': </span>';
- echo ' <span class="spaceRight">'.$lang['s_from2'].' <input type="text" id="sedatefrom" name="sedatefrom" value="'.$this->searchSettings['sedatefrom'].'" autocomplete="off" size="12" /></span>';
- echo ' <span>'.$lang['s_to'].' <input type="text" id="sedateto" name="sedateto" value="'.$this->searchSettings['sedateto'].'" autocomplete="off" size="12" /></span>';
- echo '</p>';
-
+ echo '<div class="setting_holder">';
+ echo ' <span class="setting_title">'.$lang['s_etime'].': </span>';
+ echo ' <div class="setting_line"><span>'.$lang['srv_activate_duration_manual_from'].' <input type="text" id="sedatefrom" name="sedatefrom" value="'.$this->searchSettings['sedatefrom'].'" autocomplete="off" size="12" /></span></div>';
+ echo ' <div class="setting_line"><span>'.$lang['srv_activate_duration_manual_to'].' <input type="text" id="sedateto" name="sedateto" value="'.$this->searchSettings['sedateto'].'" autocomplete="off" size="12" /></span></div>';
echo '</div>';
-
-
- // Gumba isci in zapri
- echo '<span style="margin-top: 10px;" class="floatRight spaceRight">';
- echo ' <div class="buttonwrapper floatLeft spaceRight">';
- echo ' <a class="ovalbutton ovalbutton_gray" href="'.$site_url.'admin/survey/index.php"><span>'.$lang['s_search_mySurvey_back'].'</span></a>';
- echo ' </div>';
- echo ' <div class="buttonwrapper floatRight">';
- echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="$(\'#1kasf2\').submit(); return false;"><span>'.$lang['s_search'].'</span></a>';
- echo ' </div>';
- echo '</span>';
-
- // Gumb nazaj na moje ankete
- /*echo '<span style="margin:5px 20px 0 5px;" class="floatRight bold">';
- echo ' <a href="'.$site_url.'admin/survey/index.php"><span>'.$lang['s_search_mySurvey_back'].'</span></a>';
- echo '</span>';*/
-
- // Link na isci po knjiznici
- echo '<span class="link"><a href="'.$site_url.'admin/survey/index.php?a=knjiznica&search='.$this->searchString.'">'.$lang['s_search_Library'].'</a></span>';
-
- echo '<input style="display: none;" value="Išči" type="submit">';
-
- echo '</form>';
+
+ // Metaadmin lahko dodatno omeji search po avtorju
+ if(Dostop::isMetaAdmin()){
+ echo '<div class="setting_holder">';
+ echo ' <span class="setting_title">'.$lang['s_search_metaadmin'].': </span>';
+ echo ' <div class="setting_line"><input type="text" name="onlyAuthor" id="onlyAuthor" value="'.htmlentities($this->searchSettings['onlyAuthor']).'" placeholder="'.$lang['s_search'].'"></div>';
+ echo '</div>';
+ }
+
+ echo '</div>';
// JS za koledar
@@ -1849,11 +1742,15 @@ class SurveyList {
changeYear: true,
dateFormat: "dd.mm.yy",
showAnim: "slideDown",
- showOn: "button",
+ showOn: "both",
buttonText: ""
});
});
- </script>';
+ </script>';
+
+ echo '<input style="display: none;" value="Išči" type="submit">';
+
+ echo '</form>';
}
// Prikazemo search okno za iskanje po anketah
@@ -1863,13 +1760,12 @@ class SurveyList {
echo '<form method="GET" id="1kasmysurvey" action="'.$site_url.'admin/survey/index.php">';
- //echo '<span class="sprites search"></span> ';
- echo '<input id="searchMySurvey" type="text" value="" placeholder="' . $lang['s_search_mySurvey'] . '" name="search" />';
+ echo '<input id="searchMySurvey" type="text" value="" placeholder="'.$lang['s_search_mySurvey'].'" name="search" />';
- //echo '<input type="submit" value="' . $lang['s_search'] . '" />';
- echo ' <div class="buttonwrapper floatRight">';
- echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="$(\'#1kasmysurvey\').submit(); return false;"><span>'.$lang['s_search2'].'</span></a>';
- echo ' </div>';
+ echo ' <button class="medium white-black" onclick="$(\'#1kasmysurvey\').submit(); return false;">';
+ //echo $lang['s_search2'];
+ echo ' <span class="faicon search"></span>';
+ echo ' </button>';
echo '</form>';
}
@@ -1887,7 +1783,7 @@ class SurveyList {
if ($this->g_uid > 0) {
$saved_surveyList_string = UserSetting::getInstance()->getUserSetting('survey_list_order');
$saved_surveyList_visible_string = UserSetting::getInstance()->getUserSetting('survey_list_visible');
- $saved_surveyList_visible = array_unique(explode(",",$saved_surveyList_visible_string));
+ $saved_surveyList_visible = array_unique(explode(",",isset($saved_surveyList_visible_string)?$saved_surveyList_visible_string:''));
if (isset($saved_surveyList_string) && $saved_surveyList_string != "" && !$display_default ) {
$saved_surveyList_order = array_unique(explode(",",$saved_surveyList_string));
$izBaze = true;
@@ -2033,6 +1929,11 @@ class SurveyList {
$stringSurveyList .= "LEFT OUTER JOIN srv_spremenljivka AS ss ON ss.gru_id = sg.id ";
$stringSurveyList .= "LEFT OUTER JOIN srv_vrednost AS sv ON sv.spr_id = ss.id ";
}
+
+ // Ce iscemo po imenu ankete moramo dodat se tabele srv_nice_links za lepe linke
+ if($this->isSearch == 1 && $this->searchSettings['stype'] == '0'){
+ $stringSurveyList .= "LEFT OUTER JOIN srv_nice_links AS nl ON sa.id = nl.ank_id ";
+ }
$stringSurveyList .= "WHERE sa.backup='0' AND sa.id>0 AND active >= '0' AND invisible = '0' ";
@@ -2173,32 +2074,8 @@ class SurveyList {
}
return $result;
}
-
- private function createOrderUrl($id=null, $txt) {
-
- if (!isset($id) || $id == null || $id == "") {
- $id=1;
- }
-
- if ($this->sortby != $id ) {
- $img_src = 'sort_unsorted';
- $result='<div onClick="surveyList_goTo(\''.$id.'\',\'1\')">'.$txt.'</div>';
- } else {
-
- if ($this->sorttype == 2) {
- $img_src = 'sort_ascending';
- $result='<div onClick="surveyList_goTo(\''.$id.'\',\'1\')" class="red">'.$txt.'<span class="faicon '.$img_src.'" title=""></span></div>';
- } else {
- $img_src = 'sort_descending';
-
- $result='<div onClick="surveyList_goTo(\''.$id.'\',\'2\')" class="red">'.$txt.'<span class="faicon '.$img_src.'" title=""></span></div>';
- }
- }
-
- return $result;
- }
-
- private function createOrderUrlNew($id=null, $txt) {
+
+ protected function createOrderUrlNew($id, $txt) {
global $site_url;
if (!isset($id) || $id == null || $id == "") {
@@ -2207,11 +2084,13 @@ class SurveyList {
if ($this->sortby != $id ) {
$result='<div onClick="surveyList_goTo(\''.$id.'\',\'1\')">'.$txt.'</div>';
- } else {
+ }
+ else {
if ($this->sorttype == 2) {
$result='<div class="active" onClick="surveyList_goTo(\''.$id.'\',\'1\')">'.$txt.'<span class="active faicon after sort_up_arrow icon-orange"/></div>';
- } else {
+ }
+ else {
$result='<div class="active" onClick="surveyList_goTo(\''.$id.'\',\'2\')">'.$txt.'<span class="active faicon after sort_down_arrow icon-orange"/></div>';
}
}
@@ -2229,7 +2108,7 @@ class SurveyList {
$result = '<strong><a href="'.$site_url.'admin/survey/index.php?anketa='.$id.'&a='.A_REDIRECTLINK.'" title="'.$text.'">'.$text.'</a></strong>';
} elseif ($type == 'active') {
$result = '<a href="/" onclick="anketa_active(\''.$id.'\',\''.(int)$text.'\',\'true\'); return false;">' .
- '<span class="faicon '.((int)$text==1?'star_on':'star_off').'" alt="'.(int)$text.'" title="'.((int)$text==1?$lang['srv_anketa_active']:$lang['srv_anketa_noactive']).'"></span>'.
+ '<span class="faicon '.((int)$text==1?'star_on':'star_off').'" alt="'.(int)$text.'" title="'.((int)$text==1?$lang['srv_anketa_active']:$lang['srv_anketa_noactive']).'"> </span>'.
'</a>';
} elseif ($type == 'delete') {
if ((int)$options['anketa_canEdit'] > 0) {
@@ -2415,8 +2294,6 @@ class SurveyList {
$cnt1hour = mysqli_num_rows($qry1hour);
$cnt12hour = mysqli_num_rows($qry12hour);
$cnt24hour = mysqli_num_rows($qry24hour);
-
-
}
@@ -2545,7 +2422,7 @@ class SurveyList {
}
/** vrne sql string za omejevanje dostopa uporabniku */
- function getLanguageLimit() {
+ protected function getLanguageLimit() {
global $global_admin_type;
if ((int)$this->lang_id > 0) {
@@ -2554,7 +2431,7 @@ class SurveyList {
}
/** vrne sql string za omejevanje dostopa uporabniku */
- function getDostopAnketa() {
+ protected function getDostopAnketa() {
global $global_admin_type;
global $global_user_id;
@@ -2607,7 +2484,7 @@ class SurveyList {
}
/** vrne order string za SQL s katerim sortiramo */
- private function getOrderString() {
+ protected function getOrderString() {
if (!isset($this->sortby) || (int)$this->sortby == 0) {
$this->sortby = SRV_LIST_ORDER_BY;
@@ -2640,13 +2517,13 @@ class SurveyList {
}
/** vrne Limit string za SQL s katerim prika?emo posamezno stran */
- private function getLimitString() {
+ protected function getLimitString() {
$result = " LIMIT " . ($this->pageno * $this->rec_per_page - $this->rec_per_page) . ", " . $this->rec_per_page;
return $result;
}
// vrne sql string za search po anketah glede na nastavitve searcha
- private function getSearchString(){
+ protected function getSearchString(){
$search_text = mysqli_real_escape_string($GLOBALS['connect_db'], $this->searchString);
$search_text = stripslashes(stripslashes($search_text));
@@ -2700,7 +2577,7 @@ class SurveyList {
}
// Search po naslovu
else{
- $result = " AND (LOWER(sa.naslov) LIKE LOWER('".$search_text."') OR LOWER(sa.akronim) LIKE LOWER('".$search_text."'))";
+ $result = " AND (LOWER(sa.naslov) LIKE LOWER('".$search_text."') OR LOWER(sa.akronim) LIKE LOWER('".$search_text."') OR LOWER(nl.link) LIKE LOWER('".$search_text."'))";
}
// Search po statusu (aktivne, neaktivne)
@@ -2745,7 +2622,7 @@ class SurveyList {
}
// Dobimo vse parametri searcha
- private function getSearchParams(){
+ protected function getSearchParams(){
global $site_url;
$params = '';
@@ -2862,12 +2739,15 @@ class SurveyList {
$anketa = $_POST['anketa'];
$sql = sisplet_query("SELECT * FROM srv_library_anketa WHERE ank_id='$anketa' AND uid='$global_user_id'");
+
if (mysqli_num_rows($sql) > 0) {
sisplet_query("DELETE FROM srv_library_anketa WHERE ank_id='$anketa' AND uid='$global_user_id'");
sisplet_query("UPDATE srv_survey_list SET lib_usr='0' WHERE id='$anketa'");
- } else {
+ }
+ else {
$sql1 = sisplet_query("SELECT * FROM srv_library_folder WHERE uid='$global_user_id' AND tip='1' AND parent='0'");
$row1 = mysqli_fetch_array($sql1);
+
sisplet_query("INSERT INTO srv_library_anketa (ank_id, uid, folder) VALUES ('$anketa', '$global_user_id', '$row1[id]')");
sisplet_query("UPDATE srv_survey_list SET lib_usr='1' WHERE id='$anketa'");
}
@@ -3077,25 +2957,31 @@ class SurveyList {
$to_update = $meta_surveys_ids;
- # poiščemmo katere ankete so OK, in jih odstranimo iz seznama anket potrebnih za update
- $stringSurveyList = "SELECT id FROM srv_survey_list WHERE id IN (".implode(',', $meta_surveys_ids).")"
- #. " AND (updated = '0' OR (updated = '1' AND TIME_TO_SEC(TIMEDIFF(NOW(),last_updated)) < ".SRV_LIST_UPDATE_TIME_LIMIT.")) AND ( last_updated IS NOT NULL)";
- . " AND updated = '0' AND last_updated IS NOT NULL";
- $sqlSurveyList = sisplet_query($stringSurveyList);
- while ( $rowSurveyList = mysqli_fetch_assoc($sqlSurveyList)) {
- if (isset($to_update[$rowSurveyList['id']])) {
- unset($to_update[$rowSurveyList['id']]);
- }
- }
+ if(!empty($meta_surveys_ids)){
+
+ # poiščemmo katere ankete so OK, in jih odstranimo iz seznama anket potrebnih za update
+ $sqlSurveyList = sisplet_query("SELECT id
+ FROM srv_survey_list
+ WHERE id IN (".implode(',', $meta_surveys_ids).")
+ AND updated = '0' AND last_updated IS NOT NULL
+ ");
+ while ( $rowSurveyList = mysqli_fetch_assoc($sqlSurveyList)) {
+ if (isset($to_update[$rowSurveyList['id']])) {
+ unset($to_update[$rowSurveyList['id']]);
+ }
+ }
+ }
+
}
else{
$to_update = $this->surveys_ids;
# poiščemmo katere ankete so OK, in jih odstranimo iz seznama anket potrebnih za update
- $stringSurveyList = "SELECT id FROM srv_survey_list WHERE id IN (".implode(',', $this->surveys_ids).")"
- #. " AND (updated = '0' OR (updated = '1' AND TIME_TO_SEC(TIMEDIFF(NOW(),last_updated)) < ".SRV_LIST_UPDATE_TIME_LIMIT.")) AND ( last_updated IS NOT NULL)";
- . " AND updated = '0' AND last_updated IS NOT NULL";
- $sqlSurveyList = sisplet_query($stringSurveyList);
+ $sqlSurveyList = sisplet_query("SELECT id
+ FROM srv_survey_list
+ WHERE id IN (".implode(',', $this->surveys_ids).")
+ AND updated = '0' AND last_updated IS NOT NULL
+ ");
while ( $rowSurveyList = mysqli_fetch_assoc($sqlSurveyList)) {
if (isset($to_update[$rowSurveyList['id']])) {
unset($to_update[$rowSurveyList['id']]);
@@ -3111,10 +2997,6 @@ class SurveyList {
. ' IF(ISNULL(sla1.lib_glb),0,sla1.lib_glb) AS lib_glb,'
. ' IF(ISNULL(sla2.lib_usr),0,sla2.lib_usr) AS lib_usr,'
- // Po novem ne joinamo s tabelo "users", ker je lahko query pocasen in zaklene tabelo - potem pa vse zasteka (dodano preventivno)
- //. ' sa.edit_uid, us1.name AS e_name, us1.surname AS e_surname, us1.email AS e_email,'
- //. ' sa.insert_uid, us2.name AS i_name, us2.surname AS i_surname, us2.email AS i_email,'
-
. " us3.vnos_time_first AS v_time_first, us3.vnos_time_last AS v_time_last,"
. ' IF(ISNULL(us3.answers),0,us3.answers) as answers,'
. ' IF(ISNULL(g.variables),0,g.variables) as variables,'
@@ -3126,16 +3008,13 @@ class SurveyList {
AS sla1 ON sla1.ank_id = sa.id"
. " LEFT OUTER JOIN ( SELECT ank_id, uid, COUNT(*) AS lib_usr FROM srv_library_anketa as sla WHERE sla.uid = '".$this->g_uid."' AND sla.ank_id IN (".implode(',', $to_update).") GROUP BY ank_id )
AS sla2 ON sla2.ank_id = sa.id"
-
- //. ' LEFT OUTER JOIN users AS us1 ON us1.id = sa.edit_uid'
- //. ' LEFT OUTER JOIN users AS us2 ON us2.id = sa.insert_uid'
- . ' LEFT OUTER JOIN ( SELECT us3.ank_id, COUNT(us3.ank_id) as answers, MIN( us3.time_insert ) as vnos_time_first, MAX( us3.time_insert ) as vnos_time_last, preview FROM srv_user as us3 WHERE us3.ank_id IN ('.implode(',', $to_update).') AND us3.preview = \'0\' AND us3.deleted=\'0\' GROUP BY us3.ank_id )
+ . ' LEFT OUTER JOIN ( SELECT us3.ank_id, COUNT(us3.ank_id) as answers, MIN( us3.time_insert ) as vnos_time_first, MAX( us3.time_insert ) as vnos_time_last, preview FROM srv_user as us3 WHERE us3.ank_id IN ('.implode(',', $to_update).') AND us3.preview = \'0\' AND us3.deleted=\'0\' AND us3.testdata=\'0\' AND (us3.last_status=\'5\' OR us3.last_status=\'6\') AND us3.lurker=\'0\' GROUP BY us3.ank_id )
AS us3 ON us3.ank_id = sa.id'
. ' LEFT OUTER JOIN ( SELECT g.ank_id, COUNT(s.gru_id) as variables FROM srv_grupa g, srv_spremenljivka s WHERE g.id = s.gru_id AND g.ank_id IN ('.implode(',', $to_update).') GROUP BY g.ank_id )
AS g ON g.ank_id = sa.id'
- //spodaj dodaj AND us5.lurker=\'0\'
+
. ' LEFT OUTER JOIN ( SELECT us5.ank_id, COUNT(us5.ank_id) as approp, preview FROM srv_user as us5 WHERE last_status IN (' . $this->appropriateStatus . ') AND us5.ank_id IN ('.implode(',', $to_update).') AND us5.preview =\'0\' AND us5.deleted=\'0\' GROUP BY us5.ank_id )
AS us5 ON us5.ank_id = sa.id'
@@ -3160,12 +3039,6 @@ class SurveyList {
$values = array();
while ( $row = mysqli_fetch_assoc($sqlUpdateList)) {
- /*$row[i_name] = mysqli_real_escape_string($GLOBALS['connect_db'], $row[i_name]);
- $row[i_surname] = mysqli_real_escape_string($GLOBALS['connect_db'], $row[i_surname]);
- $row[i_email] = mysqli_real_escape_string($GLOBALS['connect_db'], $row[i_email]);
- $row[e_name] = mysqli_real_escape_string($GLOBALS['connect_db'], $row[e_name]);
- $row[e_surname] = mysqli_real_escape_string($GLOBALS['connect_db'], $row[e_surname]);
- $row[e_email] = mysqli_real_escape_string($GLOBALS['connect_db'], $row[e_email]);*/
$row['i_name'] = mysqli_real_escape_string($GLOBALS['connect_db'], $users[$row['id']]['i_name']);
$row['i_surname'] = mysqli_real_escape_string($GLOBALS['connect_db'], $users[$row['id']]['i_surname']);