diff options
Diffstat (limited to 'admin/survey/SurveyAdminSettings.php')
-rw-r--r-- | admin/survey/SurveyAdminSettings.php | 9103 |
1 files changed, 4816 insertions, 4287 deletions
diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index 259ffb5..4a1918b 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -49,8 +49,9 @@ class SurveyAdminSettings { $this->skin = 0;
if ((isset ($_REQUEST['anketa']) && $_REQUEST['anketa'] > 0) || (isset ($anketa) && $anketa > 0)) {
- $this->anketa = (isset ($_REQUEST['anketa']) && $_REQUEST['anketa'] > 0) ? $_REQUEST['anketa'] : $anketa;
- } else {
+ $this->anketa = (isset ($anketa) && $anketa > 0) ? $anketa : $_REQUEST['anketa'];
+ }
+ else {
// nekje se uporablja tudi brez IDja ankete!!!
//die("SAS: SID missing!");
}
@@ -58,12 +59,11 @@ class SurveyAdminSettings { SurveyInfo::getInstance()->SurveyInit($this->anketa);
SurveyInfo::getInstance()->resetSurveyData();
- if (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1)
- $this->db_table = '_active';
+ $this->db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
$this->survey_type = $this->getSurvey_type($this->anketa);
- $this->stran = $_GET['a'];
+ $this->stran = isset($_GET['a']) ? $_GET['a'] : null;
}
@@ -88,6 +88,9 @@ class SurveyAdminSettings { /* Globalne nastavitve ankete: veljajo za celoto anketo ne glede na uporabnika*/
$row = SurveyInfo::getInstance()->getSurveyRow();
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
+
echo '<form name="settingsanketa_' . $row['id'] . '" action="ajax.php?a=editanketasettings" method="post" autocomplete="off">' . "\n\r";
echo ' <input type="hidden" name="anketa" value="' . $this->anketa . '" />' . "\n\r";
echo ' <input type="hidden" name="grupa" value="' . $this->grupa . '" />' . "\n\r";
@@ -101,14 +104,30 @@ class SurveyAdminSettings { echo '<fieldset>';
echo '<legend>' . $lang['srv_osnovniPodatki'] . '</legend>';
- echo '<span class="nastavitveSpan2" >' . $lang['srv_novaanketa_polnoime'] . ': </span>';
- echo '<input type="text" id="anketa_polnoIme" name="anketa_polnoIme" value="' . $row['naslov'] . '" style="width:300px" onblur="edit_anketa_naslov(\'' . $row['id'] . '\');" maxlength="'.ANKETA_NASLOV_MAXLENGTH.'" /> <span id="anketa_polnoIme_chars">' . strlen($row['naslov']) . '/'.ANKETA_NASLOV_MAXLENGTH.'</span><br/>' . "\n\r";
- echo '<span class="nastavitveSpan2" >' . $lang['srv_novaanketa_kratkoime'] . ': </span>';
- echo '<input type="text" id="anketa_akronim" name="anketa_akronim" value="' . $row['akronim'] . '" style="width:300px" onblur="edit_anketa_akronim(\'' . $row['id'] . '\');" maxlength="'.ANKETA_AKRONIM_MAXLENGTH.'" /> <span id="anketa_akronim_chars">' . strlen($row['akronim']) . '/'.ANKETA_AKRONIM_MAXLENGTH.'</span><br/>' . "\n\r";
- echo '<span class="nastavitveSpan2" style="vertical-align:top;">' . $lang['srv_note'] . ': </span>';
- echo '<span><textarea rows="5" cols="20" id="anketa_note" name="anketa_note" onblur="edit_anketa_note(\'' . $row['id'] . '\');" maxlength="'.ANKETA_NOTE_MAXLENGTH.'">' . $row['intro_opomba'] . '</textarea></span> <span id="anketa_note_chars">' . strlen($row['intro_opomba']) . '/'.ANKETA_NOTE_MAXLENGTH.'</span><br/>' . "\n\r";
- echo '<span id="blank_note_edit"></span><br />';
-
+ echo '<div class="setting_holder">';
+ echo '<label for="anketa_polnoIme">'.$lang['srv_novaanketa_polnoime'].':</label>';
+ echo ' <input type="text" class="large" id="anketa_polnoIme" name="naslov" value="' . $row['naslov'] . '" />';
+ echo ' <span class="charalimit" id="anketa_polnoIme_chars">' . strlen($row['naslov']) . '/'.ANKETA_NASLOV_MAXLENGTH.'</span>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label for="anketa_akronim">'.$lang['srv_novaanketa_kratkoime'].':</label>';
+ echo ' <input type="text" class="large" id="anketa_akronim" name="akronim" value="' . $row['akronim'] . '" />';
+ echo ' <span class="charalimit" id="anketa_akronim_chars">' . strlen($row['akronim']) . '/'.ANKETA_AKRONIM_MAXLENGTH.'</span>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="opomba" value="0">';
+ echo '<input type="checkbox" id="opomba" name="opomba" value="1" '.(isset($row['intro_opomba']) && $row['intro_opomba'] != "" ? ' checked="checked"' : '').' onChange="toggleAnketaOpomba(); return false;">';
+ echo '<label for="opomba">'.$lang['srv_dodaj_opombo'].'</label> ';
+ echo '</div>';
+
+ echo '<div id="dodaj-opombo" class="setting_holder '.(isset($row['intro_opomba']) && $row['intro_opomba'] != "" ? '' : 'displayNone').'">';
+ echo ' <label for="anketa_note">'.$lang['srv_note'].':</label>';
+ echo ' <textarea id="anketa_note" name="intro_opomba" maxlength="'.ANKETA_NOTE_MAXLENGTH.'">' . $row['intro_opomba'] . '</textarea>';
+ echo ' <span class="charalimit" id="anketa_note_chars";">' . strlen($row['intro_opomba']) . '/'.ANKETA_NOTE_MAXLENGTH.'</span>';
+ echo '</div>';
+
// Ce ima uporabnik mape, lahko izbere v katero mapo se anketa uvrsti
UserSetting::getInstance()->Init($global_user_id);
$show_folders = UserSetting::getInstance()->getUserSetting('survey_list_folders');
@@ -122,24 +141,30 @@ class SurveyAdminSettings { $sqlF = sisplet_query("SELECT id, naslov FROM srv_mysurvey_folder WHERE usr_id='".$global_user_id."' ORDER BY naslov ASC");
if($show_folders == 1 && mysqli_num_rows($sqlF) > 0){
- echo '<span class="nastavitveSpan2">' . $lang['srv_newSurvey_survey_new_folder'] . ':</span>';
-
- echo '<select name="anketa_folder" id="anketa_folder">';
+
+ echo '<div id="anketa-toggle" class="setting_holder '.($selected_folder != 0 ? '' : 'bottom0').'">';
+ echo '<input type="hidden" name="mapa" value="0">';
+ echo '<input type="checkbox" id="mapa" name="mapa" value="1" '.($selected_folder != 0 ? ' checked="checked"' : '').' onChange="toggleAnketaMapa(); return false;">';
+ echo '<label for="mapa">'.$lang['srv_newSurvey_survey_new_folder'].'</label> ';
+ echo '</div>';
+
+ echo '<div id="dodaj-v-mapo" class="setting_holder '.($selected_folder != 0 ? '' : 'displayNone').'">';
+ echo '<label for="anketa_folder">'. $lang['srv_newSurvey_survey_new_folder'] .Help::display('srv_nova_shrani').':</label>';
+ echo '<select class="dropdown large w400" name="anketa_folder" id="anketa_folder">';
echo '<option value="0" '.($selected_folder == 0 ? ' selected="selected"' : '').'>'.$lang['srv_newSurvey_survey_new_folder_def'].'</option>';
while($rowF = mysqli_fetch_array($sqlF)){
echo '<option value="'.$rowF['id'].'" '.($rowF['id'] == $selected_folder ? ' selected="selected"' : '').'>'.$rowF['naslov'].'</option>';
}
echo '</select>';
- echo '<br />';
+
+ echo '</div>';
}
- echo '</fieldset>';
-
- echo '<br />';
+ echo '</fieldset>';
/* JEZIK */
echo '<fieldset>';
- echo '<legend>' . $lang['lang'] . '</legend>';
+ echo '<legend>' . $lang['lang'] . Help::display('srv_nastavitve_jezik').'</legend>';
$lang_admin = $row['lang_admin'];
$lang_resp = $row['lang_resp'];
@@ -165,53 +190,62 @@ class SurveyAdminSettings { $file = '../../lang/'.$lang_admin.'.php';
@include($file);
}
-
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_language_admin_survey'].':</span>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_language_admin_survey'].':</span>';
+
ksort($lang_array);
foreach ($lang_array AS $key => $val) {
- if ($key == 1 || $key == 2) {
- echo '<input type="radio" value="'.$key.'" id="lll_'.$key.'" '.($key==$lang_admin?' checked':'').' name="lang_admin" style="margin-bottom:5px;">';
- echo '<label for="lll_'.$key.'">'.$val.'</label> ';
+ if ($key == 1 || $key == 2) {
+ echo '<div class="setting_item">';
+ echo '<input type="radio" value="'.$key.'" id="lll_'.$key.'" '.($key==$lang_admin?' checked':'').' name="lang_admin">';
+ echo '<label for="lll_'.$key.'">'.$val.'</label>';
+ echo '</div>';
}
}
- echo '<br />';
+ echo '</div>';
+
+ echo '<div class="setting_horizontal_wrapper">';
+ echo '<div class="setting_holder">';
+ echo '<label for="lang_resp">'.$lang['srv_language_respons_1'].':</label>';
+
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_language_respons_1'].':</span>';
asort($lang_array);
- echo ' <select name="lang_resp">';
+ echo '<select class="dropdown large" id="lang_resp" name="lang_resp">';
foreach ($lang_array AS $key => $val) {
echo '<option value="'.$key.'" '.($key==$lang_resp?' selected':'').'>'.$val.'</option>';
}
- echo '</select>';
-
- echo '<br /><br />';
-
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_language_link2'].':</span>';
+ echo '</select>';
+ echo '</div>';
- // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
if($userAccess->checkUserAccess($what='prevajanje')){
- echo ' <a href="index.php?anketa='.$this->anketa.'&a=prevajanje" title="'.$lang['srv_language_link'].'"><span class="bold">'.$lang['srv_language_link'].'</span></a>';
- }
- else{
- echo ' <a href="#" onClick=popupUserAccess(\'prevajanje\'); return false;" title="'.$lang['srv_language_link'].'" class="user_access_locked"><span class="bold">'.$lang['srv_language_link'].'</span></a>';
+
+ $lang_link = 'window.location.href=\'index.php?anketa='.$this->anketa.'&a=prevajanje\'; return false;';
+ $color = 'white-black';
}
+ else{
+ $lang_link = 'popupUserAccess(\'prevajanje\'); return false;';
+ $color = 'yellow user_access_locked';
+ }
-
-
- echo '<div style="float:right;">'.$lang['srv_language_mySurveys'].'</div>';
-
+ echo '<div class="button_holder top0 bottom0">';
+ echo '<button class="medium '.$color.'" onClick="'.$lang_link.'">'.$lang['srv_multi_lang'].'</button>';
+ echo '</div>';
+
+
+ echo '</div>';
+
echo '</fieldset>';
-
- echo '<br />';
// Gumb shrani - vmes
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
-
- echo '<br class="clr" />';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
/* INTERAKTIVNI ELEMENTI */
@@ -231,210 +265,254 @@ class SurveyAdminSettings { $multiple_pages = true;
- // Indikator napredka
- //echo '<br />';
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_te_progressbar'].' '.Help::display('srv_show_progressbar').':</span>';
- echo '<label><input type="radio" name="progressbar" value="1" '.($row['progressbar'] == 1 && $multiple_pages ? ' checked="checked"' : '').' '.(!$multiple_pages ? ' disabled="disabled"' : '').'>' . $lang['yes'] . '</label> ';
- echo '<label><input type="radio" name="progressbar" value="0" '.($row['progressbar'] == 0 || !$multiple_pages ? ' checked="checked"' : '').' '.(!$multiple_pages ? ' disabled="disabled"' : '').'>' . $lang['no1'] . '</label> ';
+ // Indikator napredka
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="progressbar" value="0">';
+ echo '<input type="checkbox" id="progressbar" name="progressbar" value="1" '.($row['progressbar'] == 1 && $multiple_pages ? ' checked="checked"' : '').' '.(!$multiple_pages ? 'disabled' : '').'>';
+ echo '<label for="progressbar">'.$lang['srv_te_progressbar'].' '.Help::display('srv_show_progressbar').'</label> ';
+ echo '</div>';
// Naslov ankete za uporabnike
- echo '<br />';
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_show_title'].':</span>';
- echo '<label><input type="radio" name="survey_hide_title" value="0" '.($survey_hide_title == 0 ? ' checked="checked"' : '').'>' . $lang['yes'] . '</label> ';
- echo '<label><input type="radio" name="survey_hide_title" value="1" '.($survey_hide_title == 1 ? ' checked="checked"' : '').'>' . $lang['no1'] . '</label> ';
-
- // Politika zasebnosti
- echo '<br />';
- echo '<span class="nastavitveSpan3 bold"><label for="anketa_countType" >' . $lang['srv_privacy'] . ' '.Help::display('srv_privacy_setting').':</label></span>';
- echo '<label><input type="radio" name="privacy" value="0"' . ($survey_privacy == 0 ? ' checked="checked"' : '') . '>' . $lang['srv_privacy_0'] . '</label>' . "\n\r";
- echo '<label><input type="radio" name="privacy" value="1"' . ($survey_privacy == 1 ? ' checked="checked"' : '') . '>' . $lang['srv_privacy_1'] . '</label>' . "\n\r";
- echo '<label><input type="radio" name="privacy" value="2"' . ($survey_privacy == 2 ? ' checked="checked"' : '') . '>' . $lang['srv_privacy_2'] . '</label>' . "\n\r";
-
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="survey_hide_title" value="1">';
+ echo '<input type="checkbox" id="survey_hide_title" name="survey_hide_title" value="0" '.($survey_hide_title == 0 ? ' checked="checked"' : '').'>';
+ echo '<label for="survey_hide_title">'.$lang['srv_show_title'].'</label> ';
+ echo '</div>';
+
// Nadaljuj kasneje
- if($this->survey_type > 1){
- echo '<br />';
- echo '<span class="nastavitveSpan3 bold"><label>' . $lang['srv_show_continue_later'] . ' '.Help::display('srv_continue_later_setting').':</label></span>';
- echo '<label for="continue_later_1"><input type="radio" name="continue_later" value="1" id="continue_later_1"' . ($row['continue_later'] == 1 ? ' checked="checked"' : '') . '>' . $lang['yes'] . '</label>' . "\n\r";
- echo '<label for="continue_later_0"><input type="radio" name="continue_later" value="0" id="continue_later_0"' . ($row['continue_later'] == 0 ? ' checked="checked"' : '') . '>' . $lang['no1'] . '</label>' . "\n\r";
+ if($this->survey_type > 1 && !SurveyInfo::getInstance()->checkSurveyModule('panel')){
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="continue_later" value="0">';
+ echo '<input type="checkbox" id="continue_later" name="continue_later" value="1" '.($row['continue_later'] == 1 ? ' checked="checked"' : '').'>';
+ echo '<label for="continue_later">'.$lang['srv_show_continue_later'].' '.Help::display('srv_continue_later_setting').'</label> ';
+ echo '</div>';
}
-
+
// Gumb nazaj
- echo '<br />';
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_slideshow_sett_back_button_lbl'].':</span>';
- echo '<label for="display_backlink_1"><input type="radio" name="display_backlink" id="display_backlink_1" '.($display_backlink!=='0'?' checked':'').' value="">'.$lang['yes'].'</label> ';
- echo '<label for="display_backlink_0"><input type="radio" name="display_backlink" id="display_backlink_0" '.($display_backlink==='0'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br /><br />';
-
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="display_backlink" value="0">';
+ echo '<input type="checkbox" id="display_backlink" name="display_backlink" value="1" '.($display_backlink!=='0'?' checked':'').'>';
+ echo '<label for="display_backlink">'.$lang['srv_slideshow_sett_back_button_lbl'].'</label> ';
+ echo '</div>';
+
// Namig
- echo '<span class="nastavitveSpan3 bold"><label>' . $lang['srv_hint'] . ' '.Help::display('srv_namig_setting').':</label></span>';
- echo '<label><input type="radio" name="survey_hint" value="1"' . ($survey_hint == 1 ? ' checked="checked"' : '') . '>' . $lang['yes'] . '</label>' . "\n\r";
- echo '<label><input type="radio" name="survey_hint" value="0"' . ($survey_hint == 0 ? ' checked="checked"' : '') . '>' . $lang['no1'] . '</label>' . "\n\r";
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="survey_hint" value="0">';
+ echo '<input type="checkbox" id="survey_hint" name="survey_hint" value="1" '.($survey_hint == 1 ? ' checked="checked"' : '').'>';
+ echo '<label for="survey_hint">'.$lang['srv_hint'].' '.Help::display('srv_namig_setting').'</label> ';
+ echo '</div>';
+
+ /* KNJIZNICA */
+ $sqlk = sisplet_query("SELECT * FROM srv_library_anketa WHERE ank_id='$this->anketa' AND uid='$global_user_id'");
+ $moje = mysqli_num_rows($sqlk);
+ $sqlk = sisplet_query("SELECT * FROM srv_library_anketa WHERE ank_id='$this->anketa' AND uid='0'");
+ $javne = mysqli_num_rows($sqlk);
- //belezenje reminderjev
- /*echo '<br /><span class="nastavitveSpan3 bold"><label>' . $lang['srv_reminder_tracking'] . ':</label></span>';
- echo '<label><input type="radio" name="survey_track_reminders" value="1"' . ($survey_track_reminders == 1 ? ' checked="checked"' : '') . '>' . $lang['yes'] . '</label>' . "\n\r";
- echo '<label><input type="radio" name="survey_track_reminders" value="0"' . ($survey_track_reminders == 0 ? ' checked="checked"' : '') . '>' . $lang['no1'] . '</label>' . "\n\r";*/
+ if ($admin_type == 0 || $admin_type == 1) {
+
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="javne_ankete" value="0">';
+ echo '<input type="checkbox" id="javne_ankete" name="javne_ankete" value="1" '.($javne==1?' checked':'').' onchange="javascript:check_library();">';
+ echo '<label for="javne_ankete">'.$lang['srv_javne_ankete'].'</label> ';
+ echo '</div>';
+ }
- echo '<br />';
+ echo '<div class="setting_holder" id="moje_ankete">';
+ echo '<input type="hidden" name="moje_ankete" value="0">';
+ echo '<input type="checkbox" id="moje_ankete" name="moje_ankete" value="1" '.($moje==1?' checked':'').'>';
+ echo '<label for="moje_ankete">'.$lang['srv_moje_ankete'].' '.Help::display('srv_moje_ankete_setting').'</label> ';
+ echo '</div>';
+
+ ?>
+ <script>
+ check_library();
+ </script>
+ <?
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_opozorilo_vprasanja'].':</span>
- <a href="ajax.php?a=reminder_all&what=soft&anketa='.$this->anketa.'">'.$lang['srv_soft_reminder_all'].'</a>,
- <a href="ajax.php?a=reminder_all&what=hard&anketa='.$this->anketa.'">'.$lang['srv_hard_reminder_all'].'</a>,
- <a href="ajax.php?a=reminder_all&what=no&anketa='.$this->anketa.'">'.$lang['srv_no_reminder_all'].'</a>';
-
- echo '<br /><br />';
-
- // Napredni parapodatki
- if (($admin_type == 0 || $admin_type == 1) && $this->survey_type > 0) {
- echo '<span class="nastavitveSpan3 bold"><label>' . $lang['srv_parapodatki'] . ':</label></span>';
- echo '<label><input type="radio" name="parapodatki" value="1"' . ($row['parapodatki'] == 1 ? ' checked="checked"' : '') . '>' . $lang['yes'] . '</label>' . "\n\r";
- echo '<label><input type="radio" name="parapodatki" value="0"' . ($row['parapodatki'] == 0 ? ' checked="checked"' : '') . '>' . $lang['no1'] . '</label>' . "\n\r";
-
- echo '(Download: ';
- // Download tracking podatke
- echo '<a href="parapodatki.php?anketa='.$this->anketa.'&a=tracking" target="_blank">Editor data</a>, ';
- // Download parapodatke
- echo '<a href="parapodatki.php?anketa='.$this->anketa.'&a=parapodatki" target="_blank">Respondent data</a>, ';
- // Download vprasanja v anketi (srv_spremenljivka)
- echo '<a href="parapodatki.php?anketa='.$this->anketa.'&a=vprasanja" target="_blank">Survey questions</a>, ';
- // Download variable v vprasanjih (srv_vrednost)
- echo '<a href="parapodatki.php?anketa='.$this->anketa.'&a=items" target="_blank">Question items</a>';
- echo ') '.Help::display('srv_parapodatki');
- }
+ // Politika zasebnosti
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">' .$lang['srv_privacy'] .' '.Help::display('srv_privacy_setting').':</span>';
- echo '<br />';
-
- // Arhiviranje vprasanj - samo admini in managerji
- if ($admin_type == 0 || $admin_type == 1) {
- echo '<span class="nastavitveSpan3 bold">'.$lang['srv_vprasanje_tracking'].' '.Help::display('srv_vprasanje_tracking_setting').':</span>';
- echo '<label for="vprasanje_tracking_1"><input type="radio" name="vprasanje_tracking" id="vprasanje_tracking_1" '.($row['vprasanje_tracking']==1?' checked':'').' value="1">'.$lang['srv_avtomatsko'].'</label>';
- //echo '<input type="radio" name="vprasanje_tracking" id="vprasanje_tracking_1" '.($row['vprasanje_tracking']==1?' checked':'').' value="1"><label for="vprasanje_tracking_1">'.$lang['srv_avtomatsko'].' ('.$lang['srv_loop_always'].')</label>';
- //echo '<input type="radio" name="vprasanje_tracking" id="vprasanje_tracking_3" '.($row['vprasanje_tracking']==3?' checked':'').' value="3"><label for="vprasanje_tracking_3">'.$lang['srv_avtomatsko'].' ('.$lang['srv_potrditev'].')</label>';
- echo '<label for="vprasanje_tracking_2"><input type="radio" name="vprasanje_tracking" id="vprasanje_tracking_2" '.($row['vprasanje_tracking']==2?' checked':'').' value="2">'.$lang['srv_rocno'].'</label>';
- echo '<label for="vprasanje_tracking_0"><input type="radio" name="vprasanje_tracking" id="vprasanje_tracking_0" '.($row['vprasanje_tracking']==0?' checked':'').' value="0">'.$lang['no'].'</label>';
- }
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="privacy0" name="privacy" value="0"' . ($survey_privacy == 0 ? ' checked="checked"' : '') . '>';
+ echo '<label for="privacy0">'.$lang['srv_privacy_0'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="privacy1" name="privacy" value="1"' . ($survey_privacy == 1 ? ' checked="checked"' : '') . '>';
+ echo '<label for="privacy1">'.$lang['srv_privacy_1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="privacy2" name="privacy" value="2"' . ($survey_privacy == 2 ? ' checked="checked"' : '') . '>';
+ echo '<label for="privacy2">'.$lang['srv_privacy_2'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ // Oozorilo na vprašanja
+ echo '<div class="setting_holder">';
+ echo '<span class="seting_title">'.$lang['srv_opozorilo_vprasanja'].Help::display('srv_splosnenas_opozorilo').':</span>';
+ echo '<div class="setting_item">';
+ echo '<span class="blue pointer" onClick="popupAlertAll(\'no\')"><span class="faicon minus_circle link-right"></span>'.$lang['srv_no_reminder_all'].'</span>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<span class="blue pointer" onClick="popupAlertAll(\'soft\')"><span class="faicon link-right fa-stack"><span class="faicon circle empty fa-stack-1x"></span> <span class="faicon plus small fa-stack-1x"></span></span>'.$lang['srv_soft_reminder_all'].'</span>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<span class="blue pointer" onClick="popupAlertAll(\'hard\')"><span class="faicon plus_circle link-right"></span>'.$lang['srv_hard_reminder_all'].'</span>';
+ echo '</div>';
+
+ echo '</div>';
echo '</fieldset>';
+
/* ZAKLJUCEK (samo pri formi) */
if($row['survey_type'] == 1){
- echo '<br />';
+
echo '<fieldset>';
+
echo '<legend>'.$lang['srv_end_label'].'</legend>';
if ($row['url'] != '')
$url = $row['url'];
else
$url = $site_url;
-
- echo '<span class="nastavitveSpan2" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_concl_link'] . ': </label></span>';
- echo '<input type="radio" name="concl_link" value="0" '.($row['concl_link'] == 0 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').hide()">'.$lang['srv_concl_link_close'].' <input type="radio" name="concl_link" value="1" '.($row['concl_link'] == 1 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').show()">'.$lang['srv_concl_link_go'];
- echo '<div id="srv_concl_link_go" '.($row['concl_link'] == 0?' style="display:none"':'').'><span class="nastavitveSpan2" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_url'] . ': </label></span>';
- echo '<input type="text" name="url" id="url_concl_sett" value="'.$url.'" style="width:200px"></div>';
+
+ echo '<div class="setting_holder">';
+
+ echo '<span class="setting_title"><label for="anketa' . $row['id'] . '" >' . $lang['srv_concl_link'] . ':</label></span>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="concl_link0" name="concl_link" value="0" '.($row['concl_link'] == 0 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').hide()">';
+ echo ' <label for="concl_link0">'.$lang['srv_concl_link_close'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="concl_link1" name="concl_link" value="1" '.($row['concl_link'] == 1 ? ' checked' : '').' onclick="$(\'#srv_concl_link_go\').show()">';
+ echo ' <label for="concl_link1">'.$lang['srv_concl_link_go'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item" id="srv_concl_link_go" '.($row['concl_link'] == 0?' style="display:none"':'').'>';
+ echo ' <span class="setting_title"></span>';
+ echo ' <label for="anketa' . $row['id'] . '" >' . $lang['srv_url'] . ':</label>';
+ echo ' <form>';
+ echo ' <input type="text" class="large" name="url" id="url_concl_sett" value="'.$url.'">';
+ echo ' </form>';
+ echo '</div>';
+
+ echo '</div>';
+
// Prikaz zakljucka
- echo '<br />';
- echo '<span class="nastavitveSpan2" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_show_concl']. ': </label></span>';
- echo '<input type="radio" name="show_concl" value="0" '.(($row['show_concl'] == 0) ? ' checked="checked" ' : '').' onclick="$(\'#srv_concl_settings\').hide()" />'.$lang['no1'];
- echo '<input type="radio" name="show_concl" value="1" '.(($row['show_concl'] == 1) ? ' checked="checked" ' : '').' onclick="$(\'#srv_concl_settings\').show()" />'.$lang['yes'];
-
- echo '<div id="srv_concl_settings" '.($row['show_concl'] == 0?' style="display:none"':'').'>';
-
+ echo '<div class="setting_holder">';
+
+ echo '<span class="seting_title" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_show_concl']. ':</label></span>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="show_concl0" name="show_concl" value="0" '.(($row['show_concl'] == 0) ? ' checked="checked" ' : '').' onclick="$(\'#srv_concl_settings\').hide()" />';
+ echo ' <label for="show_concl0">'.$lang['no1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="show_concl1" name="show_concl" value="1" '.(($row['show_concl'] == 1) ? ' checked="checked" ' : '').' onclick="$(\'#srv_concl_settings\').show()" />';
+ echo ' <label for="show_concl1">'.$lang['yes'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+
// Besedilo zakljucka
+ echo '<div class="setting_holder" id="srv_concl_settings" '.($row['show_concl'] == 0?' style="display:none"':'').'>';
+
$text = ($row['conclusion'] == '') ? $lang['srv_end'] : $row['conclusion'];
- echo '<span class="nastavitveSpan2" ><label for="anketa' . $row['id'] . '" >' . $lang['text'] . ': </label></span>';
- echo '<span><textarea rows="5" cols="20" id="conclusion" name="conclusion">' . $text . '</textarea></span><br/>' . "\n\r";
-
+ echo '<label for="anketa' . $row['id'] . '" >' . $lang['text'] . ':</label>';
+ echo '<textarea id="conclusion" name="conclusion">' . $text . '</textarea>';
+
+ echo '</div>';
+
+
// Gumb konec
- echo '<br />';
- echo '<span class="nastavitveSpan1" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_concl_end_button_show'] . ': </label></span>';
- echo '<input type="radio" name="concl_end_button" value="0" '.(($row['concl_end_button'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'];
- echo '<input type="radio" name="concl_end_button" value="1" '.(($row['concl_end_button'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'];
+ echo '<div class="setting_holder">';
+
+ echo '<span class="setting_title" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_concl_end_button_show'] . ':</label></span>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="concl_end_button0" name="concl_end_button" value="0" '.(($row['concl_end_button'] == 0) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="concl_end_button0">'.$lang['no1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="concl_end_button1" name="concl_end_button" value="1" '.(($row['concl_end_button'] == 1) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="concl_end_button1">'.$lang['yes'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+
// Gumb nazaj
- echo '<br />';
- echo '<span class="nastavitveSpan1" ><label for="anketa' . $row['id'] . '" >' . $lang['srv_concl_back_button_show'] . ': </label></span>';
- echo '<input type="radio" name="concl_back_button" value="0" '.(($row['concl_back_button'] == 0) ? ' checked="checked" ' : '').' />'.$lang['no1'];
- echo '<input type="radio" name="concl_back_button" value="1" '.(($row['concl_back_button'] == 1) ? ' checked="checked" ' : '').' />'.$lang['yes'];
-
+ echo '<div class="setting_holder">';
+
+ echo '<span class="setting_title"><label for="anketa' . $row['id'] . '" >' . $lang['srv_concl_back_button_show'] . ':</label></span>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="concl_back_button0" name="concl_back_button" value="0" '.(($row['concl_back_button'] == 0) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="concl_back_button0">'.$lang['no1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo ' <input id="concl_back_button1" type="radio" name="concl_back_button" value="1" '.(($row['concl_back_button'] == 1) ? ' checked="checked" ' : '').' />';
+ echo ' <label for="concl_back_button1">'.$lang['yes'].'</label>';
echo '</div>';
+ echo '</div>';
+
+
echo '</fieldset>';
}
- echo '<br />';
-
- /* KNJIZNICA */
- $sqlk = sisplet_query("SELECT * FROM srv_library_anketa WHERE ank_id='$this->anketa' AND uid='$global_user_id'");
- $moje = mysqli_num_rows($sqlk);
- $sqlk = sisplet_query("SELECT * FROM srv_library_anketa WHERE ank_id='$this->anketa' AND uid='0'");
- $javne = mysqli_num_rows($sqlk);
-
- echo '<fieldset>';
- echo '<legend>'.$lang['srv_library'].'</legend>';
- if ($admin_type == 0 || $admin_type == 1) {
- echo '<span class="nastavitveSpan2" ><label>'.$lang['srv_javne_ankete'].':</label></span> <label><input type="radio" name="javne_ankete" value="0"'.($javne==0?' checked':'').' onchange="javascript:check_library();">'.$lang['no'].'</label> <label><input type="radio" name="javne_ankete" value="1"'.($javne==1?' checked':'').' onchange="javascript:check_library();">'.$lang['yes'].'</label>';
- echo '<br/>';
- }
-
- echo '<div id="moje_ankete">';
- echo '<span class="nastavitveSpan2"><label>'.$lang['srv_moje_ankete'].' '.Help::display('srv_moje_ankete_setting').':</label></span> <label><input type="radio" name="moje_ankete" value="0"'.($moje==0?' checked':'').'>'.$lang['no'].'</label> <label><input type="radio" name="moje_ankete" value="1"'.($moje==1?' checked':'').'>'.$lang['yes'].'</label>';
- echo '</div>';
-
- // zamakni
- echo '<br />';
- echo '<span class="nastavitveSpan2"><label>'.$lang['a_show'].'</label></span>';
- if ($row['flat'] == 0)
- echo '<span title="'.$lang['srv_flat_0'].'"><a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=flat&value=1"><span class="faicon flat_0"></span> '.$lang['srv_flat_0_short'].'</a></span> ';
- else
- echo '<span title="'.$lang['srv_flat_1'].'"><a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=flat&value=0"><span class="faicon flat_1"></span> '.$lang['srv_flat_0_short'].'</a></span> ';
- echo Help::display('srv_branching_flat');
-
- // odpri
- if ($row['popup'] == 1)
- echo '<span class="spaceLeft" title="'.$lang['srv_popup_1'].'"><a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=popup&value=0"><span class="faicon popup_1"></span> '.$lang['srv_popup_1_short'].'</a></span> ';
- else
- echo '<span class="spaceLeft" title="'.$lang['srv_popup_0'].'"><a href="index.php?anketa='.$this->anketa.'&a=branching&change_mode=1&what=popup&value=1"><span class="faicon popup_0"></span> '.$lang['srv_popup_1_short'].'</a></span> ';
- echo Help::display('srv_branching_popup');
-
- echo '</fieldset>';
-
- ?>
- <script>
- check_library();
- </script>
- <?
-
/* STEVILCENJE */
- echo '<br/>';
echo '<fieldset>';
echo '<legend>' . $lang['srv_nastavitveStevilcenje'] . '</legend>';
- echo '<span class="nastavitveSpan2"><label for="anketa_countType">' . $lang['srv_nastavitveStevilcenjeType'] . ':</label></span>';
- echo '<label for="countType_0"><input type="radio" name="countType" value="0" id="countType_0" checked="checked" onclick="saveGlobalSetting(\'countType\')"/>' . $lang['srv_nastavitveStevilcenjeType0'] . '</label>' . "\n\r";
- echo '<label for="countType_1"><input type="radio" name="countType" value="1" id="countType_1" ' . ($row['countType'] == 1 ? ' checked="checked"' : '') . ' onclick="saveGlobalSetting(\'countType\')"/>' . $lang['srv_nastavitveStevilcenjeType1'] . '</label>' . "\n\r";
- echo '<label for="countType_2"><input type="radio" name="countType" value="2" id="countType_2" ' . ($row['countType'] == 2 ? ' checked="checked"' : '') . ' onclick="saveGlobalSetting(\'countType\')"/>' . $lang['srv_nastavitveStevilcenjeType2'] . '</label>' . "\n\r";
- echo '<label for="countType_3"><input type="radio" name="countType" value="3" id="countType_3" ' . ($row['countType'] == 3 ? ' checked="checked"' : '') . ' onclick="saveGlobalSetting(\'countType\')"/>' . $lang['srv_nastavitveStevilcenjeType3'] . '</label>' . "\n\r";
-
- echo '<br />';
-
// Izklop prestevilcevanja
$enumerate = SurveySetting::getInstance()->getSurveyMiscSetting('enumerate'); if ($enumerate == '') $enumerate = 1;
- echo '<span class="nastavitveSpan2"><label for="anketa_enumerate">'.$lang['srv_nastavitvePrestevilcevanje'].':</label></span>';
- echo '<label for="enumerate_1"><input type="radio" name="enumerate" id="enumerate_1" '.($enumerate == 1 ? ' checked' : '').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="enumerate_0"><input type="radio" name="enumerate" id="enumerate_0" '.($enumerate == 0 ? ' checked' : '').' value="0">'.$lang['no'].'</label> ';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="enumerate" value="0">';
+ echo '<input type="checkbox" id="enumerate" name="enumerate" value="1" '.($enumerate == 1 ? ' checked' : '').'>';
+ echo '<label for="enumerate">'.$lang['srv_nastavitvePrestevilcevanje'].'</label> ';
+ echo '</div>';
+
+ //način številčenja
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title"><label for="anketa_countType">' . $lang['srv_nastavitveStevilcenjeType'] . ':</label></span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="countType" value="0" id="countType_0" checked="checked" onclick="saveGlobalSetting(\'countType\')"/>';
+ echo '<label for="countType_0">' . $lang['srv_nastavitveStevilcenjeType0'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="countType" value="1" id="countType_1" ' . ($row['countType'] == 1 ? ' checked="checked"' : '') . ' onclick="saveGlobalSetting(\'countType\')"/>';
+ echo '<label for="countType_1">' . $lang['srv_nastavitveStevilcenjeType1'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="countType" value="2" id="countType_2" ' . ($row['countType'] == 2 ? ' checked="checked"' : '') . ' onclick="saveGlobalSetting(\'countType\')"/>';
+ echo '<label for="countType_2">' . $lang['srv_nastavitveStevilcenjeType2'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="countType" value="3" id="countType_3" ' . ($row['countType'] == 3 ? ' checked="checked"' : '') . ' onclick="saveGlobalSetting(\'countType\')"/>';
+ echo '<label for="countType_3">' . $lang['srv_nastavitveStevilcenjeType3'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
echo '</fieldset>';
- echo '<br />';
-
/* JS TRACKING */
if ($admin_type == 0 || $admin_type == 1) {
echo '<fieldset><legend>'.$lang['srv_js_tracking'].'</legend>';
- //echo '<legend>' . $lang['srv_nastavitveStevilcenje'] . '</legend>';
- echo '<p><textarea name="js_tracking" cols="20" rows="5">'.$row['js_tracking'].'</textarea></p>';
- echo '<p style="color: gray">'.$lang['js_tracking_note'].'</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['js_tracking_note'].'</span>';
+ echo '<textarea class="textarea w800" name="js_tracking">'.$row['js_tracking'].'</textarea>';
+ echo '</div>';
+
echo '</fieldset>';
}
}
@@ -445,28 +523,56 @@ class SurveyAdminSettings { echo '<fieldset>';
echo '<legend>' . $lang['srv_data_valid_units_settings'] . '</legend>';
- echo '<p>';
- echo '<span class="strong" >'.$lang['srv_prikaz_default_valid'].'</span>';
- echo '<label><input type="radio" name="defValidProfile" '.($row['defValidProfile']==2?' checked':'').' value="2">'.'(5,6) '.$lang['srv_data_valid_units'].'</label>';
- echo '<label><input type="radio" name="defValidProfile" '.($row['defValidProfile']==3?' checked':'').' value="3">'.'(6) '.$lang['srv_data_finished_units'].'</label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title" >'.$lang['srv_prikaz_default_valid'].'</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="defValidProfile2" name="defValidProfile" '.($row['defValidProfile']==2?' checked':'').' value="2">';
+ echo '<label for="defValidProfile2">'.'(5,6) '.$lang['srv_data_valid_units'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="defValidProfile3" name="defValidProfile" '.($row['defValidProfile']==3?' checked':'').' value="3">';
+ echo '<label for="defValidProfile3">'.'(6) '.$lang['srv_data_finished_units'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
// Pri volitvah ne moremo prikazati datuma respondenta
- if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){
- echo '<p>';
- echo '<span class="strong" >'.$lang['srv_prikaz_showItime'].'</span>';
- echo '<label><input type="radio" name="showItime" '.((int)$row['showItime']==0?' checked':'').' value="0">'.$lang['no1'].'</label>';
- echo '<label><input type="radio" name="showItime" '.((int)$row['showItime']==1?' checked':'').' value="1">'.$lang['yes'].'</label>';
- echo '</p>';
+ /*if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title" >'.$lang['srv_prikaz_showItime'].'</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="showItime0" name="showItime" '.((int)$row['showItime']==0?' checked':'').' value="0">';
+ echo '<label for="showItime0">'.$lang['no1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="showItime1" name="showItime" '.((int)$row['showItime']==1?' checked':'').' value="1">';
+ echo '<label for="showItime1">'.$lang['yes'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
}
- echo '<p>';
- echo '<span class="strong" >'.$lang['srv_prikaz_showLineNumber'].'</span>';
- echo '<label><input type="radio" name="showLineNumber" '.((int)$row['showLineNumber']==0?' checked':'').' value="0">'.$lang['no1'].'</label>';
- echo '<label><input type="radio" name="showLineNumber" '.((int)$row['showLineNumber']==1?' checked':'').' value="1">'.$lang['yes'].'</label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title" >'.$lang['srv_prikaz_showLineNumber'].'</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="showLineNumber0" name="showLineNumber" '.((int)$row['showLineNumber']==0?' checked':'').' value="0">';
+ echo '<label for="showLineNumber0">'.$lang['no1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="showLineNumber1" name="showLineNumber" '.((int)$row['showLineNumber']==1?' checked':'').' value="1">';
+ echo '<label for="showLineNumber1">'.$lang['yes'].'</label>';
+ echo '</div>';
+
+ echo '</div>';*/
echo '</fieldset>';
+
+ echo '<form>';
+
}
/*Piskotek*/
@@ -475,9 +581,9 @@ class SurveyAdminSettings { // Pri volitvah ne moremo popravljati nastavitev piskotka
if(SurveyInfo::getInstance()->checkSurveyModule('voting')){
- echo '<fieldset style="position:relative">';
+ echo '<fieldset>';
echo '<legend>' . $lang['srv_cookie'] . '</legend>';
- echo '<span class="red bold">'.$lang['srv_voting_no_cookie'].'</span>';
+ echo '<span class="red">'.$lang['srv_voting_no_cookie'].'</span>';
echo '</fieldset>';
echo '</form>';
@@ -485,75 +591,146 @@ class SurveyAdminSettings { return;
}
- echo '<fieldset style="position:relative">';
+ echo '<fieldset>';
+
+ echo '<legend>' . $lang['settings'] . '</legend>';
+
+ // Piskotkov nimamo, ce imamo vklopljen modul panel
+ if(!SurveyInfo::getInstance()->checkSurveyModule('panel')){
+
+ echo '<div class="divPopUp_info warning_popup" id="cookie_alert">';
+ echo '<h2>'.$lang['srv_cookie_alert_title'].'</h2>';
+ echo '<p>'.$lang['srv_cookie_alert_1'].'</p>';
+ echo '<p>'.$lang['srv_cookie_alert_2'].'</p>';
+ echo '</div>';
+
+
+ // Shrani piskotek za X casa
+ echo '<div id="cookie_osnovno" class="setting_holder bottom8">';
+ echo '<span class="setting_title">' . $lang['srv_cookie'] . Help :: display('srv_cookie') .':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="cookie" value="-1" id="cookie_-1"' . ($row['cookie'] == -1 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />';
+ echo '<label for="cookie_-1">' . $lang['srv_cookie_-1'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="cookie" value="0" id="cookie_0"' . ($row['cookie'] == 0 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />';
+ echo '<label for="cookie_0">' . $lang['srv_cookie_0'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="cookie" value="1" id="cookie_1"' . ($row['cookie'] == 1 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />';
+ echo '<label for="cookie_1">' . $lang['srv_cookie_1'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="cookie" value="2" id="cookie_2"' . ($row['cookie'] == 2 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />';
+ echo '<label for="cookie_2">' . $lang['srv_cookie_2'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ echo '<div id="cookie_settings_wrap">';
+
+ // Ko se uporabnik vrne (zacne od zacetka/nadaljuje kjer je ostal)
+
+ echo '<div class="setting_holder indent">';
+ echo '<span class="setting_title">' . $lang['srv_cookie_return'] . Help :: display('srv_cookie_return') . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="cookie_return" value="0" id="cookie_return_0"' . ($row['cookie_return'] == 0 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />';
+ echo '<label for="cookie_return_0">' . $lang['srv_cookie_return_start'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item no-cookie">';
+ echo '<input type="radio" name="cookie_return" value="1" id="cookie_return_1"' . ($row['cookie_return'] == 1 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />';
+ echo '<label for="cookie_return_1">' . $lang['srv_cookie_return_middle'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ // Ce je zakljucil lahko naknadno ureja svoje odgovore
+ echo '<div class="setting_holder bottom16 indent no-cookie no-cookie-return">';
+ echo '<span class="setting_title" >' . $lang['srv_return_finished'] . Help :: display('srv_return_finished') . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="return_finished" value="1" id="return_finished_1"' . ($row['return_finished'] == 1 ? ' checked="checked"' : '') . ' />';
+ echo '<label for="return_finished_1">' . $lang['srv_return_finished_yes'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="return_finished" value="0" id="return_finished_0"' . ($row['return_finished'] == 0 ? ' checked="checked"' : '') . ' />';
+ echo '<label for="return_finished_0">' . $lang['srv_return_finished_no'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</div>';
+ }
+
+
+ // Nikoli ne more popravljati svojih odgovorov (tudi ce se npr. vrne na prejsnjo stran)
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title" >' . $lang['srv_subsequent_answers'] . Help :: display('srv_subsequent_answers') . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="subsequent_answers" value="1" id="subsequent_answers_1"' . ($row['subsequent_answers'] == 1 ? ' checked="checked"' : '') . ' />';
+ echo '<label for="subsequent_answers_1">' . $lang['srv_subsequent_answers_yes'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="subsequent_answers" value="0" id="subsequent_answers_0"' . ($row['subsequent_answers'] == 0 ? ' checked="checked"' : '') . ' />';
+ echo '<label for="subsequent_answers_0">' . $lang['srv_subsequent_answers_no'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
- echo '<div id="cookie_alert" class="google_yellow">';
- echo '<span class="">'.$lang['srv_cookie_alert_title'].'</span>';
- echo '<span class="">'.$lang['srv_cookie_alert_1'].'</span>';
- echo '<span class="">'.$lang['srv_cookie_alert_2'].'</span>';
- echo '<span class="">'.$lang['srv_cookie_alert'].'</span>';
- echo '</div>';
-
- echo '<legend>' . $lang['srv_cookie'] . '</legend>';
-
- // Shrani piskotek za X casa
- echo '<span class="nastavitveSpan3 bold" ><label>' . $lang['srv_cookie'] . Help :: display('srv_cookie') .':</label></span>';
- echo ' <label for="cookie_-1"><input type="radio" name="cookie" value="-1" id="cookie_-1"' . ($row['cookie'] == -1 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />' . $lang['srv_cookie_-1'] . '</label>' . "\n\r";
- echo ' <label for="cookie_0"><input type="radio" name="cookie" value="0" id="cookie_0"' . ($row['cookie'] == 0 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />' . $lang['srv_cookie_0'] . '</label>' . "\n\r";
- echo ' <label for="cookie_1"><input type="radio" name="cookie" value="1" id="cookie_1"' . ($row['cookie'] == 1 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />' . $lang['srv_cookie_1'] . '</label>' . "\n\r";
- echo ' <label for="cookie_2"><input type="radio" name="cookie" value="2" id="cookie_2"' . ($row['cookie'] == 2 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />' . $lang['srv_cookie_2'] . '</label>' . "\n\r";
- echo '<br/>';
-
- // Ko se uporabnik vrne (zacne od zacetka/nadaljuje kjer je ostal)
- echo '<span class="nastavitveSpan3 bold" ><label>' . $lang['srv_cookie_return'] . Help :: display('srv_cookie_return') . ':</label></span>';
- echo ' <label for="cookie_return_0"><input type="radio" name="cookie_return" value="0" id="cookie_return_0"' . ($row['cookie_return'] == 0 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />' . $lang['srv_cookie_return_start'] . '</label>' . "\n\r";
- echo ' <div class="no-cookie"><label for="cookie_return_1"><input type="radio" name="cookie_return" value="1" id="cookie_return_1"' . ($row['cookie_return'] == 1 ? ' checked="checked"' : '') . ' onclick="checkcookie();" />' . $lang['srv_cookie_return_middle'] . '</label></div>' . "\n\r";
- echo '<br>';
-
- // Ce je zakljucil lahko naknadno ureja svoje odgovore
- echo '<div class="no-cookie no-cookie-return"><span class="nastavitveSpan3 bold" ><label>' . $lang['srv_return_finished'] . Help :: display('srv_return_finished') . ':</label></span>';
- echo ' <label for="return_finished_1"><input type="radio" name="return_finished" value="1" id="return_finished_1"' . ($row['return_finished'] == 1 ? ' checked="checked"' : '') . ' />' . $lang['srv_return_finished_yes'] . '</label>' . "\n\r";
- echo ' <label for="return_finished_0"><input type="radio" name="return_finished" value="0" id="return_finished_0"' . ($row['return_finished'] == 0 ? ' checked="checked"' : '') . ' />' . $lang['srv_return_finished_no'] . '</label></div>' . "\n\r";
- echo '<br/>';
-
- // Nikoli ne more popravljati svojih odgovorov (tudi ce se npr. vrne na prejsnjo stran)
- echo '<div class="no-subsequent-answers"><span class="nastavitveSpan3 bold" ><label>' . $lang['srv_subsequent_answers'] . Help :: display('srv_subsequent_answers') . ':</label></span>';
- echo ' <label for="subsequent_answers_1"><input type="radio" name="subsequent_answers" value="1" id="subsequent_answers_1"' . ($row['subsequent_answers'] == 1 ? ' checked="checked"' : '') . ' />' . $lang['srv_subsequent_answers_yes'] . '</label>' . "\n\r";
- echo ' <label for="subsequent_answers_0"><input type="radio" name="subsequent_answers" value="0" id="subsequent_answers_0"' . ($row['subsequent_answers'] == 0 ? ' checked="checked"' : '') . ' />' . $lang['srv_subsequent_answers_no'] . '</label></div>' . "\n\r";
- echo '<br/>';
-
- // Ce ni sprejel piskotka lahko/ne more nadaljevati
- echo '<div class="no-cookie"><span class="nastavitveSpan3 bold" ><label>' . $lang['srv_cookie_continue'] . Help :: display('srv_cookie_continue') . ':</label></span>';
- echo ' <label for="cookie_continue_1"><input type="radio" name="cookie_continue" value="1" id="cookie_continue_1"' . ($row['cookie_continue'] == 1 ? ' checked="checked"' : '') . ' />' . $lang['srv_cookie_continue_yes'] . '</label>' . "\n\r";
- echo ' <label for="cookie_continue_0"><input type="radio" name="cookie_continue" value="0" id="cookie_continue_0"' . ($row['cookie_continue'] == 0 ? ' checked="checked"' : '') . ' />' . $lang['srv_cookie_continue_no'] . '</label></div>' . "\n\r";
- echo '<br/>';
-
- echo '<br/>';
// Prepoznaj respondenta
- echo '<span class="nastavitveSpan3 bold" ><label>' . $lang['srv_user'] . Help :: display('srv_user_from_cms') . ':</label></span>';
- echo ' <label for="user_1"><input type="radio" name="user_from_cms" value="1" id="user_1"' . ($row['user_from_cms'] == 1 ? ' checked="checked"' : '') . ' onclick="javascript:checkcookie(); $(\'#user_1_email\').removeAttr(\'disabled\')" />' . $lang['srv_respondent'] . '</label>' . "\n\r";
- echo ' <label for="user_2"><input type="radio" name="user_from_cms" value="2" id="user_2"' . ($row['user_from_cms'] == 2 ? ' checked="checked"' : '') . ' onclick="javascript:checkcookie(); $(\'#user_1_email\').removeAttr(\'disabled\')" />' . $lang['srv_vnasalec'] . '</label>' . "\n\r";
- echo ' <label for="user_0"><input type="radio" name="user_from_cms" value="0" id="user_0"' . ($row['user_from_cms'] == 0 ? ' checked="checked"' : '') . ' onclick="javascript:checkcookie(); $(\'#user_1_email\').attr(\'disabled\', true); _user_from_cms(); " />' . $lang['no1'] . '</label>' . "\n\r";
- echo '<br/>';
+ echo '<div class="setting_holder" id="prepoznaj_respondenta">';
+ echo '<span class="setting_title">' . $lang['srv_user'] . Help :: display('srv_user_from_cms') . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="user_from_cms" value="1" id="user_1"' . ($row['user_from_cms'] == 1 ? ' checked="checked"' : '') . ' onclick="javascript:checkcookie(); $(\'#user_1_email\').removeAttr(\'disabled\')" />';
+ echo '<label for="user_1">' . $lang['srv_respondent'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="user_from_cms" value="2" id="user_2"' . ($row['user_from_cms'] == 2 ? ' checked="checked"' : '') . ' onclick="javascript:checkcookie(); $(\'#user_1_email\').removeAttr(\'disabled\')" />';
+ echo '<label for="user_2">' . $lang['srv_vnasalec'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="user_from_cms" value="0" id="user_0"' . ($row['user_from_cms'] == 0 ? ' checked="checked"' : '') . ' onclick="javascript:checkcookie(); $(\'#user_1_email\').attr(\'disabled\', true); _user_from_cms(); " />';
+ echo '<label for="user_0">' . $lang['no1'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
// Ob izpolnjevanju prikazi email
- echo '<div id="cms_email">';
- echo ' <span class="nastavitveSpan3 bold" > </span><label>' . $lang['srv_user_cms_show'] . Help :: display('srv_user_from_cms_email') . ':</label>';
- echo ' <label for="user_1_email"><input type="checkbox" name="user_from_cms_email" value="1" id="user_1_email"' . ($row['user_from_cms_email'] == 1 ? ' checked="checked"' : '') . ' '.($row['user_from_cms']>0?'':' disabled="true" ').'/>' . $lang['srv_user_cms_email'] . '</label>' . "\n\r";
- echo '</div>';
-
+ echo '<div class="setting_holder" id="cms_email">';
+ echo '<span class="setting title">' . $lang['srv_user_cms_show'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="user_from_cms_email" value="1" id="user_1_email"' . ($row['user_from_cms_email'] == 1 ? ' checked="checked"' : '') . ' '.($row['user_from_cms']>0?'':' disabled="true" ').'/>';
+ echo '<label for="user_1_email">' . $lang['srv_user_cms_email'] . '</label>';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
// Masovno vnasanje - modul Vnos
- echo '<fieldset id="vnos_modul" style="margin-top: 15px !important;"><legend>'.$lang['srv_vrsta_survey_type_5'].'</legend>';
-
- echo ' <p>'.$lang['srv_vnos_navodila'].'</p>';
+ echo '<fieldset id="vnos_modul"><legend>'.$lang['srv_vrsta_survey_type_5'].'</legend>';
- echo ' <span class="nastavitveSpan3 bold"><label>' . $lang['srv_mass_input']. Help :: display('srv_mass_insert') . ':</label></span>';
- echo ' <input type="radio" name="mass_insert" value="1" id="mass_insert_1"' . ($row['mass_insert'] == 1 ? ' checked="checked"' : '') . ' /><label for="mass_insert_1">' . $lang['srv_mass_input_1'] . '</label>' . "\n\r";
- echo ' <input type="radio" name="mass_insert" value="0" id="mass_insert_0"' . ($row['mass_insert'] == 0 ? ' checked="checked"' : '') . ' /><label for="mass_insert_0">' . $lang['srv_mass_input_0'] . '</label>' . "\n\r";
+ echo '<p class="bottom16">'.$lang['srv_vnos_navodila'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">' . $lang['srv_mass_input'] . ':</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mass_insert" value="1" id="mass_insert_1"' . ($row['mass_insert'] == 1 ? ' checked="checked"' : '') . ' />';
+ echo '<label for="mass_insert_1">' . $lang['srv_mass_input_1'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mass_insert" value="0" id="mass_insert_0"' . ($row['mass_insert'] == 0 ? ' checked="checked"' : '') . ' />';
+ echo '<label for="mass_insert_0">' . $lang['srv_mass_input_0'] . '</label>';
+ echo '</div>';
+
echo '</fieldset>';
// For modul maza, show all cookie settings
@@ -563,36 +740,37 @@ class SurveyAdminSettings { function checkcookie () {
- if ($('input[name=cookie]:checked').val() == '-1' && $('input[name=user_from_cms]:checked').val() == '0' && <?echo $row['user_base'];?> != 1 && <?echo $isMaza;?> != 1) {
- $('input[name=cookie_return]').attr('disabled', true);
- $('input[name=return_finished]').attr('disabled', true);
- $('.no-cookie').css('visibility', 'hidden');
+ if ($('input[name=cookie]:checked').val() == '-1' && $('input[name=user_from_cms]:checked').val() == '0' && <?echo $row['user_base'];?> != 1 && <?echo $isMaza;?> != 1) {
+ $('#cookie_settings_wrap').addClass('displayNone');
+ $('#cookie_osnovno').removeClass('bottom8');
}
else {
- $('input[name=cookie_return]').attr('disabled', false);
- $('input[name=return_finished]').attr('disabled', false);
- $('.no-cookie').css('visibility', 'visible');
+ $('#cookie_settings_wrap').removeClass('displayNone');
+ $('#cookie_osnovno').addClass('bottom8');
}
if ( $('input[name=cookie_return]:checked').val() == 1 ) {
- $('.no-cookie-return').css('visibility', 'hidden');
+ $('.no-cookie-return').addClass('displayNone');
}
else {
- $('.no-cookie-return').css('visibility', 'visible');
+ $('.no-cookie-return').removeClass('displayNone');
}
if ( $('input[name=user_from_cms]:checked').val() == 0 ) {
- $('#cms_email').css('visibility', 'hidden');
+ $('#cms_email').addClass('displayNone');
+ $('#prepoznaj_respondenta').addClass('bottom0');
}
else {
- $('#cms_email').css('visibility', 'visible');
+ $('#cms_email').removeClass('displayNone');
+ $('#prepoznaj_respondenta').removeClass('bottom0');
+
}
if ( $('input[name=user_from_cms]:checked').val() == 2 ) {
- $('#vnos_modul').show();
+ $('#vnos_modul').removeClass('displayNone');
}
else {
- $('#vnos_modul').hide();
+ $('#vnos_modul').addClass('displayNone');
}
}
@@ -605,22 +783,22 @@ class SurveyAdminSettings { $sqlDostopAvtor = sisplet_query($stringDostopAvtor);
$rowDostopAvtor = mysqli_fetch_assoc($sqlDostopAvtor);
$avtorRow = SurveyInfo::getInstance()->getSurveyRow();
-
-
- echo '<br/>';
echo '<fieldset>';
echo '<legend>' . $lang['access'] . '</legend>';
- echo '<span class="nastavitveSpan3" ><label for="odgovarja">' . $lang['srv_izpolnjujejo'] . Help :: display('srv_izpolnjujejo') .': </label></span>';
- echo ' <select name="odgovarja" id="odgovarja" onchange="javascript:_odgovarja();" class="spaceLeft">';
- echo ' <option value="4"' . ($row['odgovarja'] == 4 ? ' selected="selected"' : '') . '>' . $lang['forum_hour_all'] . '</option>';
- echo ' <option value="3"' . ($row['odgovarja'] == 3 ? ' selected="selected"' : '') . '>' . $lang['forum_registered'] . '</option>';
- echo ' <option value="2"' . ($row['odgovarja'] == 2 ? ' selected="selected"' : '') . '>' . $lang['forum_clan'] . '</option>';
- echo ' <option value="1"' . ($row['odgovarja'] == 1 ? ' selected="selected"' : '') . '>' . $lang['forum_manager'] . '</option>';
- echo ' <option value="0"' . ($row['odgovarja'] == 0 ? ' selected="selected"' : '') . '>' . $lang['forum_admin'] . '</option>';
- echo ' </select>';
- echo '<br />';
+
+ /*echo '<div class="setting_holder">';
+ echo '<span class="setting_title" ><label for="odgovarja">' . $lang['srv_izpolnjujejo'] . Help :: display('srv_izpolnjujejo') .': </label></span>';
+ echo '<select name="odgovarja" id="odgovarja" onchange="javascript:_odgovarja();" class="dropdown large">';
+ echo '<option value="4"' . ($row['odgovarja'] == 4 ? ' selected="selected"' : '') . '>' . $lang['forum_hour_all'] . '</option>';
+ echo '<option value="3"' . ($row['odgovarja'] == 3 ? ' selected="selected"' : '') . '>' . $lang['forum_registered'] . '</option>';
+ echo '<option value="2"' . ($row['odgovarja'] == 2 ? ' selected="selected"' : '') . '>' . $lang['forum_clan'] . '</option>';
+ echo '<option value="1"' . ($row['odgovarja'] == 1 ? ' selected="selected"' : '') . '>' . $lang['forum_manager'] . '</option>';
+ echo '<option value="0"' . ($row['odgovarja'] == 0 ? ' selected="selected"' : '') . '>' . $lang['forum_admin'] . '</option>';
+ echo '</select>';
+ echo '</div>';*/
+
echo '<script language="javascript">'."\n";
echo ' function _user_from_cms() {'."\n";
echo ' document.settingsanketa_' . $row['id'] . '.odgovarja.value = \'4\''."\n";
@@ -631,23 +809,40 @@ class SurveyAdminSettings { echo ' }'."\n";
echo '}'."\n";
echo '</script>'."\n";
-
- echo '<br/>';
-
- echo '<span class="nastavitveSpan3 bold" ><label>' . $lang['srv_block_ip'] . Help :: display('srv_block_ip') . ':</label></span>';
- echo ' <label for="block_ip_0"><input type="radio" name="block_ip" value="0" id="block_ip_0"' . ($row['block_ip'] == 0 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').hide();" />' . $lang['no1'] . '</label>' . "\n\r";
- echo ' <label for="block_ip_10"><input type="radio" name="block_ip" value="10" id="block_ip_10"' . ($row['block_ip'] == 10 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').show();" />10 min</label>' . "\n\r";
- echo ' <label for="block_ip_20"><input type="radio" name="block_ip" value="20" id="block_ip_20"' . ($row['block_ip'] == 20 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').show();" />20 min</label>' . "\n\r";
- echo ' <label for="block_ip_60"><input type="radio" name="block_ip" value="60" id="block_ip_60"' . ($row['block_ip'] == 60 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').show();" />60 min</label>' . "\n\r";
- echo ' <label for="block_ip_720"><input type="radio" name="block_ip" value="720" id="block_ip_720"' . ($row['block_ip'] == 720 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').show();" />12 '.$lang['hour_hours2'].'</label>' . "\n\r";
- echo ' <label for="block_ip_1440"><input type="radio" name="block_ip" value="1440" id="block_ip_1440"' . ($row['block_ip'] == 1440 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').show();" />24 '.$lang['hour_hours2'].'</label>' . "\n\r";
- echo '<br /><br /><span id="block_ip_warning" class="bold" style="margin-left:117px; '.($row['block_ip'] == 0 ? ' display:none;' : '').'">'.$lang['srv_block_ip_warning'].'</span>';
- echo '</fieldset>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">' . $lang['srv_block_ip'] . Help :: display('srv_block_ip') . ':</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="block_ip" value="0" id="block_ip_0"' . ($row['block_ip'] == 0 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').addClass(\'displayNone\');" />';
+ echo '<label for="block_ip_0">' . $lang['no1'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="block_ip" value="10" id="block_ip_10"' . ($row['block_ip'] == 10 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').removeClass(\'displayNone\');" />';
+ echo '<label for="block_ip_10">10 min</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="block_ip" value="20" id="block_ip_20"' . ($row['block_ip'] == 20 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').removeClass(\'displayNone\');" />';
+ echo '<label for="block_ip_20">20 min</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="block_ip" value="60" id="block_ip_60"' . ($row['block_ip'] == 60 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').removeClass(\'displayNone\');" />';
+ echo '<label for="block_ip_60">60 min</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="block_ip" value="720" id="block_ip_720"' . ($row['block_ip'] == 720 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').removeClass(\'displayNone\');" />';
+ echo '<label for="block_ip_720">12 '.$lang['hour_hours2'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="block_ip" value="1440" id="block_ip_1440"' . ($row['block_ip'] == 1440 ? ' checked="checked"' : '') . ' onChange="$(\'#block_ip_warning\').removeClass(\'displayNone\');" />';
+ echo '<label for="block_ip_1440">24 '.$lang['hour_hours2'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
- echo '<br/>';
-
+ echo '<p id="block_ip_warning" class="top16 red '.($row['block_ip'] == 0 ? ' displayNone' : '').'">'.$lang['srv_block_ip_warning'].'</p>';
+
+ echo '</fieldset>';
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
global $global_user_id;
@@ -661,7 +856,7 @@ class SurveyAdminSettings { }
else{
- echo '<div id="password">';
+ echo '<div class="setting_holder" id="password">';
$ss = new SurveySkupine($this->anketa);
$spr_id = $ss->hasSkupine(2);
@@ -682,19 +877,42 @@ class SurveyAdminSettings { echo '</script>';
// dodajanje gesel za anketo
- if($spr_id > 0){
- $vrednosti = $ss->getVrednosti($spr_id);
- if($vrednosti != 0){
- foreach($vrednosti as $vrednost){
- echo '<p>';
- echo '<strong>'.$vrednost['naslov'].'</strong><span class="faicon delete_circle icon-orange_link spaceLeft" style="margin-bottom:1px;" onclick="delete_skupina(\'2\', \''.$vrednost['id'].'\', \''.$vrednost['naslov'].'\');"></span>';
- echo '</p>';
- }
- }
- }
- echo '<p class="add_skupina_button"><input type="text" name="skupina" autocomplete="off" onKeyUp="add_skupina_enter(\'2\', event);" /> <input type="button" value="'.$lang['add'].'" onclick="add_skupina(\'2\');" /></p>';
-
- echo '<span class="buttonwrapper floatLeft"><a class="ovalbutton ovalbutton_orange" href="#" onClick="display_add_passwords_mass();">'.$lang['srv_password_add_mass'].'</a></span>';
+
+ echo '<div class="setting_holder bottom0">';
+ echo '<div class="button_holder inline bottom16">';
+ echo '<input type="text" class="large" name="skupina" autocomplete="off" onKeyUp="add_skupina_enter(\'2\', event);" />';
+ echo '<button type="button" class="medium blue" onclick="add_skupina(\'2\');">'.$lang['add'].'</button>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div>';
+
+ echo '<table id="passwords_table" '.(($spr_id == 0) ? 'class="displayNone"' : '').'>';
+
+ echo '<tr>';
+ echo '<th>'.$lang['password'].'</th>';
+ echo '<th></th>';
+ echo '</tr>';
+
+ if($spr_id > 0){
+ $vrednosti = $ss->getVrednosti($spr_id);
+ if($vrednosti != 0){
+ foreach($vrednosti as $vrednost){
+ echo '<tr>';
+ echo '<td>'.$vrednost['naslov'].'</td>';
+ echo '<td class="right"><button class="table-inline blue caps" type="button" onclick="delete_skupina(\'2\', \''.$vrednost['id'].'\');">'.$lang['srv_password_remove'].'</button></td>';
+ echo '</tr>';
+ }
+ }
+ }
+
+ echo '</table>';
+ echo '</div>';
+
+
+ echo '<div class="setting_holder">';
+ echo '<a class="noline" href="#" onClick="display_add_passwords_mass();"><span class="faicon file-import flipX link-right"></span>'.$lang['srv_password_add_mass'].'</a>';
+ echo '</div>';
echo '</div>';
}
@@ -721,18 +939,10 @@ class SurveyAdminSettings { echo '<span class="buttonwrapper floatLeft spaceRight"><a class="ovalbutton ovalbutton_gray" href="'.$url.'"><span>'.$lang['back'] . '</span></a></span>';
}
}
- echo '<span class="buttonwrapper floatLeft"><a class="ovalbutton ovalbutton_orange" onclick="submitSurveyDuration();return false;" href="#"><span>';
- echo $lang['edit1337'] . '</span></a></span>';
-
- /*
- $http_referer = parse_url($_SERVER['HTTP_REFERER']); //If yes, parse referrer
- $referer_url = $http_referer['query'];
- if (preg_match('/anketa='.$this->anketa.'&a'.A_VABILA.'/', $referer_url)) {
- echo '<div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="'.$_SERVER['HTTP_REFERER'].'"><span>';
- echo $lang['srv_back_to_email'] . '</span></a></div>';
- echo '</div>';
- }
- */
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="submitSurveyDuration();return false;" href="#">'.$lang['edit1337'].'</button>';
+ echo '</div>';
}
/*Respondenti*/
@@ -744,11 +954,13 @@ class SurveyAdminSettings { /*Komentarji*/
if ($_GET['a'] == 'urejanje') {
+
// tukaj bom dodal še kontrolo na Avtorja ankete, tako da avtor lahko vedno spreminja urejanje (gorazd,1.9.2009)
$stringDostopAvtor = "SELECT count(*) as isAvtor FROM srv_dostop WHERE ank_id = '" . $this->anketa . "' AND uid='" . $global_user_id . "'";
$sqlDostopAvtor = sisplet_query($stringDostopAvtor);
$rowDostopAvtor = mysqli_fetch_assoc($sqlDostopAvtor);
- if ($admin_type == 0 || $rowDostopAvtor['isAvtor']) {
+
+ if ($admin_type == 0 || $rowDostopAvtor['isAvtor'] || isDemoSurvey($this->anketa)) {
SurveySetting::getInstance()->Init($this->anketa);
@@ -796,7 +1008,17 @@ class SurveyAdminSettings { $preview_disable_test_insert = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disable_test_insert');
if ( isset($_GET['show']) && $_GET['show']=='on_alert' ) {
- echo '<div class="comments_on_alert google_yellow">'.$lang['srv_comments_on_alert'].' <a href="ajax.php?anketa='.$this->anketa.'&a=comments_onoff&do=off">'.$lang['srv_off'].'.</a> '.$lang['srv_comments_on_alert2'].' <a href="https://www.1ka.si/d/sl/pomoc/vodic-za-uporabnike/testiranje/komentarji/?from1ka=1" target="_blank">'.$lang['srv_anl_more'].'</a></div>';
+ echo '<div class="comments_on_alert google_yellow">';
+
+ echo ' <div class="title"><span class="faicon success"></span>'.$lang['srv_comments_on_alert'].'</div>';
+
+ echo ' <div class="text">';
+ echo $lang['srv_comments_on_alert1'].' <a href="ajax.php?anketa='.$this->anketa.'&a=comments_onoff&do=off">'.$lang['srv_here'].'</a>. ';
+ echo $lang['srv_comments_on_alert2'];
+ echo ' <a href="https://www.1ka.si/d/sl/pomoc/vodic-za-uporabnike/testiranje/komentarji/?from1ka=1" target="_blank">'.$lang['srv_more_info'].'</a>.';
+ echo ' </div>';
+
+ echo '</div>';
}
$css_width = '';
@@ -805,41 +1027,48 @@ class SurveyAdminSettings { $css_width2 = 'width:45% !important;';
}
- echo '<fieldset style="float: left;'.$css_width.'"><legend>'.$lang['comments'].'</legend>';
+ $advanced_expanded = isset($_GET['advanced_expanded']) ? $_GET['advanced_expanded'] : '';
- echo '<p><input type="checkbox" name="comments_default" id="comments_admin1" onclick="comments_admin_toggle(\'1\')" admin_on="false" /><label for="comments_admin1" style="font-weight:500; vertical-align:inherit"> '.$lang['srv_comments_admin_on1'].'</label><br /> ('.$lang['srv_comments_admin_note1'].')</p>';
- echo '<p><input type="checkbox" name="comments_resp2" id="comments_resp2" onclick="comments_resp_toggle(\'2\')" resp_on="false" /><label for="comments_resp2" style="font-weight:500; vertical-align:inherit"> '.$lang['srv_comments_resp_on2'].'</label><br /> ('.$lang['srv_comments_resp_note2'].')</p>';
- echo '<p><input type="checkbox" name="comments_default" id="comments_admin2" onclick="comments_admin_toggle(\'2\')" admin_on="false" /><label for="comments_admin2" style="font-weight:500; vertical-align:inherit"> '.$lang['srv_comments_admin_on2'].'</label><br /> ('.$lang['srv_comments_admin_note2'].')</p>';
- echo '<p><input type="checkbox" name="comments_default" id="comments_resp" onclick="comments_resp_toggle(\'1\')" resp_on="false" /><label for="comments_resp" style="font-weight:500; vertical-align:inherit"> '.$lang['srv_comments_resp_on'].'</label><br /> ('.$lang['srv_comments_resp_note'].')</p>';
- //echo '<input type="radio" name="comments_defalut" id="comments_default_on" disabled /> <a href="#" onclick="comments_default_on(); return false;">'.$lang['srv_comments_default_on'].'</a><br />';
- //echo '<input type="radio" name="comments_defalut" id="comments_on" disabled /> '.$lang['srv_comments_on'].'<br />';
- //echo '<input type="radio" name="comments_defalut" id="comments_default_off" disabled /> <a href="#" onclick="comments_default_off(); return false;">'.$lang['srv_comments_default_off'].'</a>';
-
+ echo '<fieldset class="comments"><legend>'.$lang['comments'].'</legend>';
+
+ echo '<p class="semi-bold caps bottom16">'.$lang['srv_admin_s_comments_editor'].'</p>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" name="comments_default" id="comments_admin1" onclick="comments_admin_toggle(\'1\')" admin_on="false" /><label class="semi-bold" for="comments_admin1"> '.$lang['srv_comments_admin_on1'].'</label>';
+ echo '<p class="indent">('.$lang['srv_comments_admin_note1'].')</p>';
+ echo '</div>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" name="comments_default" id="comments_admin2" onclick="comments_admin_toggle(\'2\')" admin_on="false" /><label class="semi-bold" for="comments_admin2"> '.$lang['srv_comments_admin_on2'].'</label>';
+ echo '<p class="indent">('.$lang['srv_comments_admin_note2'].')</p>';
+ echo '</div>';
+
+ echo '<p class="semi-bold caps bottom16">'.$lang['srv_admin_s_comments_resp'].'</p>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" name="comments_resp2" id="comments_resp2" onclick="comments_resp_toggle(\'2\')" resp_on="false" /><label class="semi-bold" for="comments_resp2"> '.$lang['srv_comments_resp_on2'].'</label>';
+ echo '<p class="indent">('.$lang['srv_comments_resp_note2'].')</p>';
+ echo '</div>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" name="comments_default" id="comments_resp" onclick="comments_resp_toggle(\'1\')" resp_on="false" /><label class="semi-bold" for="comments_resp"> '.$lang['srv_comments_resp_on'].'</label>';
+ echo '<p class="indent">('.$lang['srv_comments_resp_note'].')</p>';
+ echo '</div>';
+
+ echo '<p class="semi-bold caps top16 bottom16">'.$lang['srv_admin_s_comments_links'].'</p>';
+
+ echo '<div class="links">';
+
$d = new Dostop();
-
- $sqlc = sisplet_query("SELECT COUNT(s.id) AS count FROM srv_spremenljivka s, srv_grupa g WHERE g.ank_id='$this->anketa' AND s.gru_id=g.id AND s.thread > '0'");
- if (!$sqlc) echo mysqli_error($GLOBALS['connect_db']);
- $rowc = mysqli_fetch_array($sqlc);
- if ($rowc['count'] > 0 && $d->checkDostopSub('test')) {
-
- echo '<p>';
- echo '<a href="'.$site_url . 'admin/survey/index.php?anketa=' . $row['id'] .'&a=komentarji" title="' . $lang['srv_view_comment'] . '" >';
- echo '<div class="fa-stack"><span class="faicon comments fa-stack-1x" icon-blue" title="'.$lang['srv_view_comment'].'"></span></div>';
- echo ' '.$lang['srv_view_comment'];
- echo '</a>';
- }
-
- echo '</p>';
+ echo '<div class="button" title="'.$lang['srv_view_comment'].'" onClick="window.location.href=\'index.php?anketa='.$this->anketa.'&a=komentarji\';">';
+ echo '<span class="faicon comments blue"></span>';
+ echo $lang['srv_admin_s_comments_view'];
+ echo '</div>';
+
+ echo '<div class="button" id="more_comments" onclick="$(\'#komentarji_napredno\').fadeToggle(); $(\'#komentarji_napredno_arrow\').toggleClass(\'plus minus\'); $(this).toggleClass(\'border_blue\'); return false;">';
+ echo '<span id="komentarji_napredno_arrow" class="faicon blue '.($advanced_expanded==1 ? 'minus' : 'plus').'"></span>';
+ echo $lang['srv_admin_s_comments_set'];
+ echo '</div>';
- echo '<p><a href="index.php?anketa='.$this->anketa.'&a=komentarji"><span class="bold">'.$lang['comments'].'</span></a></p>';
- echo '<p><a href="index.php?anketa='.$this->anketa.'&a=vabila"><span class="bold">'.$lang['srv_vabila'].'</span></a></p>';
-
- echo '<p><a href="#" onclick="$(\'#komentarji_napredno\').fadeToggle(); $(\'#komentarji_napredno_arrow\').toggleClass(\'arrow2_d\'); $(\'#komentarji_napredno_arrow\').toggleClass(\'arrow2_u\'); return false;">';
- echo ' <span class="bold">'.$lang['srv_detail_settings'].' </span>';
- echo ' <span id="komentarji_napredno_arrow" class="faicon arrow2_d"></span>';
- echo '</a></p>';
+ echo '</div>';
echo '</fieldset>';
@@ -879,6 +1108,9 @@ class SurveyAdminSettings { if ( ( !check_comments_admin() && !check_comments_admin_off() ) || ( !check_comments_resp() && !check_comments_resp_off() ) ) {
$('#komentarji_napredno').show();
+ $('#komentarji_napredno_arrow').addClass('minus');
+ $('#komentarji_napredno_arrow').removeClass('plus');
+ $('#more_comments').removeClass('border_blue');
}
});
@@ -887,71 +1119,107 @@ class SurveyAdminSettings { if ($survey_comment != "") {
- echo '<fieldset style="float:right;margin-left:13px !important;margin-right:0px !important;'.$css_width2.'"><legend>'.$lang['srv_admin_s_comments'].'</legend>';
- //echo '<form name="comment_send" action="ajax.php?a=comment_send&anketa='.$this->anketa.'">';
- echo '<textarea name="comment_send" style="width:50%; height:60px"></textarea>';
-
- echo '<p><input type="checkbox" id="srv_c_alert" name="srv_c_alert" checked value="1" /><label for="srv_c_alert"> '.$lang['srv_c_alert'].'</label></p>';
- echo '<p><input type="checkbox" id="srv_c_to_mail" name="srv_c_to_mail" value="1" onchange="$(\'#prejemniki\').toggle();" /><label for="srv_c_to_mail"> '.$lang['srv_c_to_mail'].'</label></p>';
-
- echo '<p id="prejemniki" style="display:none">';
+ echo '<fieldset class="comments" ><legend>'.$lang['srv_admin_s_comments'].'</legend>';
+ echo '<textarea name="comment_send"></textarea>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="srv_c_alert" name="srv_c_alert" checked value="1" />';
+ echo '<label for="srv_c_alert"> '.$lang['srv_c_alert'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="srv_c_to_mail" name="srv_c_to_mail" value="1" onchange="$(\'#prejemniki\').toggle();" />';
+ echo '<label for="srv_c_to_mail"> '.$lang['srv_c_to_mail'].'</label>';
+
+ echo '<div id="prejemniki" style="display:none">';
$sqlp = sisplet_query("SELECT u.name, u.surname, u.email FROM srv_dostop d, users u WHERE d.uid=u.id AND ank_id='$this->anketa'");
while ($rowp = mysqli_fetch_array($sqlp)) {
- echo ' <input type="checkbox" name="mails[]" value="'.$rowp['email'].'" checked="checked" id="'.$rowp['email'].'" /><label for="'.$rowp['email'].'"> '.$rowp['name'].' '.$rowp['surname'].' ('.$rowp['email'].')</label><br />';
+
+ echo '<div class="setting_item indent">';
+ echo '<input type="checkbox" name="mails[]" value="'.$rowp['email'].'" checked="checked" id="'.$rowp['email'].'" />';
+ echo '<label for="'.$rowp['email'].'"> '.$rowp['name'].' '.$rowp['surname'].' ('.$rowp['email'].')</label>';
+ echo '</div>';
}
- echo '</p>';
+ echo '</div>';
+ echo '</div>';
- echo '
- <div class="buttonwrapper" style="float:left;">
- <a class="ovalbutton ovalbutton_orange btn_savesettings" onclick="document.settingsanketa_'.$this->anketa.'.submit(); return false;" href="#">
- '.$lang['add'].'
- </a>
- </div>';
- //echo '</form>';
echo '</fieldset>';
- echo '<br />';
-
}
- echo '<div id="komentarji_napredno" '.($_GET['advanced_expanded']==1 ? '' : ' style="display:none;"').'>';
-
- echo '<br class="clr" />';
- echo '<br />';
+ //Komentarji - napredne nastavitve
+ echo '<div id="komentarji_napredno" '.($advanced_expanded==1 ? '' : 'style="display:none"').'>';
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
- echo '<br class="clr" />';
-
- echo '<fieldset class="wide"><legend>'.$lang['srv_preview_defaults'].'</legend>';
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo ' <button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
- echo '<span class="nastavitveSpan1"><label for="disableif">'.$lang['srv_disableif'].': </span><input type="hidden" name="preview_disableif" value=""><input type="checkbox" value="1" '.($preview_disableif==1?' checked':'').' name="preview_disableif" id="disableif">';
- echo ' </label><br>';
- echo '<span class="nastavitveSpan1"><label for="disablealert">'.$lang['srv_disablealert'].': </span><input type="hidden" name="preview_disablealert" value=""><input type="checkbox" value="1" '.($preview_disablealert==1?' checked':'').' name="preview_disablealert" id="disablealert">';
- echo ' </label><br>';
- echo '<span class="nastavitveSpan1"><label for="displayifs">'.$lang['srv_displayifs'].': </span><input type="hidden" name="preview_displayifs" value=""><input type="checkbox" value="1" '.($preview_displayifs==1?' checked':'').' name="preview_displayifs" id="displayifs">';
- echo ' </label><br>';
- echo '<span class="nastavitveSpan1"><label for="displayvariables">'.$lang['srv_displayvariables'].': </span><input type="hidden" name="preview_displayvariables" value=""><input type="checkbox" value="1" '.($preview_displayvariables==1?' checked':'').' name="preview_displayvariables" id="displayvariables">';
- echo ' </label><br>';
- echo '<span class="nastavitveSpan1"><label for="hidecomment">'.$lang['srv_preview_comments2'].': </span><input type="hidden" name="preview_hidecomment" value=""><input type="checkbox" value="1" '.($preview_hidecomment==1?' checked':'').' name="preview_hidecomment" id="hidecomment">';
- echo ' </label><br>';
- echo '<span class="nastavitveSpan1"><label for="hidesurveycomment">'.$lang['srv_preview_hide_survey_comment'].': </span><input type="hidden" name="preview_hide_survey_comment" value=""><input type="checkbox" value="1" '.($preview_hide_survey_comment==1?' checked':'').' name="preview_hide_survey_comment" id="hidesurveycomment">';
- echo ' </label><br>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_preview_survey_comment_showalways'] . ':</label></span>';
- echo '<label for="preview_survey_comment_showalways_0"><input type="radio" name="preview_survey_comment_showalways" value="0" id="preview_survey_comment_showalways_0" ' . ($preview_survey_comment_showalways == 0 ? ' checked' : '') . '/>' . $lang['no'] . '</label> ';
- echo '<label for="preview_survey_comment_showalways_1"><input type="radio" name="preview_survey_comment_showalways" value="1" id="preview_survey_comment_showalways_1" ' . ($preview_survey_comment_showalways == 1 ? ' checked' : '') . '/>' . $lang['yes'] . '</label> ';
- echo '<br>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_preview_disable_test_insert'] . ':</label></span>';
- echo '<label for="preview_disable_test_insert_1"><input type="radio" name="preview_disable_test_insert" value="1" id="preview_disable_test_insert_1" ' . ($preview_disable_test_insert == 1 ? ' checked' : '') . '/>' . $lang['no'] . '</label> ';
- echo '<label for="preview_disable_test_insert_0"><input type="radio" name="preview_disable_test_insert" value="0" id="preview_disable_test_insert_0" ' . ($preview_disable_test_insert == 0 ? ' checked' : '') . '/>' . $lang['yes'] . '</label> ';
- echo '<br>';
+ echo '<fieldset class="comments"><legend>'.$lang['srv_preview_defaults'].'</legend>';
+
+
+ echo '<div class="setting_holder">';
+ echo ' <input type="hidden" name="preview_disableif" value=""><input type="checkbox" value="1" '.($preview_disableif==1?' checked':'').' name="preview_disableif" id="disableif">';
+ echo ' <label for="disableif">'.$lang['srv_disableif'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <input type="hidden" name="preview_displayifs" value=""><input type="checkbox" value="1" '.($preview_displayifs==1?' checked':'').' name="preview_displayifs" id="displayifs">';
+ echo ' <label for="displayifs">'.$lang['srv_displayifs'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <input type="hidden" name="preview_displayvariables" value=""><input type="checkbox" value="1" '.($preview_displayvariables==1?' checked':'').' name="preview_displayvariables" id="displayvariables">';
+ echo ' <label for="displayvariables">'.$lang['srv_displayvariables'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <input type="hidden" name="preview_hidecomment" value=""><input type="checkbox" value="1" '.($preview_hidecomment==1?' checked':'').' name="preview_hidecomment" id="hidecomment">';
+ echo ' <label for="hidecomment">'.$lang['srv_preview_comments2'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <input type="hidden" name="preview_hide_survey_comment" value=""><input type="checkbox" value="1" '.($preview_hide_survey_comment==1?' checked':'').' name="preview_hide_survey_comment" id="hidesurveycomment">';
+ echo ' <label for="hidesurveycomment">'.$lang['srv_preview_hide_survey_comment'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_preview_survey_comment_showalways'] .':</span>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="preview_survey_comment_showalways" value="0" id="preview_survey_comment_showalways_0" ' . ($preview_survey_comment_showalways == 0 ? ' checked' : '') . '/>';
+ echo ' <label for="preview_survey_comment_showalways_0">' . $lang['no'] . '</label> ';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="preview_survey_comment_showalways" value="1" id="preview_survey_comment_showalways_1" ' . ($preview_survey_comment_showalways == 1 ? ' checked' : '') . '/>';
+ echo ' <label for="preview_survey_comment_showalways_1">' . $lang['yes'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_preview_disable_test_insert'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="preview_disable_test_insert" value="1" id="preview_disable_test_insert_1" ' . ($preview_disable_test_insert == 1 ? ' checked' : '') . '/>';
+ echo ' <label for="preview_disable_test_insert_1">' . $lang['no'] . '</label> ';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" name="preview_disable_test_insert" value="0" id="preview_disable_test_insert_0" ' . ($preview_disable_test_insert == 0 ? ' checked' : '') . '/>';
+ echo ' <label for="preview_disable_test_insert_0">' . $lang['yes'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
- echo '</fieldset><br>';
+ echo '</fieldset>';
- echo '<fieldset class="wide"><legend>'.$lang['srv_admin_s_comments'].'<span>'.$lang['srv_admin_s_comments_txt'].'</span></legend>';
+ echo '<fieldset class="comments"><legend>'.$lang['srv_admin_s_comments'].'<span>'.$lang['srv_admin_s_comments_txt'].'</span></legend>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_write'] . ':</span>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_write'] . ':</label></span>';
- echo '<select name="survey_comment">';
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="survey_comment">';
echo '<option value=""'.($survey_comment==''?' selected':'').'>'.$lang['srv_nihce'].'</option>';
//echo '<option value="4"'.($survey_comment==4?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($survey_comment==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
@@ -959,51 +1227,90 @@ class SurveyAdminSettings { echo '<option value="1" '.($survey_comment==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($survey_comment=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select>';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_view'] . ':</label></span>';
- echo '<select name="survey_comment_viewadminonly">';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_view'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="survey_comment_viewadminonly">';
//echo '<option value="4"'.($survey_comment_viewadminonly==4?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($survey_comment_viewadminonly==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
echo '<option value="2" '.($survey_comment_viewadminonly==2 ?' selected':'').'>'.$lang['forum_clan'].'</option>';
echo '<option value="1" '.($survey_comment_viewadminonly==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($survey_comment_viewadminonly=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select> ';
- echo $lang['srv_comments_viewauthor'];
- echo '<input type="hidden" name="survey_comment_viewauthor" value=""><input type="checkbox" name="survey_comment_viewauthor" value="1" '.($survey_comment_viewauthor==1?' checked':'').' />';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_survey_comment_show'] . ':</label></span>';
- echo '<label for="survey_comment_showalways_0"><input type="radio" name="survey_comment_showalways" value="0" id="survey_comment_showalways_0" ' . ($survey_comment_showalways == 0 ? ' checked' : '') . '/>' . $lang['no'] . '</label> ';
- echo '<label for="survey_comment_showalways_1"><input type="radio" name="survey_comment_showalways" value="1" id="survey_comment_showalways_1" ' . ($survey_comment_showalways == 1 ? ' checked' : '') . '/>' . $lang['yes'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="hidden" name="survey_comment_viewauthor" value=""><input type="checkbox" id="survey_comment_viewauthor" name="survey_comment_viewauthor" value="1" '.($survey_comment_viewauthor==1?' checked':'').' />';
+ echo '<label for="survey_comment_viewauthor">'.$lang['srv_comments_viewauthor'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_survey_comment_show'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="survey_comment_showalways" value="0" id="survey_comment_showalways_0" ' . ($survey_comment_showalways == 0 ? ' checked' : '') . '/>';
+ echo '<label for="survey_comment_showalways_0">' . $lang['no'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="survey_comment_showalways" value="1" id="survey_comment_showalways_1" ' . ($survey_comment_showalways == 1 ? ' checked' : '') . '/>';
+ echo '<label for="survey_comment_showalways_1">' . $lang['yes'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br>';
- echo '<fieldset class="wide">';
+ echo '<fieldset class="comments">';
echo '<legend>' . $lang['srv_admin_q_notes'] . '<span>'.$lang['srv_admin_q_notes_txt'].'</span></legend>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_q_note_view'] . ':</label></span>';
- echo '<select name="question_note_view">';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_q_note_view'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="question_note_view">';
echo '<option value=""'.($question_note_view==''?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($question_note_view==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
echo '<option value="2" '.($question_note_view==2 ?' selected':'').'>'.$lang['forum_clan'].'</option>';
echo '<option value="1" '.($question_note_view==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($question_note_view=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select>';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_q_note_write'] . ':</label></span>';
- echo '<select name="question_note_write">';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_q_note_write'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="question_note_write">';
echo '<option value=""'.($question_note_write==''?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($question_note_write==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
echo '<option value="2" '.($question_note_write==2 ?' selected':'').'>'.$lang['forum_clan'].'</option>';
echo '<option value="1" '.($question_note_write==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($question_note_write=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
- echo '</select> ';
+ echo '</select>';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br>';
- echo '<fieldset class="wide">';
+ echo '<fieldset class="comments">';
echo '<legend>' . $lang['srv_admin_q_comments'] . '<span>'.$lang['srv_admin_q_comments_txt'].'</span></legend>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_write'] . ':</label></span>';
- echo '<select name="question_comment">';
+
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_write'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="question_comment">';
echo '<option value=""'.($question_comment==''?' selected':'').'>'.$lang['srv_nihce'].'</option>';
echo '<option value="4"'.($question_comment==4?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($question_comment==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
@@ -1011,30 +1318,55 @@ class SurveyAdminSettings { echo '<option value="1" '.($question_comment==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($question_comment=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select>';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_view'] . ':</label></span>';
- echo '<select name="question_comment_viewadminonly">';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_view'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="question_comment_viewadminonly">';
echo '<option value="4"'.($question_comment_viewadminonly==4 || $question_comment_viewadminonly==''?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($question_comment_viewadminonly==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
echo '<option value="2" '.($question_comment_viewadminonly==2 ?' selected':'').'>'.$lang['forum_clan'].'</option>';
echo '<option value="1" '.($question_comment_viewadminonly==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($question_comment_viewadminonly=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
- echo '</select> ';
- echo $lang['srv_comments_viewauthor'];
- echo '<input type="hidden" name="question_comment_viewauthor" value=""><input type="checkbox" name="question_comment_viewauthor" value="1" '.($question_comment_viewauthor==1?' checked':'').' />';
+ echo '</select>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="hidden" name="question_comment_viewauthor" value=""><input type="checkbox" id="question_comment_viewauthor" name="question_comment_viewauthor" value="1" '.($question_comment_viewauthor==1?' checked':'').' />';
+ echo '<label for="question_comment_viewauthor">'.$lang['srv_comments_viewauthor'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br>';
-
- echo '<fieldset class="wide">';
- echo '<legend>' . $lang['srv_comments_respondents'] . '<span>'.$lang['srv_comments_respondents_txt'].'</span></legend>';
-
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_q_comment'] . ':</label></span>';
- echo '<label for="question_resp_comment_0"><input type="radio" name="question_resp_comment" value="0" id="question_resp_comment_0" ' . ($question_resp_comment == 0 ? ' checked' : '') . '/>' . $lang['no'] . '</label> ';
- echo '<label for="question_resp_comment_1"><input type="radio" name="question_resp_comment" value="1" id="question_resp_comment_1" ' . ($question_resp_comment == 1 ? ' checked' : '') . '/>' . $lang['yes'] . '</label> ';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_view'] . ':</label></span>';
- echo '<select name="question_resp_comment_viewadminonly">';
+ echo '<fieldset class="comments">';
+ echo '<legend>' . $lang['srv_comments_respondents'] . '</legend>';
+
+ echo '<p class="bottom16">'.$lang['srv_comments_respondents_txt'].'</p>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_q_comment'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment" value="0" id="question_resp_comment_0" ' . ($question_resp_comment == 0 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_0">' . $lang['no'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment" value="1" id="question_resp_comment_1" ' . ($question_resp_comment == 1 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_1">' . $lang['yes'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_view'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="question_resp_comment_viewadminonly">';
//echo '<option value=""'.($question_resp_comment_viewadminonly==''?' selected':'').'>'.$lang['srv_nihce'].'</option>';
echo '<option value="4"'.($question_resp_comment_viewadminonly==4 || $question_resp_comment_viewadminonly==''?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($question_resp_comment_viewadminonly==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
@@ -1042,38 +1374,41 @@ class SurveyAdminSettings { echo '<option value="1" '.($question_resp_comment_viewadminonly==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($question_resp_comment_viewadminonly=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select>';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_show_open'] . ':</label></span>';
- echo '<label for="question_resp_comment_show_open_0"><input type="radio" name="question_resp_comment_show_open" value="" id="question_resp_comment_show_open_0" ' . ($question_resp_comment_show_open == '' ? ' checked' : '') . '/>' . $lang['forma_settings_open'] . '</label> ';
- echo '<label for="question_resp_comment_show_open_1"><input type="radio" name="question_resp_comment_show_open" value="1" id="question_resp_comment_show_open_1" ' . ($question_resp_comment_show_open == '1' ? ' checked' : '') . '/>' . $lang['forma_settings_closed'] . '</label> ';
- echo '<br>';
- echo '<span class="nastavitveSpan1"><label>' .$lang['text'].' "'. $lang['srv_question_respondent_comment'] . '":</label></span>';
- echo '<input type="text" name="srvlang_srv_question_respondent_comment" value="'.$srvlang_srv_question_respondent_comment.'" style="width:300px">';
- echo '<input type="hidden" name="extra_translations" value="1">';
- echo '</fieldset>';
- echo '<br>';
-
- echo '<fieldset class="wide">';
- echo '<legend>' . $lang['srv_comments_respondents'] . '<span> - '.$lang['srv_extra_settings'].'</span></legend>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_q_inicialke'] . ':</label></span>';
- echo '<label for="question_resp_comment_inicialke_0"><input type="radio" name="question_resp_comment_inicialke" value="0" id="question_resp_comment_inicialke_0" ' . ($question_resp_comment_inicialke == 0 ? ' checked' : '') . '/>' . $lang['no'] . '</label> ';
- echo '<label for="question_resp_comment_inicialke_1"><input type="radio" name="question_resp_comment_inicialke" value="1" id="question_resp_comment_inicialke_1" ' . ($question_resp_comment_inicialke == 1 ? ' checked' : '') . '/>' . $lang['yes'] . '</label> ';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_q_inicialke_alert'] . ':</label></span>';
- echo '<label for="question_resp_comment_inicialke_alert_0"><input type="radio" name="question_resp_comment_inicialke_alert" value="0" id="question_resp_comment_inicialke_alert_0" ' . ($question_resp_comment_inicialke_alert == 0 ? ' checked' : '') . '/>' . $lang['srv_reminder_off2'] . '</label> ';
- echo '<label for="question_resp_comment_inicialke_alert_1"><input type="radio" name="question_resp_comment_inicialke_alert" value="1" id="question_resp_comment_inicialke_alert_1" ' . ($question_resp_comment_inicialke_alert == 1 ? ' checked' : '') . '/>' . $lang['srv_reminder_soft2'] . '</label> ';
- echo '<label for="question_resp_comment_inicialke_alert_2"><input type="radio" name="question_resp_comment_inicialke_alert" value="2" id="question_resp_comment_inicialke_alert_2" ' . ($question_resp_comment_inicialke_alert == 2 ? ' checked' : '') . '/>' . $lang['srv_reminder_hard2'] . '</label> ';
- /*echo '<br/>';
- echo '<div class="nastavitveSpan1" style="height:auto; float:left;"><label>' . $lang['text'] . ':</label></div>';
- echo '<textarea id="sys_survey_misc_question_comment_text" name="question_comment_text" type="text" srv_survey_misc="true" maxlength="255">'.$srv_qct.'</textarea>';
- echo ' <span id="sys_survey_misc_question_comment_text_chars">' . strlen($srv_qct) . '/250</span>' . "\n\r";*/
- echo '</fieldset>';
- echo '<br>';
-
- echo '<fieldset class="wide"><legend>'.$lang['srv_comments_respondents'].'<span>'.$lang['srv_resp_s_comments_txt'].'</span></legend>';
+ echo '</div>';
+
+ echo '</div>';
+
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_show_open'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_show_open" value="" id="question_resp_comment_show_open_0" ' . ($question_resp_comment_show_open == '' ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_show_open_0">' . $lang['forma_settings_open'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_show_open" value="1" id="question_resp_comment_show_open_1" ' . ($question_resp_comment_show_open == '1' ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_show_open_1">' . $lang['forma_settings_closed'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_write'] . ':</label></span>';
- echo '<select name="survey_comment_resp">';
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' .$lang['text'].' "'. $lang['srv_question_respondent_comment'] . '":</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="text" class="text small" name="srvlang_srv_question_respondent_comment" value="'.$srvlang_srv_question_respondent_comment.'" style="width:300px">';
+ echo '<input type="hidden" name="extra_translations" value="1">';echo '</div>';
+
+ echo '</div>';
+
+ echo '<p class="bottom16">'.$lang['srv_resp_s_comments_txt'].'</p>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_write'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="survey_comment_resp">';
echo '<option value=""'.($survey_comment_resp==''?' selected':'').'>'.$lang['srv_nihce'].'</option>';
echo '<option value="4"'.($survey_comment_resp==4?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($survey_comment_resp==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
@@ -1081,66 +1416,149 @@ class SurveyAdminSettings { echo '<option value="1" '.($survey_comment_resp==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($survey_comment_resp=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select>';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_view'] . ':</label></span>';
- echo '<select name="survey_comment_viewadminonly_resp">';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_view'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" nname="survey_comment_viewadminonly_resp">';
echo '<option value="4"'.($survey_comment_viewadminonly_resp==4?' selected':'').'>'.$lang['move_all'].'</option>';
echo '<option value="3" '.($survey_comment_viewadminonly_resp==3 ?' selected':'').'>'.$lang['forum_registered'].'</option>';
echo '<option value="2" '.($survey_comment_viewadminonly_resp==2 ?' selected':'').'>'.$lang['forum_clan'].'</option>';
echo '<option value="1" '.($survey_comment_viewadminonly_resp==1 ?' selected':'').'>'.$lang['forum_manager'].'</option>';
echo '<option value="0" '.($survey_comment_viewadminonly_resp=='0' ?' selected':'').'>'.$lang['forum_admin'].'</option>';
echo '</select> ';
- echo $lang['srv_comments_viewauthor'];
- echo '<input type="hidden" name="survey_comment_viewauthor_resp" value=""><input type="checkbox" name="survey_comment_viewauthor_resp" value="1" '.($survey_comment_viewauthor_resp==1?' checked':'').' />';
- /*echo '<br />';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_survey_comment_show'] . ':</label></span>';
- echo '<input type="radio" name="survey_comment_showalways_resp" value="0" id="survey_comment_showalways_resp_0" ' . ($survey_comment_showalways_resp == 0 ? ' checked' : '') . '/><label for="survey_comment_showalways_resp_0">' . $lang['no'] . '</label> ';
- echo '<input type="radio" name="survey_comment_showalways_resp" value="1" id="survey_comment_showalways_resp_1" ' . ($survey_comment_showalways_resp == 1 ? ' checked' : '') . '/><label for="survey_comment_showalways_resp_1">' . $lang['yes'] . '</label> ';
- */
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="hidden" name="survey_comment_viewauthor_resp" value=""><input type="checkbox" id="survey_comment_viewauthor_resp" name="survey_comment_viewauthor_resp" value="1" '.($survey_comment_viewauthor_resp==1?' checked':'').' />';
+ echo '<label for="survey_comment_viewauthor_resp">'.$lang['srv_comments_viewauthor'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<p class="semi-bold bottom16">'.$lang['srv_extra_settings'].'</p>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_q_inicialke'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_inicialke" value="0" id="question_resp_comment_inicialke_0" ' . ($question_resp_comment_inicialke == 0 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_inicialke_0">' . $lang['no'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_inicialke" value="1" id="question_resp_comment_inicialke_1" ' . ($question_resp_comment_inicialke == 1 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_inicialke_1">' . $lang['yes'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_q_inicialke_alert'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_inicialke_alert" value="0" id="question_resp_comment_inicialke_alert_0" ' . ($question_resp_comment_inicialke_alert == 0 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_inicialke_alert_0">' . $lang['srv_reminder_off2'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_inicialke_alert" value="1" id="question_resp_comment_inicialke_alert_1" ' . ($question_resp_comment_inicialke_alert == 1 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_inicialke_alert_1">' . $lang['srv_reminder_soft2'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="question_resp_comment_inicialke_alert" value="2" id="question_resp_comment_inicialke_alert_2" ' . ($question_resp_comment_inicialke_alert == 2 ? ' checked' : '') . '/>';
+ echo '<label for="question_resp_comment_inicialke_alert_2">' . $lang['srv_reminder_hard2'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
- echo '<fieldset class="wide">';
+ echo '<fieldset class="comments">';
echo '<legend>' . $lang['srv_settings_komentarji'] . '</legend>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['orderby'] . ':</label></span>';
- echo '<label for="sortpostorder_0"><input type="radio" name="sortpostorder" value="0" id="sortpostorder_0" ' . ($sortpostorder == 0 ? ' checked' : '') . '/>' . $lang['forum_asc'] . '</label> ';
- echo '<label for="sortpostorder_1"><input type="radio" name="sortpostorder" value="1" id="sortpostorder_1" ' . ($sortpostorder == 1 ? ' checked' : '') . '/>' . $lang['forum_desc'] . '</label> ';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_add_comment'] . ':</label></span>';
- echo '<label for="addfieldposition_0"><input type="radio" name="addfieldposition" value="0" id="addfieldposition_0" ' . ($addfieldposition == 0 ? ' checked' : '') . '/>' . $lang['srv_polozaj_bottom'] . '</label> ';
- echo '<label for="addfieldposition_1"><input type="radio" name="addfieldposition" value="1" id="addfieldposition_1" ' . ($addfieldposition == 1 ? ' checked' : '') . '/>' . $lang['srv_polozaj_top'] . '</label> ';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_marks'] . ':</label></span>';
- echo '<label for="commentmarks_0"><input type="radio" name="commentmarks" value="0" id="commentmarks_0" ' . ($commentmarks == 0 ? ' checked' : '') . '/>' . $lang['srv_comments_marks_0'] . '</label> ';
- echo '<label for="commentmarks_1"><input type="radio" name="commentmarks" value="1" id="commentmarks_1" ' . ($commentmarks == 1 ? ' checked' : '') . '/>' . $lang['srv_comments_marks_1'] . '</label> ';
- echo '<br/>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comments_marks_who'] . ':</label></span>';
- echo '<label for="commentmarks_who_0"><input type="radio" name="commentmarks_who" value="0" id="commentmarks_who_0" ' . ($commentmarks_who == 0 ? ' checked' : '') . '/>' . $lang['srv_comments_marks_who_1'] . '</label> ';
- echo '<label for="commentmarks_who_1"><input type="radio" name="commentmarks_who" value="1" id="commentmarks_who_1" ' . ($commentmarks_who == 1 ? ' checked' : '') . '/>' . $lang['srv_comments_marks_who_0'] . '</label> ';
- echo '<br>';
- echo '<span class="nastavitveSpan1"><label>' . $lang['srv_comment_history'] . ':</label></span>';
- echo '<select name="comment_history">';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['orderby'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="sortpostorder" value="0" id="sortpostorder_0" ' . ($sortpostorder == 0 ? ' checked' : '') . '/>';
+ echo '<label for="sortpostorder_0">' . $lang['forum_asc'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="sortpostorder" value="1" id="sortpostorder_1" ' . ($sortpostorder == 1 ? ' checked' : '') . '/>';
+ echo '<label for="sortpostorder_1">' . $lang['forum_desc'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_add_comment'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="addfieldposition" value="0" id="addfieldposition_0" ' . ($addfieldposition == 0 ? ' checked' : '') . '/>';
+ echo '<label for="addfieldposition_0">' . $lang['srv_polozaj_bottom'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="addfieldposition" value="1" id="addfieldposition_1" ' . ($addfieldposition == 1 ? ' checked' : '') . '/>';
+ echo '<label for="addfieldposition_1">' . $lang['srv_polozaj_top'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_marks'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="commentmarks" value="0" id="commentmarks_0" ' . ($commentmarks == 0 ? ' checked' : '') . '/>';
+ echo '<label for="commentmarks_0">' . $lang['srv_comments_marks_0'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="commentmarks" value="1" id="commentmarks_1" ' . ($commentmarks == 1 ? ' checked' : '') . '/>';
+ echo '<label for="commentmarks_1">' . $lang['srv_comments_marks_1'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comments_marks_who'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="commentmarks_who" value="0" id="commentmarks_who_0" ' . ($commentmarks_who == 0 ? ' checked' : '') . '/>';
+ echo '<label for="commentmarks_who_0">' . $lang['srv_comments_marks_who_1'] . '</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="commentmarks_who" value="1" id="commentmarks_who_1" ' . ($commentmarks_who == 1 ? ' checked' : '') . '/>';
+ echo '<label for="commentmarks_who_1">' . $lang['srv_comments_marks_who_0'] . '</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<span class="setting_title">' . $lang['srv_comment_history'] . ':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<select class="dropdown small" name="comment_history">';
echo '<option value="0" '.($comment_history=='0' || $comment_history=='' ? ' selected':'').'>'.$lang['srv_comment_history_1'].'</option>';
echo '<option value="1" '.($comment_history==1 ?' selected':'').'>'.$lang['srv_comment_history_0'].'</option>';
echo '<option value="2" '.($comment_history==2 ?' selected':'').'>'.$lang['srv_comment_history_2'].'</option>';
echo '</select>';
- echo '<br/>';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
- echo '<fieldset><legend>' . $lang['srv_delete_comments'] . '</legend>';
- echo '<p><a href="#" onClick="delete_test_data();">'.$lang['srv_delete_comments3'].'</a> ('.$lang['srv_delete_comments_txt2'].')</p>';
- echo '</fieldset>';
+ echo '<p class="delete_comments"><a class="noline" href="#" onClick="delete_test_data();"><span class="faicon trash empty link-right"></span>'.$lang['srv_delete_comments3'].'</a> ('.$lang['srv_delete_comments_txt2'].')</p>';
echo '</div>';
- echo '<br class="clr" />';
}
}
/*Dostop*/
if ($_GET['a'] == 'dostop') {
-
+
// tukaj bom dodal še kontrolo na Avtorja ankete, tako da avtor lahko vedno spreminja dostop (gorazd,1.9.2009)
$stringDostopAvtor = "SELECT count(*) as isAvtor FROM srv_dostop WHERE ank_id = '" . $this->anketa . "' AND (uid='" . $global_user_id . "' OR uid IN (SELECT user FROM srv_dostop_manage WHERE manager='$global_user_id' ))";
$sqlDostopAvtor = sisplet_query($stringDostopAvtor);
@@ -1148,60 +1566,32 @@ class SurveyAdminSettings { if ($admin_type <= $row['dostop'] || $rowDostopAvtor['isAvtor'] > 0) {
- echo '<fieldset><legend>' . $lang['srv_dostop_users'] . '' . Help :: display('srv_dostop_users'). '</legend>'."\n";
+ echo '<fieldset><legend>' . $lang['srv_dostop_users'] . '' . Help :: display('srv_dostop_users'). '</legend>';
+
+ //Dodajanje dostopa - prikaži vse za admine - potrebuje prenovo
+ /**if($admin_type == 0 || $admin_type == 1){
+ echo '<div class="setting_holder">';
+ echo '<span id="dostop_active_show_1"><a href="#" onClick="dostopActiveShowAll(\'true\'); return false;">'.$lang['srv_dostop_show_all'].'</a></span>';
+ echo '<span id="dostop_active_show_2" class="displayNone"><a href="#" onClick="dostopActiveShowAll(\'false\'); return false;">'.$lang['srv_dostop_hide_all'].'</a></span>';
+ echo '</div>';
+ }**/
- echo '<span id="dostop_active_show_1"><a href="#" onClick="dostopActiveShowAll(\'true\'); return false;">'.$lang['srv_dostop_show_all'].'</a></span>';
- echo '<span id="dostop_active_show_2" class="displayNone"><a href="#" onClick="dostopActiveShowAll(\'false\'); return false;">'.$lang['srv_dostop_hide_all'].'</a></span>';
-
echo '<div id="dostop_users_list">';
$this->display_dostop_users(0);
echo '</div>';
+
+ echo '<div class="button_holder below">';
+ echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
echo '</fieldset>';
- echo '<br />';
// Dodajanje uproabnikov preko e-maila
echo '<fieldset><legend>'.$lang['srv_dostop_addusers'].'</legend>';
echo '<div id="addmail">';
-
-
- // Dodajanje dostopa
- global $app_settings;
- global $aai_instalacija;
-
- echo '<p class="bold">';
-
- // Admini in managerji lahko dodajo dostop komurkoli
- if($admin_type == 0 || $admin_type == 1){
- echo $lang['srv_dostop_adduserstxt_admin'].' '.$app_settings['app_name'].'. ';
- }
- // Ostali uporabniki lahko dodajo dostop samo ze registriranim uporabnikom
- else{
- echo $lang['srv_dostop_adduserstxt'].' '.$app_settings['app_name'].'! ';
- }
-
- // AAI ima poseben link na help
- if(isset($aai_instalacija) && $aai_instalacija == true){
- echo $lang['srv_dostop_adduserstxt_aai_more'];
- }
-
- echo '</p>';
-
-
- echo '<input type="hidden" name="aktiven" value="1" >';
-
- echo '<p>';
- echo $lang['srv_dostop_adduserstxt_email'].'<br />';
- echo '<textarea name="addusers"></textarea>';
- echo '</p>';
-
- echo '<p>';
- echo $lang['srv_dostop_adduserstxt_note'].'<br />';
- echo '<textarea name="addusers_note"></textarea>';
- echo '</p>';
-
- echo '<p>'.$lang['srv_dostop_adduserstxt_end'].'</p>';
+
+ $this->display_add_survey_dostop();
echo '</div>';
echo '</fieldset>';
@@ -1229,10 +1619,11 @@ class SurveyAdminSettings { include($file);
- echo '<fieldset class="wide"><legend>'.$lang['srv_extra_translations'].' ';
+ echo '<fieldset><legend>'.$lang['srv_extra_translations'].' ';
+ $lang_id = '';
if ($row['multilang'] == 1) {
- echo ' <select name="lang_id" onchange="window.location.href=\'index.php?anketa='.$this->anketa.'&a=jezik&lang_id=\'+this.value;">';
+ echo ' <select class="dropdown medium w130 inline" name="lang_id" onchange="window.location.href=\'index.php?anketa='.$this->anketa.'&a=jezik&lang_id=\'+this.value;">';
$lang_id = (int)$_GET['lang_id'];
if ($lang_id > 0)
@@ -1253,36 +1644,27 @@ class SurveyAdminSettings { echo '</legend>';
- if ($row['multilang'] == 1 && $lang_id > 0) {
- //echo '<p><span style="font-size:10px"> <a href="'.SurveyInfo::getSurveyLink().'?language='.$lang_id.'&preview=on" target="_blank" title="'.$lang['srv_poglejanketo'].'"><img src="img_0/preview_red.png" /></a> <a href="'.SurveyInfo::getSurveyLink().'?language='.$lang_id.'" target="_blank">'.SurveyInfo::getSurveyLink().'?language='.$lang_id.'</a></p>';
- }
- echo '<p><a href="index.php?anketa='.$this->anketa.'&a=prevajanje">'.$lang['srv_info_language'].'</a></p>';
echo '<div class="standardne_besede">';
echo '<input type="hidden" name="extra_translations" value="1" />'; // da vemo, da nastavljamo ta besedila
+
+ // Tabela standardnih besed
+ echo '<table id="standard_words_table">';
+ echo '<tr>';
- echo '<p><span class="nastavitveSpan1 textleft"> </span><span class="nastavitveSpan1 textleft" style="min-width:500px">'.($lang_id>0?$lang['srv_multilang']:$lang['srv_language_respons_1']).':';
-
+ echo '<th>'.($lang_id > 0 ? $lang['srv_language_respons_1'].': '.$resp_lang['language']:$lang['srv_language_admin'].': '.$lang['language']).'</th>';
+ echo '<th>'.$lang['srv_std_second'].': ';
$file = '../../lang/'.$lang_resp.'.php';
include($file);
- echo ' '.$lang['language'].'</span><br></p>';
-
- // nazaj na administrativnega
+ echo $lang['language'].'</th>';
+
+ // nazaj na administrativni jezik
$file = '../../lang/'.$lang_admin.'.php';
include($file);
-
- echo '<p>';
-
- echo '<span class="nastavitveSpan1 textleft">'.($lang_id>0?$lang['srv_language_respons_1'].': '.$resp_lang['language']:$lang['srv_language_admin'].': '.$lang['language']).'</span>';
- echo '<span class="nastavitveSpan1 textleft">'.$lang['srv_std_second'].'';
- echo '</span>';
- echo '<span class="bold">'.$lang['srv_std_translation'].' <a href="'.SurveyInfo::getSurveyLink().'&preview=on&language='.$lang_resp.'" target="_blank"><span class="faicon preview icon-as_link"></span></a></span>';
-
- echo '</p><hr>';
-
- echo '<p>';
+ echo '<th><div class="standardna-beseda-th">'.$lang['srv_std_translation'].'<div class="icon_holder"><a href="'.SurveyInfo::getSurveyLink().'&preview=on&language='.$lang_resp.'" target="_blank"><span class="faicon preview"></span></a></div></div></th>';
+ echo '</tr>';
// jezik nastavimo na nastavitev za respondente, ker ta text dejansko nastavljamo
$file = '../../lang/'.$lang_resp.'.php';
@@ -1334,33 +1716,43 @@ class SurveyAdminSettings { $this->extra_translation('srv_survey_non_active_notStarted', 1);
$this->extra_translation('srv_survey_non_active_expired', 1);
$this->extra_translation('srv_survey_non_active_voteLimit', 1);
-
-
- echo '</p>';
-
+
// nastavimo jezik nazaj
$file = '../../lang/'.$lang_admin.'.php';
include($file);
-
+
+ echo '</table>';
+
echo '<div>';
-
- echo '</fieldset>';
-
- echo '<br />';
-
+ // Gumb za ponastavitev prevoda v bazi pobriše že nastavljene prevode za izbran jezik
+ echo '<div class="button_holder top16 bottom16">';
+ echo ' <button class="medium white-black" type="button" onclick="ponastavi_prevod(\''.$lang_id.'\')">'.$lang['reset_translation'].'</button>';
+ echo '</div>';
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'];
- echo '</span></a></div></span>';
+ // Ta del se v 2. fazi zamenja z gumbom "Večjezične ankete"
+ echo '<div class="setting_holder">';
- // Gumb za ponastavitev prevoda v bazi pobriše že nastavljene prevode za izbran jezik
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_gray btn_resetsettings" href="#" onclick="ponastavi_prevod(\''.$lang_id.'\')"><span>';
- echo $lang['reset_translation'];
- echo '</span></a></div></span>';
+ echo '<p class="bottom8">'.$lang['srv_language_link2'].':';
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+ $userAccess = UserAccess::getInstance($global_user_id);
+ if($userAccess->checkUserAccess($what='prevajanje')){
+ echo ' <a href="index.php?anketa='.$this->anketa.'&a=prevajanje" title="'.$lang['srv_language_link'].'"><span class="bold">'.$lang['srv_language_link'].'</span></a></p>';
+ }
+ else{
+ echo ' <a href="#" onClick=popupUserAccess(\'prevajanje\'); return false;" title="'.$lang['srv_language_link'].'" class="user_access_locked"><span class="bold">'.$lang['srv_language_link'].'</span></a></p>';
+ }
+ echo '<p>'.$lang['srv_language_mySurveys'].'.</p>';
+
+ echo '</div>';
+ echo '</fieldset>';
- echo '<a href="index.php?anketa='.$this->anketa.'&a=prevajanje" title="'.$lang['lang'].'"><span class="faicon language" style="display:inline-block; margin:2px 8px 0 25px;"></span>'.$lang['lang'].'</a>';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.'; return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
+
}
/*Forma*/
if ($_GET['a'] == 'forma') {
@@ -1369,40 +1761,125 @@ class SurveyAdminSettings { /*Nastavitve prikaza za mobilnike*/
if ($_GET['a'] == 'mobile_settings') {
- SurveySetting::getInstance()->Init($this->anketa);
-
- echo '<fieldset class="wide">';
+ SurveySetting::getInstance()->Init($this->anketa);
+ echo '<fieldset>';
- echo '<legend>'.$lang['srv_mobile_settings_title'].'</legend>';
+ echo '<legend>'.$lang['srv_mobile_settings_title'].Help::display('srv_mobilne_tabele').'</legend>';
// Prikaz slik pri mobilnikih (default da)
$mobile_friendly = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_friendly');
- echo '<span class="nastavitveSpan2" >'.$lang['srv_settings_mobile_friendly'].':</span>';
- echo '<label for="mobile_friendly_1"><input type="radio" name="mobile_friendly" id="mobile_friendly_1" '.($mobile_friendly==='1'?' checked':'').' value="1" onClick="$(\'#mobile_settings_other\').show();">'.$lang['yes'].'</label> ';
- echo '<label for="mobile_friendly_0"><input type="radio" name="mobile_friendly" id="mobile_friendly_0" '.($mobile_friendly!=='1'?' checked':'').' value="0" onClick="$(\'#mobile_settings_other\').hide();">'.$lang['no'].'</label> ';
+ echo '<div class="setting_holder '.($mobile_friendly!=='1' ? 'bottom0':'').'" id="mobile_osnovno">';
+
+ echo '<input type="hidden" name="mobile_friendly" value="0">';
+ echo '<input type="checkbox" id="mobile_friendly" name="mobile_friendly" value="1" '.($mobile_friendly == 1 ? ' checked="checked"' : '').' onChange="$(\'#mobile_settings_other\').toggleClass(\'displayNone\');$(\'#mobile_osnovno\').toggleClass(\'bottom0\');">';
+ echo '<label for="mobile_friendly">'. $lang['srv_settings_mobile_friendly'] .'</label> ';
+
+ echo '</div>';
- $display = ($mobile_friendly == 1) ? '' : ' display: none;';
- echo '<div id="mobile_settings_other" style="margin-top: 10px; '.$display.'">';
+ $display = ($mobile_friendly == 1) ? '' : 'displayNone';
+
+ echo '<div class="'.$display.'" id="mobile_settings_other">';
// Prikaz slik pri mobilnikih (default da)
$hide_mobile_img = SurveySetting::getInstance()->getSurveyMiscSetting('hide_mobile_img');
- echo '<span class="nastavitveSpan2" >'.$lang['srv_settings_mobile_img'].':</span>';
- echo '<label for="hide_mobile_img_0"><input type="radio" name="hide_mobile_img" id="hide_mobile_img_0" '.($hide_mobile_img!=='1'?' checked':'').' value="0">'.$lang['yes'].'</label> ';
- echo '<label for="hide_mobile_img_1"><input type="radio" name="hide_mobile_img" id="hide_mobile_img_1" '.($hide_mobile_img==='1'?' checked':'').' value="1">'.$lang['no'].'</label> ';
+ echo '<div class="setting_holder">';
+
+ echo '<input type="hidden" name="hide_mobile_img" value="1">';
+ echo '<input type="checkbox" id="hide_mobile_img" name="hide_mobile_img" value="0" '.($hide_mobile_img!= 1 ? ' checked="checked"' : '').'>';
+ echo '<label for="hide_mobile_img">'. $lang['srv_settings_mobile_img'] .'</label> ';
+
+ echo '</div>';
+
+ // Prilagoditev tabel pri mobilnikih
+ /*$mobile_tables = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_tables');
+ echo '<div class="setting_holder">';
+
+ echo '<span class="setting_title" >'.$lang['srv_settings_mobile_tables'].':</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_1" '.($mobile_tables==='1'?' checked':'').' value="1">';
+ echo '<label for="mobile_tables_1">'.$lang['yes'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_2" '.($mobile_tables==='2'?' checked':'').' value="2">';
+ echo '<label for="mobile_tables_2">'.$lang['srv_settings_mobile_tables_slide'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_0" '.($mobile_tables==='0'?' checked':'').' value="0">';
+ echo '<label for="mobile_tables_0">'.$lang['no'].'</label> ';
+ echo '</div>';
+
+ echo '</div>';*/
+
+ echo '</div>';
+
+ echo '</fieldset>';
+ }
+
+ /*Nastavitve prikaza za tabele*/
+ if ($_GET['a'] == 'table_settings') {
+
+ SurveySetting::getInstance()->Init($this->anketa);
+
+ echo '<fieldset>';
- echo '<span class="clr"></span>';
+ echo '<legend>'.$lang['srv_table_settings_title'].'</legend>';
+
+
+ // Prilagoditev tabel na pc-ju
+ $pc_tables = SurveySetting::getInstance()->getSurveyMiscSetting('pc_tables');
+
+ echo '<div class="setting_holder">';
+
+ echo '<span class="setting_title" >'.$lang['srv_table_settings_pc_tables'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="pc_tables" id="pc_tables_0" '.($pc_tables==='0'?' checked':'').' value="0">';
+ echo '<label for="pc_tables_0">'.$lang['srv_settings_mobile_tables_0'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="pc_tables" id="pc_tables_1" '.($pc_tables==='1'?' checked':'').' value="1">';
+ echo '<label for="pc_tables_1">'.$lang['srv_settings_mobile_tables_1'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="pc_tables" id="pc_tables_2" '.($pc_tables==='2'?' checked':'').' value="2">';
+ echo '<label for="pc_tables_2">'.$lang['srv_settings_mobile_tables_2'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="pc_tables" id="pc_tables_3" '.($pc_tables==='3'?' checked':'').' value="3">';
+ echo '<label for="pc_tables_3">'.$lang['srv_settings_mobile_tables_3'].'</label> ';
+ echo '</div>';
+ echo '</div>';
+
+
// Prilagoditev tabel pri mobilnikih
$mobile_tables = SurveySetting::getInstance()->getSurveyMiscSetting('mobile_tables');
- echo '<span class="nastavitveSpan2" >'.$lang['srv_settings_mobile_tables'].':</span>';
- echo '<label for="mobile_tables_1"><input type="radio" name="mobile_tables" id="mobile_tables_1" '.($mobile_tables==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="mobile_tables_2"><input type="radio" name="mobile_tables" id="mobile_tables_2" '.($mobile_tables==='2'?' checked':'').' value="2">'.$lang['srv_settings_mobile_tables_slide'].'</label> ';
- echo '<label for="mobile_tables_0"><input type="radio" name="mobile_tables" id="mobile_tables_0" '.($mobile_tables==='0'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
+
+ echo '<div class="setting_holder">';
+
+ echo '<span class="setting_title" >'.$lang['srv_table_settings_mobile_tables'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_0" '.($mobile_tables==='0'?' checked':'').' value="0">';
+ echo '<label for="mobile_tables_0">'.$lang['srv_settings_mobile_tables_0'].'</label> ';
echo '</div>';
-
-
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_1" '.($mobile_tables==='1'?' checked':'').' value="1">';
+ echo '<label for="mobile_tables_1">'.$lang['srv_settings_mobile_tables_1'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_2" '.($mobile_tables==='2'?' checked':'').' value="2">';
+ echo '<label for="mobile_tables_2">'.$lang['srv_settings_mobile_tables_2'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="mobile_tables" id="mobile_tables_3" '.($mobile_tables==='3'?' checked':'').' value="3">';
+ echo '<label for="mobile_tables_3">'.$lang['srv_settings_mobile_tables_3'].'</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
+
echo '</fieldset>';
}
@@ -1416,60 +1893,78 @@ class SurveyAdminSettings { $referal = SurveySetting::getInstance()->getSurveyMiscSetting('survey_referal');
$date = SurveySetting::getInstance()->getSurveyMiscSetting('survey_date');
+ $ip = $ip == '' ? 0 : $ip;
+ $ip_show = $ip_show == '' ? 0 : $ip_show;
+ $browser = $browser == '' ? 0 : $browser;
+ $referal = $referal == '' ? 0 : $referal;
+ $date = $date == '' ? 0 : $date;
- echo '<fieldset class="wide">';
+
+ echo '<fieldset>';
echo '<legend>'.$lang['srv_sledenje'].'</legend>';
// Preverimo ce je vklopljen modul za volitve - potem ne pustimo nobenih preklopov
$voting_disabled = '';
- $voting_disabled_class = '';
if(SurveyInfo::getInstance()->checkSurveyModule('voting')){
$voting_disabled = ' disabled';
- $voting_disabled_class = ' class="gray"';
- echo '<p class="red">'.$lang['srv_voting_warning_paradata'].'</p>';
+ echo '<p class="red">'.$lang['srv_voting_warning_paradata'].'</p><br>';
}
- echo '<p>'.$lang['srv_metadata_desc'].'</p>';
-
- echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_browser'].':</label></span>';
- echo ' <label for="survey_browser_1" '.$voting_disabled_class.'><input type="radio" name="survey_browser" id="survey_browser_1" value="1"'.($browser==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label>';
- echo ' <label for="survey_browser_0" '.$voting_disabled_class.'><input type="radio" name="survey_browser" id="survey_browser_0" value="0"'.($browser==0?' checked':'').' '.$voting_disabled.'>'.$lang['yes'].'</label><br class="clr"/>';
-
- echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_referal'].':</label></span>';
- echo ' <label for="survey_referal_1" '.$voting_disabled_class.'><input type="radio" name="survey_referal" id="survey_referal_1" value="1"'.($referal==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label>';
- echo ' <label for="survey_referal_0" '.$voting_disabled_class.'><input type="radio" name="survey_referal" id="survey_referal_0" value="0"'.($referal==0?' checked':'').' '.$voting_disabled.'>'.$lang['yes'].'</label><br class="clr"/>';
+ echo '<div class="setting_holder">';
+ echo '<p>'.$lang['srv_metadata_desc'].'</p>';
+ echo '</div>';
- echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_date'].':</label></span>';
- echo ' <label for="survey_date_1" '.$voting_disabled_class.'><input type="radio" name="survey_date" id="survey_date_1" value="1"'.($date==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label>';
- echo ' <label for="survey_date_0" '.$voting_disabled_class.'><input type="radio" name="survey_date" id="survey_date_0" value="0"'.($date==0?' checked':'').' '.$voting_disabled.'>'.$lang['yes'].'</label><br class="clr"/>';
-
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="survey_browser" value="1">';
+ echo '<input type="checkbox" id="survey_browser" name="survey_browser" value="0" '.($browser==0? ' checked':'').' '.$voting_disabled.'>';
+ echo '<label for="survey_browser">'. $lang['srv_sledenje_browser'] .'</label> ';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="survey_referal" value="1">';
+ echo '<input type="checkbox" id="survey_referal" name="survey_referal" value="0" '.($referal==0? ' checked':'').' '.$voting_disabled.'>';
+ echo '<label for="survey_referal">'. $lang['srv_sledenje_referal'] .'</label> ';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="survey_date" value="1">';
+ echo '<input type="checkbox" id="survey_date" name="survey_date" value="0" '.($date==0? ' checked':'').' '.$voting_disabled.'>';
+ echo '<label for="survey_date">'. $lang['srv_sledenje_date'] .'</label> ';
+ echo '</div>';
+
echo '</fieldset>';
-
- echo '<br />';
-
-
echo '<fieldset>';
echo '<legend>'.$lang['srv_sledenje_ip_title'].'</legend>';
-
- echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_ip'].':</label></span>';
- echo ' <label for="survey_ip_1" '.$voting_disabled_class.'><input type="radio" name="survey_ip" id="survey_ip_1" value="1"'.($ip==1?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label>';
- echo ' <label for="survey_ip_0" '.$voting_disabled_class.'><input type="radio" name="survey_ip" id="survey_ip_0" value="0"'.($ip==0?' checked':'').' '.$voting_disabled.'>'.$lang['yes'].'</label>';
-
- if($ip == 0 && $ip_show != 1)
- echo '<div class="spaceLeft floatRight red" style="display:inline; width:520px;">'.$lang['srv_sledenje_ip_alert'].'</div>';
-
- echo '<br class="clr"/>';
-
- if($ip == 0 && ($admin_type == 0 || $admin_type == 1)){
- echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_show_ip'].':</label></span>';
- echo ' <label for="survey_show_ip_0" '.$voting_disabled_class.'><input type="radio" name="survey_show_ip" id="survey_show_ip_0" value="0"'.($ip_show==0?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label>';
- echo ' <label for="survey_show_ip_1" '.$voting_disabled_class.'><input type="radio" name="survey_show_ip" id="survey_show_ip_1" value="1"'.($ip_show==1?' checked':'').' '.$voting_disabled.'>'.$lang['yes'].'</label>';
-
- if($ip_show == 1)
- echo '<div class="spaceLeft floatRight red" style="display:inline; width:520px;">'.$lang['srv_show_ip_alert'].'</div>';
+
+ //Shranjuj IP naslov respondenta
+ echo '<div class="setting_holder '.(($ip == 0) ? '' : ' bottom0').'" id="save_IP">';
+ echo '<input type="hidden" name="survey_ip" value="1">';
+ echo '<input type="checkbox" id="survey_ip" name="survey_ip" value="0" '.($ip==0? ' checked':'').' '.$voting_disabled.' onChange="toggleParapodatki();">';
+ echo '<label for="survey_ip">'. $lang['srv_sledenje_ip'] .'</label> ';
+ echo '</div>';
+
+ echo '<div class=" '.(($ip == 1 && $ip_show == 0) ? 'displayNone' : '').'" id="save_IP_warning">';
+ echo '<p class="red">'.$lang['srv_sledenje_ip_alert'].'</p><br>';
+ echo '</div>';
+
+ //Poveži IP v bazi s podatki
+ if ($admin_type == 0 || $admin_type == 1){
+ echo '<div class="'.(($ip == 0) ? '' : ' displayNone').'" id="connect_IP">';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="survey_show_ip" value="0">';
+ echo '<input type="checkbox" id="survey_show_ip" name="survey_show_ip" value="1" '.($ip_show==1? ' checked':'').' '.$voting_disabled.' onChange="toggleParapodatki();">';
+ echo '<label for="survey_show_ip">'. $lang['srv_show_ip'] .'</label> ';
+ echo '</div>';
+
+ echo '<div class=" '.(($ip_show == 1) ? '' : ' displayNone').'" id="connect_IP_warning">';
+ echo '<p class="red">'.$lang['srv_show_ip_alert'].'</p>';
+ echo '</div>';
+
+ echo '</div>';
}
echo '</fieldset>';
@@ -1477,16 +1972,26 @@ class SurveyAdminSettings { // Povezovanje identifikatorjev s podatki - samo za admine in ce so vklopljena email vabila
if ($admin_type == 0 && SurveyInfo::getInstance()->checkSurveyModule('email')) {
- echo '<br />';
- echo '<fieldset class="wide">';
+ echo '<fieldset>';
echo '<legend>'.$lang['srv_sledenje_identifikatorji_title'].' '.Help::display('srv_email_with_data').'</legend>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_sledenje_identifikatorji'].':</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="show_email" id="show_email_0" value="0"'.($row['show_email']==0?' checked':'').' '.$voting_disabled.' onClick="toggleParapodatki();">';
+ echo '<label for="show_email_0">'.$lang['no'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="show_email" id="show_email_1" value="1"'.($row['show_email']==1?' checked':'').' '.$voting_disabled.' onClick="toggleParapodatki();">';
+ echo '<label for="show_email_1">'.$lang['yes'].'</label>';
+ echo '</div>';
- echo '<span class="nastavitveSpan1 wide"><label>'.$lang['srv_sledenje_identifikatorji'].':</label></span>';
- echo ' <label for="show_email_0" '.$voting_disabled_class.'><input type="radio" name="show_email" id="show_email_0" value="0"'.($row['show_email']==0?' checked':'').' '.$voting_disabled.'>'.$lang['no'].'</label>';
- echo ' <label for="show_email_1" '.$voting_disabled_class.'><input type="radio" name="show_email" id="show_email_1" value="1"'.($row['show_email']==1?' checked':'').' '.$voting_disabled.'>'.$lang['yes'].'</label>';
+ echo '</div>';
- if($row['show_email'] == 1)
- echo '<div class="spaceLeft floatRight red" style="display:inline; width:520px;">'.$lang['srv_show_mail_with_data3'].'</div>';
+ echo '<div class="setting_holder '.(($row['show_email'] == 1) ? '' : ' displayNone').'" id="connect_identifier_warning">';
+ echo '<p class="red">'.$lang['srv_show_mail_with_data3'].'.</p>';
+ echo '</div>';
echo '</fieldset>';
}
@@ -1498,117 +2003,112 @@ class SurveyAdminSettings { SurveySetting::getInstance()->Init($this->anketa);
// Nastavitve za izpis vprasalnika
- echo '<fieldset class="wide">';
+ echo '<fieldset>';
echo '<legend>'.$lang['srv_export_survey_settings'].'</legend>';
// Številčenje vprašanj (default da)
$export_numbering = SurveySetting::getInstance()->getSurveyMiscSetting('export_numbering');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_nastavitveStevilcenje'].':</span>';
- echo '<label for="export_numbering_1"><input type="radio" name="export_numbering" id="export_numbering_1" '.($export_numbering==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_numbering_0"><input type="radio" name="export_numbering" id="export_numbering_0" '.($export_numbering!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
-
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_numbering" value="0">';
+ echo '<input type="checkbox" id="export_numbering" name="export_numbering" value="1" '.($export_numbering==='1'?' checked':'').'>';
+ echo '<label for="export_numbering">'. $lang['srv_nastavitveStevilcenje'] .'</label> ';
+ echo '</div>';
+
// Prikaz pogojev (default da)
$export_show_if = SurveySetting::getInstance()->getSurveyMiscSetting('export_show_if');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_if'].':</span>';
- echo '<label for="export_show_if_1"><input type="radio" name="export_show_if" id="export_show_if_1" '.($export_show_if==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_show_if_0"><input type="radio" name="export_show_if" id="export_show_if_0" '.($export_show_if!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_show_if" value="0">';
+ echo '<input type="checkbox" id="export_show_if" name="export_show_if" value="1" '.($export_show_if==='1'?' checked':'').'>';
+ echo '<label for="export_show_if">'. $lang['srv_export_if'] .'</label> ';
+ echo '</div>';
// Prikazi uvoda (default ne)
$export_show_intro = SurveySetting::getInstance()->getSurveyMiscSetting('export_show_intro');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_intro'].':</span>';
- echo '<label for="export_show_intro_1"><input type="radio" name="export_show_intro" id="export_show_intro_1" '.($export_show_intro==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_show_intro_0"><input type="radio" name="export_show_intro" id="export_show_intro_0" '.($export_show_intro!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="exporexport_show_introt_show_if" value="0">';
+ echo '<input type="checkbox" id="export_show_intro" name="export_show_intro" value="1" '.($export_show_intro==='1'?' checked':'').'>';
+ echo '<label for="export_show_intro">'. $lang['srv_export_intro'] .'</label> ';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
-
// Nastavitve za izpis odgovorov respondentov
- echo '<fieldset class="wide">';
+ echo '<fieldset>';
echo '<legend>'.$lang['srv_export_results_settings'].'</legend>';
-
-/* // Tip izvoza (0->navaden-default, 1->dolg, 2->kratek)
- $export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_displaydata_type'].':</span>';
- echo '<select name="export_data_type" id="export_data_type" >';
- echo ' <option value="0"'.((int)$export_data_type == 0 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type0'] . '</option>';
- echo ' <option value="1"'.((int)$export_data_type == 1 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type1'] . '</option>';
- echo ' <option value="2"'.((int)$export_data_type == 2 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type2'] . '</option>';
- echo '</select>';
- echo Help :: display('displaydata_pdftype'); */
- // Tip izvoza (1->dolg oz. razsirjen, 2->kratek oz. skrcen)
- $export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_displaydata_type'].':</span>';
- echo '<select name="export_data_type" id="export_data_type" >';
- echo ' <option value="2"'.((int)$export_data_type == 2 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type2'] . '</option>';
- echo ' <option value="1"'.((int)$export_data_type == 1 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type1'] . '</option>';
- //echo ' <option value="2"'.((int)$export_data_type == 2 ? ' selected="selected"' : '').'>' . $lang['srv_displaydata_type2'] . '</option>';
- echo '</select>';
- echo Help :: display('displaydata_pdftype');
-
- echo '<br />';
-
+
// Številčenje vprašanj (default da)
$export_data_numbering = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_numbering');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_nastavitveStevilcenje'].':</span>';
- echo '<label for="export_data_numbering_1"><input type="radio" name="export_data_numbering" id="export_data_numbering_1" '.($export_data_numbering==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_numbering_0"><input type="radio" name="export_data_numbering" id="export_data_numbering_0" '.($export_data_numbering!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_data_numbering" value="0">';
+ echo '<input type="checkbox" id="export_data_numbering" name="export_data_numbering" value="1" '.($export_data_numbering==='1'?' checked':'').'>';
+ echo '<label for="export_data_numbering">'. $lang['srv_nastavitveStevilcenje'] .'</label> ';
+ echo '</div>';
+
// Prikaz recnuma (default da)
$export_data_show_recnum = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_recnum');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_show_recnum'].':</span>';
- echo '<label for="export_data_show_recnum_1"><input type="radio" name="export_data_show_recnum" id="export_data_show_recnum_1" '.($export_data_show_recnum==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_show_recnum_0"><input type="radio" name="export_data_show_recnum" id="export_data_show_recnum_0" '.($export_data_show_recnum!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_data_show_recnum" value="0">';
+ echo '<input type="checkbox" id="export_data_show_recnum" name="export_data_show_recnum" value="1" '.($export_data_show_recnum==='1'?' checked':'').'>';
+ echo '<label for="export_data_show_recnum">'. $lang['srv_export_show_recnum'] .'</label> ';
+ echo '</div>';
+
// Prikaz pogojev (default da)
$export_data_show_if = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_show_if');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_if'].':</span>';
- echo '<label for="export_data_show_if_1"><input type="radio" name="export_data_show_if" id="export_data_show_if_1" '.($export_data_show_if==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_show_if_0"><input type="radio" name="export_data_show_if" id="export_data_show_if_0" '.($export_data_show_if!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br /><br />';
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_data_show_if" value="0">';
+ echo '<input type="checkbox" id="export_data_show_if" name="export_data_show_if" value="1" '.($export_data_show_if==='1'?' checked':'').'>';
+ echo '<label for="export_data_show_if">'. $lang['srv_export_if'] .'</label> ';
+ echo '</div>';
+
// Page break med posameznimi respondenti (default ne)
$export_data_PB = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_PB');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_pagebreak'].':</span>';
- echo '<label for="export_data_PB_1"><input type="radio" name="export_data_PB" id="export_data_PB_1" '.($export_data_PB==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_PB_0"><input type="radio" name="export_data_PB" id="export_data_PB_0" '.($export_data_PB!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_data_PB" value="0">';
+ echo '<input type="checkbox" id="export_data_PB" name="export_data_PB" value="1" '.($export_data_PB==='1'?' checked':'').'>';
+ echo '<label for="export_data_PB">'. $lang['srv_export_pagebreak'] .'</label> ';
+ echo '</div>';
+
// Izpusti vprasanja brez odgovora (default ne)
$export_data_skip_empty = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_skip_empty');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_skip_empty'].':</span>';
- echo '<label for="export_data_skip_empty_1"><input type="radio" name="export_data_skip_empty" id="export_data_skip_empty_1" '.($export_data_skip_empty==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_skip_empty_0"><input type="radio" name="export_data_skip_empty" id="export_data_skip_empty_0" '.($export_data_skip_empty!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_data_skip_empty" value="0">';
+ echo '<input type="checkbox" id="export_data_skip_empty" name="export_data_skip_empty" value="1" '.($export_data_skip_empty==='1'?' checked':'').'>';
+ echo '<label for="export_data_skip_empty">'. $lang['srv_export_skip_empty'] .'</label> ';
+ echo '</div>';
+
// Izpusti podvprasanja brez odgovora (default ne)
$export_data_skip_empty_sub = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_skip_empty_sub');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_skip_empty_sub'].':</span>';
- echo '<label for="export_data_skip_empty_sub_1"><input type="radio" name="export_data_skip_empty_sub" id="export_data_skip_empty_sub_1" '.($export_data_skip_empty_sub==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_skip_empty_sub_0"><input type="radio" name="export_data_skip_empty_sub" id="export_data_skip_empty_sub_0" '.($export_data_skip_empty_sub!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> ';
-
- echo '<br />';
-
- // Landscape postavitev izvoza (default ne)
-/* $export_data_landscape = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_landscape');
- echo '<span class="nastavitveSpan1" >'.$lang['srv_export_landscape'].':</span>';
- echo '<label for="export_data_landscape_1"><input type="radio" name="export_data_landscape" id="export_data_landscape_1" '.($export_data_landscape==='1'?' checked':'').' value="1">'.$lang['yes'].'</label> ';
- echo '<label for="export_data_landscape_0"><input type="radio" name="export_data_landscape" id="export_data_landscape_0" '.($export_data_landscape!=='1'?' checked':'').' value="0">'.$lang['no'].'</label> '; */
-
+ echo '<div class="setting_holder">';
+ echo '<input type="hidden" name="export_data_skip_empty_sub" value="0">';
+ echo '<input type="checkbox" id="export_data_skip_empty_sub" name="export_data_skip_empty_sub" value="1" '.($export_data_skip_empty_sub==='1'?' checked':'').'>';
+ echo '<label for="export_data_skip_empty_sub">'. $lang['srv_export_skip_empty_sub'] .'</label> ';
+ echo '</div>';
+
+ // Tip izvoza (1->dolg oz. razsirjen, 2->kratek oz. skrcen)
+ echo '<div class="setting_holder">';
+ $export_data_type = SurveySetting::getInstance()->getSurveyMiscSetting('export_data_type');
+ echo '<label for="export_data_type">'.$lang['srv_displaydata_type'];
+ echo Help :: display('displaydata_pdftype');
+ echo ':</label>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_data_type" id="export_data_type2" '.((int)$export_data_type == 2 ? ' checked':'').' value="2">';
+ echo '<label for="export_data_type2">'.$lang['srv_displaydata_type2'].'</label> ';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_data_type" id="export_data_type1" '.((int)$export_data_type == 1 ?' checked':'').' value="1">';
+ echo '<label for="export_data_type1">'.$lang['srv_displaydata_type1'].'</label> ';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
}
@@ -1620,18 +2120,17 @@ class SurveyAdminSettings { }
- if ($_GET['a'] != 'jezik' && $_GET['a'] != 'trajanje' && $_GET['a'] != A_GDPR) {
- //echo ' <p><a href="index.php?anketa='.$this->anketa.'&a=prestevilci">'.$lang['srv_prestevilci'].'</a></p>';
- echo '<br class="clr" />';
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
- //echo '<img src="icons/icons/disk.png" alt="" vartical-align="middle" />';
- echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
+ if ($_GET['a'] != 'jezik' && $_GET['a'] != 'trajanje' && $_GET['a'] != A_GDPR && $_GET['a'] != 'dostop') {
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
}
- if ($_GET['s'] == '1') {
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
echo '</form>';
@@ -1683,7 +2182,7 @@ class SurveyAdminSettings { echo '<p><label>'.$lang['srv_email_setting_from'].'<span>'.$enkaSettings['SMTPFrom'].'</span><input type="hidden" name="SMTPFrom0" value="'.$enkaSettings['SMTPFrom'].'"></label>';
echo '</p>';
# replyTo
- echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo0" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
+ echo '<p><label>'.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').'<input type="text" name="SMTPReplyTo0" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
echo '</p>';
echo '</div>';
@@ -1694,7 +2193,7 @@ class SurveyAdminSettings { echo '<p><label>'.$lang['srv_email_setting_from'].'<input type="text" name="SMTPFrom1" value="'.$enkaSettings['SMTPFrom'].'"></label>';
echo '</p>';
# replyTo
- echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo1" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
+ echo '<p><label>'.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').'<input type="text" name="SMTPReplyTo1" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
echo '</p>';
#Password
echo '<p><label>'.$lang['srv_email_setting_password'].'<input type="password" name="SMTPPassword1" placeholder="'.$lang['srv_email_setting_password_placeholder'].'"></label>';
@@ -1711,7 +2210,7 @@ class SurveyAdminSettings { echo '<p><label>'.$lang['srv_email_setting_from'].'<input type="text" name="SMTPFrom2" value="'.$enkaSettings['SMTPFrom'].'"></label>';
echo '</p>';
# replyTo
- echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo2" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
+ echo '<p><label>'.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').'<input type="text" name="SMTPReplyTo2" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
echo '</p>';
#Username
echo '<p><label>'.$lang['srv_email_setting_username'].'<input type="text" name="SMTPUsername2" value="'.$enkaSettings['SMTPUsername'].'" ></label>';
@@ -1749,7 +2248,6 @@ class SurveyAdminSettings { echo '</form>';
echo '</fieldset>';
- echo '<br class="clr" />';
echo '<span id="send_mail_mode_test" class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_green" href="#" onclick="showTestSurveySMTP(); return false;"><span>';
echo $lang['srv_email_setting_btn_test'].'</span></a></div></span>';
echo '<span class="floatLeft spaceRight" ><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
@@ -1763,14 +2261,10 @@ class SurveyAdminSettings { echo '</div>';
}
- echo '<br class="clr" />';
-
- if ($_GET['s'] == '1') {
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
-
-
}
/**
@@ -1782,7 +2276,7 @@ class SurveyAdminSettings { global $admin_lang;
global $resp_lang;
- $lang_id = (int)$_GET['lang_id'];
+ $lang_id = isset($_GET['lang_id']) ? (int)$_GET['lang_id'] : '';
if ($lang_id > 0)
$lang_id = '_'.$lang_id;
else
@@ -1799,28 +2293,57 @@ class SurveyAdminSettings { if($text == 'srv_nextpage_uvod')
$next_uvod = $lang_id == '' ? $admin_lang['srv_nextpage_uvod_desc'] : $resp_lang['srv_nextpage_uvod_desc'];
- echo '<div class="standardna-beseda"><span class="nastavitveSpan1 gray textleft">'.($lang_id==''?$admin_lang[$text]:$resp_lang[$text]).' '.($text == 'srv_nextpage_uvod' ? '<span class="gray italic">('.$next_uvod.')</span>' : '').'</span> ';
- echo '<span class="nastavitveSpan1 textleft textItalic">'.$lang[$text].' </span>';
- echo '<div contentEditable="true" class="standardna-beseda-urejanje" name="srvlang_'.$text.$lang_id.'" id="srvlang_'.$text.$lang_id.'">'.$value.'</div>';
-
+ echo '<tr>';
+ echo '<td>'.($lang_id==''?$admin_lang[$text]:$resp_lang[$text]).' '.($text == 'srv_nextpage_uvod' ? ' ('.$next_uvod.')' : '').'</td> ';
+ echo '<td>'.$lang[$text].'</td>';
+ echo '<td><div class="standardna-beseda"><div contentEditable="true" class="standardna-beseda-urejanje" name="srvlang_'.$text.$lang_id.'" id="srvlang_'.$text.$lang_id.'">'.$value.'</div>';
+
if($editor == 1)
- echo '<span class="faicon edit2 sb-edit"'.$onclick.' style="float:right; margin-top:1px; display:none;"></span>';
-
+ echo '<span class="faicon edit-vprasanje sb-edit blue"'.$onclick.' style="display:none;"></span>';
+
echo '<textarea name="srvlang_'.$text.$lang_id.'" id="polje_srvlang_'.$text.$lang_id.'" style="display:none;">'.$value.'</textarea>';
+ echo '</div></td>';
- echo '</div>';
+ echo '</tr>';
}
function anketa_nice_links () {
+ global $lang;
echo '<div id="anketa_edit">';
+
+ echo '<fieldset><legend>'.$lang['srv_nice_url'].'</legend>';
$sql = sisplet_query("SELECT l.link, a.id, a.naslov FROM srv_nice_links l, srv_anketa a WHERE a.id=l.ank_id ORDER BY l.link ASC");
- while ($row = mysqli_fetch_array($sql)) {
- echo '<p><strong style="display:inline-block; width:300px;">'.$row['link'].'</strong> <a href="index.php?anketa='.$row['id'].'&a=vabila&m=url">'.$row['naslov'].'</a></p>';
+ $table_exists = 0;
+ while ($row = mysqli_fetch_array($sql)) {
+ if ($table_exists == 0) {
+ echo '<p class="bottom16">'.$lang['srv_nice_url_note'].'</p>';
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
+ echo '<table>';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_nice_url_extension'].'</th>';
+ echo '<th>'.$lang['srv_nice_url_surveyname'].'</th>';
+ echo '</tr>';
+
+ $table_exists = 1;
+ }
+
+ echo '<tr>';
+ echo '<td>'.$row['link'].'</td>';
+ echo '<td><a href="index.php?anketa='.$row['id'].'&a=vabila">'.$row['naslov'].'</a></td>';
+ echo '</tr>';
+ }
+
+ if ($table_exists == 1){
+ echo '</table>';
+ echo '</div>';
+ echo '</div>';
}
-
+
+ echo '</fieldset>';
echo '</div>';
}
@@ -1851,14 +2374,44 @@ class SurveyAdminSettings { global $lang;
echo '<div id="anketa_edit">';
+
+ echo '<fieldset><legend>'.$lang['srv_anketa_deleted'].'</legend>';
$sql = sisplet_query("SELECT srv_anketa.id, srv_anketa.naslov, users.email FROM srv_anketa, users WHERE users.id=srv_anketa.insert_uid AND active='-1' ORDER BY edit_time DESC");
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
-
- while ($row = mysqli_fetch_array($sql)) {
- echo '<p><strong style="display:inline-block; width:300px;"><a href="index.php?anketa='.$row['id'].'">'.$row['naslov'].'</a></strong> <span style="display:inline-block; width:300px;">('.$row['email'].')</span> <a href="#" onclick="anketa_restore(\''.$row['id'].'\'); return false;">'.$lang['srv_restore'].'</a></p>';
+
+
+ $table_exists = 0;
+ while ($row = mysqli_fetch_array($sql)) {
+ if ($table_exists == 0) {
+ echo '<p class="bottom16">'.$lang['srv_anketa_deleted_note'].'</p>';
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
+ echo '<table>';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_data_deleted_surveyname'].'</th>';
+ echo '<th class="nowrap">'.$lang['srv_data_deleted_user'].'</th>';
+ echo '<th></th>';
+ echo '</tr>';
+
+ $table_exists = 1;
+ }
+
+ echo '<tr>';
+ echo '<td><a href="index.php?anketa='.$row['id'].'">'.$row['naslov'].'</a></td>';
+ echo '<td>'.$row['email'].'</td>';
+ echo '<td><button class="table white-black caps" type="button" onclick="anketa_restore(\''.$row['id'].'\'); return false;">'.$lang['srv_anketa_deleted_restore'].'</button></td>';
+ echo '</tr>';
}
+
+ if ($table_exists == 1){
+ echo '</table>';
+ echo '</div>';
+ echo '</div>';
+ }
+
+ echo '</fieldset>';
echo '</div>';
}
@@ -1870,14 +2423,39 @@ class SurveyAdminSettings { global $lang;
echo '<div id="anketa_edit">';
-
+
+ echo '<fieldset><legend>'.$lang['srv_data_deleted'].'</legend>';
+
$sql = sisplet_query("SELECT a.id, a.naslov, users.email, COUNT(u.id) AS deleted FROM srv_anketa a, srv_user u, users WHERE u.deleted='1' AND u.ank_id=a.id AND users.id=a.insert_uid GROUP BY a.id ORDER BY edit_time DESC");
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
- while ($row = mysqli_fetch_array($sql)) {
- echo '<p><strong style="display:inline-block; width:300px;"><a href="index.php?anketa='.$row['id'].'">'.$row['naslov'].'</a></strong> <span style="display:inline-block; width:300px;">('.$row['email'].')</span> <a href="#" onclick="data_restore(\''.$row['id'].'\'); return false;">'.$lang['srv_restore'].'</a> ('.$row['deleted'].')</p>';
+ $table_exists = 0;
+ while ($row = mysqli_fetch_array($sql)) {
+ if ($table_exists == 0) {
+ echo '<p class="bottom16">'.$lang['srv_data_deleted_note'].'</p>';
+ echo '<table>';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_data_deleted_surveyname'].'</th>';
+ echo '<th class="nowrap">'.$lang['srv_data_deleted_user'].'</th>';
+ echo '<th class="nowrap">'.$lang['srv_data_deleted'].'</th>';
+ echo '<th></th>';
+ echo '</tr>';
+
+ $table_exists = 1;
+ }
+
+ echo '<tr>';
+ echo '<td><a href="index.php?anketa='.$row['id'].'">'.$row['naslov'].'</a></td>';
+ echo '<td>'.$row['email'].'</td>';
+ echo '<td class="right">'.$row['deleted'].'</td>';
+ echo '<td><button class="table white-black caps" type="button" onclick="data_restore(\''.$row['id'].'\'); return false;">'.$lang['srv_data_deleted_restore'].'</button></td>';
+ echo '</tr>';
}
+
+ if ($table_exists == 1)
+ echo '</table>';
+ echo '</fieldset>';
echo '</div>';
}
@@ -1889,455 +2467,303 @@ class SurveyAdminSettings { function anketa_vabila() {
global $lang;
- if ($_GET['m'] == '' || $_GET['m'] == 'settings') {
+ if ($_GET['a'] == A_VABILA) {
$this->anketa_vabila_nastavitve();
- } elseif ($_GET['m'] == 'url') {
- $this->anketa_vabila_url();
+ }
+ elseif ($_GET['a'] == A_OTHER_INV) {
+ $this->anketa_vabila_drugo();
}
}
function anketa_vabila_nastavitve() {
global $lang, $site_url, $global_user_id;
- $row = SurveyInfo::getInstance()->getSurveyRow();
-
$d = new Dostop();
-
- echo '<table id="tbl_inv_setting" style="width:100%">';
- echo '<colgroup>';
- echo '<col style="width:30%;" valign="top"/>';
- echo '<col style="width:70%;" valign="top"/>';
- echo '</colgroup>';
-
- echo '<tr>';
-
- # če ni aktivna damo opozorilo
- echo '<td style="height: 50px;">';
-
+
# Opozorilo o napakah
- $sd = new SurveyDiagnostics($this->anketa);
- $sd->doDiagnostics();
- $diagnostic = $sd->getDiagnostic();
- if (is_array($diagnostic) && count($diagnostic) > 0)
- echo '<div id="anketa_diagnostika_note2">'.$lang['srv_publication_survey_warnings'].' <a href="index.php?anketa=' . $this->anketa . '&a='.A_TESTIRANJE.'" class="bold">>></a></div>';
+ $this->survey_errors();
+
+ # Opozorilo - anketa ni aktivna
+ $this->activation_error();
+
+ // Delite povezavo do ankete
+ echo '<div class="title">'.$lang['srv_publication_survey_links'].'</div>';
+
+ //echo '<p class="bottom16">'.$lang['srv_publication_survey_links_note'].'</p>';
- // Aktivacija ankete
- echo '<span id="anketa_aktivacija_note" '.($row['active']==0?' class="google_yellow"':'').'>';
- $this->anketa_aktivacija_note();
- echo'</span>';
-
- echo '</td>';
-
- # Povezave, lepi linki...
- echo '<td style="padding-left:15px;" rowspan="2">';
- # Linki, lepi linki
- $this->niceUrlSettings();
+ //Lep URL - dodajanje
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+ $userAccess = UserAccess::getInstance($global_user_id);
+ if(!$userAccess->checkUserAccess($what='nice_url')){
- echo '<br />';
+ echo '<div class="button_holder">';
+
+ echo ' <div class="copy_survey_url_holder">';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span><span class="italic"></span>';
+ echo ' <a href="'.SurveyInfo::getRawSurveyLink().'">'.SurveyInfo::getRawSurveyLink().'</a>';
+ echo ' </div>';
+ echo ' <button type="button" class="medium blue" onclick="CopyToClipboard(\''.SurveyInfo::getRawSurveyLink().'\'); actionNotePopup(\'link_copied\', \'success\');">
+ <span class="faicon copy link-right"></span>'.$lang['srv_diagnostika_testiranje_copy_url'].'</button>';
+ echo ' </div>';
+
+ /* echo ' <button type="button" class="medium yellow">'.$lang['srv_nice_url_add'].'</button>'; */
+ echo ' <button type="button" class="medium yellow niceurl">'.$lang['srv_nice_url_add'].'<span class="faicon lock_close"></span></button>';
+
+ echo '</div>';
+ }
+ else{
+
+ echo '<div class="button_holder">';
+
+ echo ' <div class="copy_survey_url_holder">';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span><span class="italic"></span>';
+ echo ' <a href="'.SurveyInfo::getRawSurveyLink().'">'.SurveyInfo::getRawSurveyLink().'</a>';
+ echo ' </div>';
+ echo ' <button type="button" class="medium blue" onclick="CopyToClipboard(\''.SurveyInfo::getRawSurveyLink().'\'); actionNotePopup(\'link_copied\', \'success\');">
+ <span class="faicon copy"></span>'.$lang['srv_diagnostika_testiranje_copy_url'].'</button>';
+ echo ' </div>';
+
+ // Gumb za dodajanje lepega linka
+ echo ' <button id="nice_url_button" type="button" class="medium white-blue niceurl" onclick="publishPopupOpen(\'add_url\');">'.$lang['srv_nice_url_add'].'</button>';
+
+ echo '</div>';
+
+
+ if (isset($_GET['error'])) {
+
+ $error = $_GET['error'];
+
+ /* ?><script type="text/javascript">
+ toggleNiceURL('show');
+ </script><?php */
+
+ echo '<div id="nice_url_error">';
+
+ // Prekratek lep url
+ if(strlen($error) <= 2)
+ echo '<p class="red"><span class="bold">'.$error.'</span> '.$lang['srv_nice_url_short'].'</p>';
+ // Predolg lep url
+ elseif(strlen($error) > 20)
+ echo '<p class="red"><span class="bold">'.$error.'</span> '.$lang['srv_nice_url_long'].'</p>';
+ // Ze obstaja
+ else
+ echo '<p class="red"><span class="bold">'.$error.'</span> '.$lang['srv_nice_url_taken'].'</p>';
+
+ echo '</div>';
+ }
+
+ }
+
+ // Zlistamo nice URL, povezave za skupine in jezike
+ $this->niceUrlSettings();
- // Napredne URL povezave
- echo '<div style="background-color:#EFF2F7; padding:5px 10px;">';
- //echo '<span class="strong">'.$lang['srv_publication_advanced_url'].'</span>';
- echo '<div class="buttonwrapper" style="margin:10px 0; height:25px;"><a class="ovalbutton floatLeft" title="'.$lang['srv_publication_advanced_url'].'" href="index.php?anketa=' . $this->anketa . '&a=' . A_VABILA . '&m=url">'.$lang['srv_publication_advanced_url'].'</a></div>';
- echo '<p>'.$lang['srv_publication_advanced_url_text'].'</p>';
+ // Spodnji kvadratki
+ // Več načinov deljenja ankete
+ echo '<div class="divider_line"></div>';
+
+ echo '<div class="more">';
+
+ // Vabila
+ echo '<div class="more_block '.(!$userAccess->checkUserAccess('arhivi') ? 'user_access_locked' : '').'" onclick="window.location.href=\'index.php?anketa=' . $this->anketa . '&a=invitations\'">';
+ echo '<div class="more_title">';
+ echo '<div class="more_title_icon"><span class="faicon inv_sent_1 empty"></span></div>';
+ echo $lang['srv_publication_invitations'];
+ if(!$userAccess->checkUserAccess('arhivi')) echo '<span class="faicon lock_close"></span>';
+ echo '</div>';
echo '</div>';
-
- echo '<br />';
-
- // Individualizirana vabila
- echo '<div style="background-color:#EFF2F7; padding:5px 10px;">';
- //echo '<span class="strong">'.$lang['srv_publication_invitations'].'</span>';
- echo '<div class="buttonwrapper" style="margin:10px 0; height:25px;"><a class="ovalbutton floatLeft" title="'.$lang['srv_publication_invitations'].'" href="index.php?anketa=' . $this->anketa . '&a=invitations">'.$lang['srv_publication_invitations'].'</a></div>';
- echo '<p>'.$lang['srv_publication_invitations_text'].'</p>';
+
+ // Drugi nacini
+ echo '<div class="more_block" onclick="window.location.href=\'index.php?anketa=' . $this->anketa . '&a=other_inv\'">';
+ echo '<div class="more_title">';
+ echo '<div class="more_title_icon"><span class="faicon qrcode"></span></div>';
+ echo $lang['srv_publication_survey_more'];
+ echo '</div>';
echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
- echo '</td>';
- /* # Opozorilo o napakah
- echo '<td style="padding-left:15px;">';
- $sd = new SurveyDiagnostics($this->anketa);
- $sd->doDiagnostics();
- $diagnostic = $sd->getDiagnostic();
- if (is_array($diagnostic) && count($diagnostic) > 0) {
- echo '<span id="anketa_diagnostika_note">';
- $this->anketa_diagnostika_note($sd, $d->checkDostopSub('test'));
- echo'</span>';
- }
- echo '</td>';*/
-
- echo '</tr>';
-
- echo '<tr>';
-
- echo '<td>';
- echo '<input type="hidden" value="' . $this->anketa . '" name="anketa" >';
-
- $base_url = $site_url.'admin/survey/index.php?anketa='.$this->anketa;
- # preberomo osnovne nastavitve
+ echo '</div>';
+ }
+
+ # Opozorilo - anketa ni aktivna
+ private function activation_error(){
+ global $lang;
+
$row = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<fieldset><legend>'.($row['active']==0 ? $lang['srv_default_setting_unactive'] : $lang['srv_default_setting']).'</legend>';
-
- // Ce imamo dostop do zavihka urejanje
- if($d->checkDostopSub('edit')){
-
- # Trajanje
- $starts = explode('-',$row['starts']);
- $starts = $starts[2].'.'.$starts[1].'.'.$starts[0];
- $expire = explode('-',$row['expire']);
- $expire = $expire[2].'.'.$expire[1].'.'.$expire[0];
- echo '<p>'.$lang['srv_starts'].':<a href="'.$base_url.'&a='.A_TRAJANJE.'&f=vabila_settings" title="'.$lang['srv_info_duration'].'"><span class="qs_data as_link">'.$starts.'</span></a></p>';
- if ( $row['expire'] == PERMANENT_DATE ) {
- #trajna
- echo '<p>'.$lang['srv_trajna_anketa'].':<a href="'.$base_url.'&a='.A_TRAJANJE.'&f=vabila_settings" title="'.$lang['srv_trajna_anketa'].'"><span class="qs_data as_link">'.($row['expire'] == PERMANENT_DATE ? $lang['yes'] : $lang['no']).'</span></a></p>';
- } else {
- echo '<p>'.$lang['srv_expire'].':<a href="'.$base_url.'&a='.A_TRAJANJE.'&f=vabila_settings" title="'.$lang['srv_info_duration'].'"><span class="qs_data as_link">'.$expire.'</span></a></p>';
- }
-
- // Skin ankete
- if ($row['skin_profile'] == 0) {
- $skin_name = $row['skin'];
- }
- else {
- $sqla = sisplet_query("SELECT name FROM srv_theme_profiles WHERE id = '".$row['skin_profile']."'");
- $rowa = mysqli_fetch_array($sqla);
- $skin_name = $rowa['name'];
- }
- //echo '<p>'.$lang['srv_themes'].':<a href="'.$base_url.'&a='.A_TEMA.'&f=vabila_settings" title="'.$lang['srv_themes'].'"><span class="qs_data as_link">'.$row['skin'].'</span></a></p>';
- echo '<p>'.$lang['srv_themes'].':<a href="'.$base_url.'&a='.A_TEMA.'" title="'.$lang['srv_themes'].'"><span class="qs_data as_link">'.$skin_name.'</span></a></p>';
+
+ if ($row['active']==0) {
+ echo '<div class="top_note one_liner">';
+ //echo ' <div class="title">';
+ //echo ' <span class="faicon warning"></span> '.$lang['srv_publication_survey_noactive'];
+ //echo ' </div>';
+ //echo '<p class="bottom16">'.$lang['srv_publication_survey_noactive_note'].'</p>';
+
+
+ echo '<div class="top_note_activate">';
- # Jezik
- $lang_old = $lang;
- $lang_admin = (int)$row['lang_admin'];
- $lang_resp = (int)$row['lang_resp'];
- $lang_array = array();
- $lang_array[0] = $lang['srv_language_not_set'];
- // Preberemo razpoložljive jezikovne datoteke
- if ($dir = opendir('../../lang')) {
- while (($file = readdir($dir)) !== false) {
- if ($file != '.' AND $file != '..') {
- if (is_numeric(substr($file, 0, strpos($file, '.')))) {
- $i = substr($file, 0, strpos($file, '.'));
- $file = '../../lang/'.$i.'.php';
- if (file_exists($file)) {
- include($file);
- $lang_array[$i] = $lang['language'];
- }
- }
+ //echo '<p class="semi-bold">'.$lang['srv_anketa_noactive2'].'</p>';
+ echo '<span class="faicon warning"></span><p>'.$lang['srv_publication_survey_noactive_note3'].'</p>';
+
+ //Toggle kopiran iz headerja
+ if (SurveyInfo::getSurveyColumn('active') == 1) {
+
+ # anketa je aktivna
+ # V kolikor gre za hierarhijo in uporabnik ni administrator hierarhije
+ if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){
+ if ($hierarhija_type == 1) {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ }
+ else{
+ echo '<a href="#" class="srv_ico" title="' . $lang['srv_anketa_active'] . '" style="cursor:text !important;">';
}
}
- }
-
- // nastavimo jezik nazaj
- /*$file = '../../lang/'.$lang_admin.'.php';
- if (file_exists($file)) {
- include($file);
- }*/
- $lang = $lang_old;
- $resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang');
- //echo '<p>'.$lang['srv_language_admin_1'].':</p>';
- echo '<p>'.$lang['srv_language_admin_0'].':<a href="'.$base_url.'&a='.A_JEZIK.'&f=vabila_settings" title="'.$lang['srv_language_admin_1'].'"><span class="qs_data as_link">'.$lang_array[$lang_admin].'</span></a> / <a href="'.$base_url.'&a='.A_JEZIK.'&f=vabila_settings" title="'.$lang['srv_language_respons_1'].'"><span class="qs_data as_link">'.$lang_array[$lang_resp].'</span></a></p>';
-
- #obveščanje
-
- // jezikovni linki
- $p = new Prevajanje($this->anketa);
- $p->dostop();
- $jeziki = $p->get_all_translation_langs();
- if (count($jeziki) > 0) {
- echo '<p>' . $lang['srv_trans_lang'] . ': ';
- $i = 0;
- foreach ($jeziki AS $key => $val) {
- if ($i++ != 0) echo ', ';
- echo '<a href="'.$link.'?anketa='.$this->anketa.'&a=prevajanje&lang_id='.$key.'" target="_blank">'.$val.'</a>';
+ else {
+ echo '<a href="#" class="srv_ico" onclick="anketa_active(\'' . $this->anketa . '\',\'' . $row['active'] . '\'); return false;" title="' . $lang['srv_anketa_active'] . '">';
}
- echo '</p>';
- }
- #piškotki
- echo '<p>'.$lang['srv_cookie'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_cookie'].'"><span class="qs_data as_link">'.$lang['srv_cookie_'.$row['cookie']].'</span></a></p>';
- echo '<p>'.$lang['srv_cookie_return'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_cookie_return'].'"><span class="qs_data as_link">'.($row['cookie_return'] == 0 ? $lang['srv_cookie_return_start'] : $lang['srv_cookie_return_middle']).'</span></a></p>';
-
- #more - več
- echo '<div id="srv_objava_info_more1" class="as_link" onclick="$(\'#srv_objava_info_more, #srv_objava_info_more1, #srv_objava_info_more2\').toggle();">'.$lang['srv_more'].'</div>';
- echo '<div id="srv_objava_info_more2" class="as_link displayNone" onclick="$(\'#srv_objava_info_more, #srv_objava_info_more1, #srv_objava_info_more2\').toggle();">'.$lang['srv_less'].'</div>';
- echo '<div id="srv_objava_info_more" class="displayNone">';
-
- if ($row['cookie'] > -1) {
- # če je piškotek dlje kot do konca nakete lahko izbere tudi druge možnosti
- echo '<p>'.$lang['srv_return_finished'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_return_finished'].'"><span class="qs_data as_link">'.($row['return_finished'] == 1 ? $lang['srv_return_finished_yes'] : $lang['srv_return_finished_no']).'</span></a></p>';
- } else {
- # ker je piškotek samo do konca ankete se ne more vrnit ali urejat
- echo '<p>'.$lang['srv_return_finished'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_return_finished'].'"><span class="qs_data as_link">'. $lang['srv_return_finished_no'] .'</span></a></p>';
- }
-
- echo '<p>'.$lang['srv_multilang'].':<a href="'.$base_url.'&a='.A_PREVAJANJE.'&f=vabila_settings" title="'.$lang['srv_multilang'].'"><span class="qs_data as_link">'.($row['multilang'] == 1 ? $lang['yes'] : $lang['no'] ).'</span></a></p>';
-
- echo '<p>'.$lang['srv_user'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_user'].'"><span class="qs_data as_link">';
- if ($row['user_from_cms'] == 1) {
- echo $lang['srv_respondent'];
- } elseif ($row['user_from_cms'] == 2) {
- echo $lang['srv_vnasalec'];
- } elseif ($row['user_from_cms'] == 0) {
- echo $lang['no1'];
- }
- echo '</span></a></p>';
-
- echo '<p>'.$lang['srv_block_ip'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_block_ip'].'"><span class="qs_data as_link">';
- if ($row['block_ip'] == 0) {
- echo $lang['no1'];
- } elseif ($row['block_ip'] == 10) {
- echo '10 min';
- } elseif ($row['block_ip'] == 20) {
- echo '20 min';
- } elseif ($row['block_ip'] == 60) {
- echo '60 min';
- } elseif ($row['block_ip'] == 720) {
- echo '12 '.$lang['hour_hours2'];
- } elseif ($row['block_ip'] == 1440) {
- echo '24 '.$lang['hour_hours2'];
- }
- echo '</a>';
- echo '</p>';
-
-
- # user from cms
- if ($row['user_from_cms']>0) {
- echo '<p>'.$lang['srv_user_cms_show'].':<a href="'.$base_url.'&a='.A_COOKIE.'&f=vabila_settings" title="'.$lang['srv_user_cms_show'].'"><span class="qs_data as_link">'.($lang['srv_user_cms_email']).'</span></a></p>';
+
+ echo '<div id="srv_active" class="switch_anketa anketa_on"></div>';
+
+ echo '</a>';
}
- echo '<p>'.$lang['srv_vote_limit'].':<a href="'.$base_url.'&a='.A_TRAJANJE.'&f=vabila_settings" title="'.$lang['srv_vote_limit'].'"><span class="qs_data as_link">'.($row['vote_limit'] == 0 ? $lang['no'] : $lang['yes']).'</span></a></p>';
-
- echo '<p>'.$lang['srv_vote_count'].':<a href="'.$base_url.'&a='.A_TRAJANJE.'&f=vabila_settings" title="'.$lang['srv_vote_count'].'"><span class="qs_data as_link">'.($row['vote_limit'] == 0 ? '/' : $row['vote_count']).'</span></a></p>';
- # Obveščanje
- // preberemo nastavitve alertov
- $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '".$this->anketa."'");
- if (mysqli_num_rows($sqlAlert) > 0) {
- $rowAlert = mysqli_fetch_assoc($sqlAlert);
- } else {
- SurveyAlert::getInstance()->Init($anketa, $global_user_id);
- $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire();
- }
-
- $alert_finish = array();
- $alert_expire = array();
- $alert_delete = array();
- $alert_active = array();
- if ($rowAlert['finish_respondent'] == 1) {
- $alert_finish[] = $lang['srv_alert_respondent'];
- }
- if ($rowAlert['finish_respondent_cms'] == 1) {
- $alert_finish[] = $lang['srv_alert_respondent_cms'];
- }
- if ($rowAlert['finish_author'] == 1) {
- $alert_finish[] = $lang['srv_info_author'];
- }
- if ($rowAlert['finish_other'] == 1) {
- $alert_finish[] = $lang['email_prejemniki'];
- }
- if ($rowAlert['expire_author'] == 1) {
- $alert_expire[] = $lang['srv_info_author'];
- }
- if ($rowAlert['expire_other'] == 1) {
- $alert_expire[] = $lang['email_prejemniki'];
- }
- if ($rowAlert['delete_author'] == 1) {
- $alert_delete[] = $lang['srv_info_author'];
- }
- if ($rowAlert['delete_other'] == 1) {
- $alert_delete[] = $lang['email_prejemniki'];
- }
- if ($rowAlert['active_author'] == 1) {
- $alert_active[] = $lang['srv_info_author'];
- }
- if ($rowAlert['active_other'] == 1) {
- $alert_active[] = $lang['email_prejemniki'];
- }
- echo '<p>'.$lang['srv_alert_completed_2'].':<a href="'.$base_url.'&a='.A_ALERT.'&f=vabila_settings" title="'.$lang['srv_alert_completed_2'].'"><span class="qs_data as_link">'.(count($alert_finish) ? implode(',',$alert_finish) : $lang['no']).'</span></a></p>';
- echo '<p>'.$lang['srv_alert_expired_2'].':<a href="'.$base_url.'&a='.A_ALERT.'&f=vabila_settings" title="'.$lang['srv_alert_expired_2'].'"><span class="qs_data as_link">'.(count($alert_expire) ? implode(',',$alert_expire) : $lang['no']).'</span></a></p>';
- echo '<p>'.$lang['srv_alert_active_2'].':<a href="'.$base_url.'&a='.A_ALERT.'&f=vabila_settings" title="'.$lang['srv_alert_active_2'].'"><span class="qs_data as_link">'.(count($alert_active) ? implode(',',$alert_active) : $lang['no']).'</span></a></p>';
- echo '<p>'.$lang['srv_alert_delete_2'].':<a href="'.$base_url.'&a='.A_ALERT.'&f=vabila_settings" title="'.$lang['srv_alert_delete_2'].'"><span class="qs_data as_link">'.(count($alert_delete) ? implode(',',$alert_delete) : $lang['no']).'</span></a></p>';
-
- echo '<p>';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_SETTINGS . '&f=vabila_settings" title="' . $lang['srv_nastavitve_ankete'] . '">';
- echo $lang['srv_nastavitve_ankete_all'].'</a>';
- echo '</p>';
- echo '</div>';
- }
- // Nimamo dostopa do zavihka urejanje - ni nobenih linkov
- else{
- # Trajanje
- $starts = explode('-',$row['starts']);
- $starts = $starts[2].'.'.$starts[1].'.'.$starts[0];
- $expire = explode('-',$row['expire']);
- $expire = $expire[2].'.'.$expire[1].'.'.$expire[0];
- echo '<p>'.$lang['srv_starts'].': '.$starts.'</p>';
- if ( $row['expire'] == PERMANENT_DATE ) {
- #trajna
- echo '<p>'.$lang['srv_trajna_anketa'].': '.($row['expire'] == PERMANENT_DATE ? $lang['yes'] : $lang['no']).'</p>';
- } else {
- echo '<p>'.$lang['srv_expire'].': '.$expire.'</p>';
- }
-
- echo '<p>'.$lang['srv_themes'].': '.$row['skin'].'</p>';
-
- # Jezik
- $lang_old = $lang;
- $lang_admin = (int)$row['lang_admin'];
- $lang_resp = (int)$row['lang_resp'];
- $lang_array = array();
- $lang_array[0] = $lang['srv_language_not_set'];
- // Preberemo razpoložljive jezikovne datoteke
- if ($dir = opendir('../../lang')) {
- while (($file = readdir($dir)) !== false) {
- if ($file != '.' AND $file != '..') {
- if (is_numeric(substr($file, 0, strpos($file, '.')))) {
- $i = substr($file, 0, strpos($file, '.'));
- $file = '../../lang/'.$i.'.php';
- if (file_exists($file)) {
- include($file);
- $lang_array[$i] = $lang['language'];
- }
- }
+ else {
+ $anketa_active = "anketa_active('" . $this->anketa . "','" . $row['active'] . "'); ";
+
+ //Preden anketo aktiviramo preverimo, če gre tudi za izgradnjo hierarhije in če anketa še ni bila aktivirana
+ if (SurveyInfo::getInstance()->checkSurveyModule('hierarhija')){
+ if ($hierarhija_type == 1) {
+ echo '<a href="index.php?anketa=' . $this->anketa . '&a=' . A_HIERARHIJA_SUPERADMIN . '&m=' . M_ADMIN_AKTIVACIJA . '" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
+ } else{
+ echo '<a href="#" class="srv_ico" title="' . $lang['srv_anketa_noactive'] . '">';
}
}
- }
-
- // nastavimo jezik nazaj
- /*$file = '../../lang/'.$lang_admin.'.php';
- if (file_exists($file)) {
- include($file);
- }*/
- $lang = $lang_old;
- $resp_change_lang = SurveySetting::getInstance()->getSurveyMiscSetting('resp_change_lang');
- echo '<p>'.$lang['srv_language_admin_0'].': '.$lang_array[$lang_admin].' / '.$lang_array[$lang_resp].'</p>';
-
- #obveščanje
-
- // jezikovni linki
- $p = new Prevajanje($this->anketa);
- $jeziki = $p->get_all_translation_langs();
- if (count($jeziki) > 0) {
- echo '<p>' . $lang['srv_trans_lang'] . ': ';
- $i = 0;
- foreach ($jeziki AS $key => $val) {
- if ($i++ != 0) echo ', ';
- echo '<a href="'.$link.'?language='.$key.'&f=vabila_settings" target="_blank">'.$val.'</a>';
+ else {
+ echo '<a href="#" class="srv_ico" onclick="' . $anketa_active . ' return false;" title="' . $lang['srv_anketa_noactive'] . '">';
}
- echo '</p>';
- }
- #piškotki
- echo '<p>'.$lang['srv_cookie'].': '.$lang['srv_cookie_'.$row['cookie']].'</p>';
- echo '<p>'.$lang['srv_cookie_return'].': '.($row['cookie_return'] == 0 ? $lang['srv_cookie_return_start'] : $lang['srv_cookie_return_middle']).'</p>';
-
- #more - več
- echo '<div id="srv_objava_info_more1" class="as_link" onclick="$(\'#srv_objava_info_more, #srv_objava_info_more1, #srv_objava_info_more2\').toggle();">'.$lang['srv_more'].'</div>';
- echo '<div id="srv_objava_info_more2" class="as_link displayNone" onclick="$(\'#srv_objava_info_more, #srv_objava_info_more1, #srv_objava_info_more2\').toggle();">'.$lang['srv_less'].'</div>';
- echo '<div id="srv_objava_info_more" class="displayNone">';
-
- if ($row['cookie'] > -1) {
- # če je piškotek dlje kot do konca nakete lahko izbere tudi druge možnosti
- echo '<p>'.$lang['srv_return_finished'].': '.($row['return_finished'] == 1 ? $lang['srv_return_finished_yes'] : $lang['srv_return_finished_no']).'</p>';
- } else {
- # ker je piškotek samo do konca ankete se ne more vrnit ali urejat
- echo '<p>'.$lang['srv_return_finished'].': '. $lang['srv_return_finished_no'] .'</p>';
- }
-
- echo '<p>'.$lang['srv_multilang'].': '.($row['multilang'] == 1 ? $lang['yes'] : $lang['no'] ).'</p>';
-
- echo '<p>'.$lang['srv_user'].': ';
- if ($row['user_from_cms'] == 1) {
- echo $lang['srv_respondent'];
- } elseif ($row['user_from_cms'] == 2) {
- echo $lang['srv_vnasalec'];
- } elseif ($row['user_from_cms'] == 0) {
- echo $lang['no1'];
- }
- echo '</p>';
-
- echo '<p>'.$lang['srv_block_ip'].': ';
- if ($row['block_ip'] == 0) {
- echo $lang['no1'];
- } elseif ($row['block_ip'] == 10) {
- echo '10 min';
- } elseif ($row['block_ip'] == 20) {
- echo '20 min';
- } elseif ($row['block_ip'] == 60) {
- echo '60 min';
- } elseif ($row['block_ip'] == 720) {
- echo '12 '.$lang['hour_hours2'];
- } elseif ($row['block_ip'] == 1440) {
- echo '24 '.$lang['hour_hours2'];
- }
- echo '</p>';
-
-
- # user from cms
- if ($row['user_from_cms']>0) {
- echo '<p>'.$lang['srv_user_cms_show'].': '.($lang['srv_user_cms_email']).'</p>';
- }
- echo '<p>'.$lang['srv_vote_limit'].': '.($row['vote_limit'] == 0 ? $lang['no'] : $lang['yes']).'</p>';
-
- echo '<p>'.$lang['srv_vote_count'].': '.($row['vote_limit'] == 0 ? '/' : $row['vote_count']).'</p>';
- # Obveščanje
- // preberemo nastavitve alertov
- $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '".$this->anketa."'");
- if (mysqli_num_rows($sqlAlert) > 0) {
- $rowAlert = mysqli_fetch_assoc($sqlAlert);
- } else {
- SurveyAlert::getInstance()->Init($anketa, $global_user_id);
- $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire();
- }
-
- $alert_finish = array();
- $alert_expire = array();
- $alert_delete = array();
- $alert_active = array();
- if ($rowAlert['finish_respondent'] == 1) {
- $alert_finish[] = $lang['srv_alert_respondent'];
- }
- if ($rowAlert['finish_respondent_cms'] == 1) {
- $alert_finish[] = $lang['srv_alert_respondent_cms'];
- }
- if ($rowAlert['finish_author'] == 1) {
- $alert_finish[] = $lang['srv_info_author'];
- }
- if ($rowAlert['finish_other'] == 1) {
- $alert_finish[] = $lang['email_prejemniki'];
- }
- if ($rowAlert['expire_author'] == 1) {
- $alert_expire[] = $lang['srv_info_author'];
- }
- if ($rowAlert['expire_other'] == 1) {
- $alert_expire[] = $lang['email_prejemniki'];
- }
- if ($rowAlert['delete_author'] == 1) {
- $alert_delete[] = $lang['srv_info_author'];
- }
- if ($rowAlert['delete_other'] == 1) {
- $alert_delete[] = $lang['email_prejemniki'];
- }
- if ($rowAlert['active_author'] == 1) {
- $alert_active[] = $lang['srv_info_author'];
- }
- if ($rowAlert['active_other'] == 1) {
- $alert_active[] = $lang['email_prejemniki'];
+
+ echo '<div id="srv_inactive" class="switch_anketa anketa_off"></div>';
+
+ echo '</a>';
}
- echo '<p>'.$lang['srv_alert_completed_2'].': '.(count($alert_finish) ? implode(',',$alert_finish) : $lang['no']).'</p>';
- echo '<p>'.$lang['srv_alert_expired_2'].': '.(count($alert_expire) ? implode(',',$alert_expire) : $lang['no']).'</p>';
- echo '<p>'.$lang['srv_alert_active_2'].': '.(count($alert_active) ? implode(',',$alert_active) : $lang['no']).'</p>';
- echo '<p>'.$lang['srv_alert_delete_2'].': '.(count($alert_delete) ? implode(',',$alert_delete) : $lang['no']).'</p>';
-
+
+ echo '</div>';
+
+ //echo '<p class="top16">'.$lang['srv_publication_survey_noactive_note2'].'</p>';
+
echo '</div>';
}
+ }
+
+ # Opozorilo o napakah
+ private function survey_errors(){
+ global $lang;
+
+ $sd = new SurveyDiagnostics($this->anketa);
+ $sd->doDiagnostics();
+ $diagnostic = $sd->getDiagnostic();
+ if (is_array($diagnostic) && count($diagnostic) > 0) {
+
+ echo '<div class="top_note" id="publication_warnings">';
+ echo ' <div class="title small">';
+ echo ' <span class="faicon warning"></span> '.$lang['srv_warning'];
+ echo '<div class="note_hide"><a href="#" onClick="top_note_hide(\'publication_warnings\'); return false;"">✕</a></div>';
+ echo ' </div>';
+ echo $lang['srv_publication_survey_warnings'].'\'<a href="index.php?anketa=' . $this->anketa . '&a='.A_TESTIRANJE.'">'.$lang['srv_testiranje'].'</a>\'.';
+ echo '</div>';
+ }
+ }
+
+ function anketa_vabila_drugo() {
+ global $lang, $site_url, $global_user_id;
- echo '</fieldset>';
- echo '</td>';
+ $d = new Dostop();
+
+ # Opozorilo o napakah
+ $this->survey_errors();
+
+ # Opozorilo - anketa ni aktivna
+ $this->activation_error();
+
+ // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
+ $userAccess = UserAccess::getInstance($global_user_id);
- echo '<td>';
- echo '</td>';
+ // Več načinov deljenja ankete
+ echo '<div class="title">'.$lang['srv_publication_survey_more'].'</div>';
+
+ echo '<div class="more squares">';
+
+ //QR koda
+ echo '<div class="more_block square" onclick="publishPopupOpen(\'QR\');">';
+ echo '<div class="more_title_icon"><span class="faicon fa-qrcode"></span></div>';
+ echo '<div class="more_title">';
+ echo $lang['srv_anketa_href_friends'];
+ echo '</div>';
+ //echo $lang['srv_anketa_href_friends_text'];
+ echo '</div>';
+
+ //jazvem
+ echo '<div class="more_block square" onclick="publishPopupOpen(\'jazvem\');">';
+ echo '<div class="more_title_icon jazvem"></div>';
+ echo '<div class="more_title">';
+ echo $lang['srv_anketa_href_jazvem'];
+ echo '</div>';
+ //echo $lang['srv_anketa_href_friends_text'];
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="divider_line"></div>';
+
+ // Več načinov deljenja ankete
+ echo '<div class="title">'.$lang['srv_publication_survey_integration'].'</div>';
+
+ echo '<div class="more squares">';
+
+ //HTML koda
+ echo '<div class="more_block square" onclick="publishPopupOpen(\'html\');">';
+ echo '<div class="more_title_icon"><span class="fa-brands html5"></span></div>';
+ echo '<div class="more_title">';
+ echo $lang['srv_anketa_href'];
+ echo '</div>';
+ //echo $lang['srv_anketa_href_text'];
+ echo '</div>';
- echo '</tr>';
+ //HTML koda + števec
+ echo '<div class="more_block square" onclick="publishPopupOpen(\'htmlcount\');">';
+ echo '<div class="more_title_icon"><span class="fa-brands html5"></span><span class="circle-icon icon-123"></span></div>';
+ echo '<div class="more_title">';
+ echo $lang['srv_anketa_href_count'];
+ echo '</div>';
+ //echo $lang['srv_anketa_href_count_text'];
+ echo '</div>';
+
+ // iFrame - brez js
+ echo '<div class="more_block square" onclick="publishPopupOpen(\'iframenojs\');">';
+ echo '<div class="more_title_icon"><span class="faicon fa-window-maximize empty"></span></div>';
+ echo '<div class="more_title">';
+ echo $lang['srv_anketa_href_inojs'];
+ echo '</div>';
+ //echo $lang['srv_anketa_href_inojs_text'];
+ echo '</div>';
+
+ // iFrame - js
+ echo '<div class="more_block square" onclick="publishPopupOpen(\'iframejs\');">';
+ echo '<div class="more_title_icon"><span class="faicon fa-window-maximize empty"></span><span class="circle-icon icon-JS"></span></div>';
+ echo '<div class="more_title">';
+ echo $lang['srv_anketa_href_ijs'];
+ echo '</div>';
+ //echo $lang['srv_anketa_href_ijs_text'];
+ echo '</div>';
- echo '</table>';
+
+
+ echo '</div>';
+ echo '</div>';
+
}
function niceUrlSettings() {
@@ -2346,6 +2772,12 @@ class SurveyAdminSettings { $p = new Prevajanje($this->anketa);
$p->dostop();
$lang_array = $p->get_all_translation_langs();
+
+ $row = SurveyInfo::getInstance()->getSurveyRow();
+
+ $p->include_lang($p->lang_resp);
+ $base_lang_resp = $lang['language'];
+ $p->include_base_lang();
$link = SurveyInfo::getSurveyLink();
$preview_disableif = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disableif');
@@ -2354,195 +2786,138 @@ class SurveyAdminSettings { $preview_displayvariables = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayvariables');
$preview_hidecomment = SurveySetting::getInstance()->getSurveyMiscSetting('preview_hidecomment');
$preview_options = ''.($preview_disableif==1?'&disableif=1':'').($preview_disablealert==1?'&disablealert=1':'').($preview_displayifs==1?'&displayifs=1':'').($preview_displayvariables==1?'&displayvariables=1':'').($preview_hidecomment==1?'&hidecomment=1':'').'';
-
-
- echo '<fieldset><legend>'.$lang['srv_publication_base_title'].'</legend>';
-
- // Predogled url
- echo '<div class="publish_url_holder">';
-
- echo '<p style="margin: 2px 0;"><a href="' . $link . '&preview=on'.$preview_options.'" target="_blank" class="srv_icox spaceRight"><span class="faicon preview"></span> ' . $lang['srv_poglejanketo2'] . '</b></a>';
- echo '<span class="spaceLeft italic">('.$lang['srv_preview_text'].')</span></p>';
- echo '<p style="margin: 2px 0;">' . $lang['url'] . ': ' . $link . '&preview=on'.$preview_options.'</p>';
-
- echo '</div>';
-
- // Test url
- if($this->survey_type > 1){
- echo '<div class="publish_url_holder">';
-
- echo '<p style="margin: 2px 0;"><a href="' . $link . '&preview=on&testdata=on'.$preview_options.'" title="" target="_blank" class="srv_ico spaceRight"><span class="faicon test large"></span> ' . $lang['srv_survey_testdata2'] . '</b></a>';
- echo '<span class="spaceLeft italic">('.$lang['srv_testdata_text'].')</span></p>';
- echo '<p style="margin: 2px 0;">'.$lang['url'] . ': ' . $link . '&preview=on&testdata=on'.$preview_options;
- echo ' (<a href="#" id="popup-open" onclick="javascript:testiranje_preview_settings(); return false;">'.$lang['srv_testrianje_how'].'</a>)</p>';
-
- echo '</div>';
- }
-
- // Navaden url
+
echo '<div class="publish_url_holder">';
- $row = SurveyInfo::getInstance()->getSurveyRow();
+ //Zlistamo vse lepe url-je
+ $title = 0;
+ $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id desc");
+ while ($rowl = mysqli_fetch_assoc($sqll)) {
- echo '<p style="margin: 2px 0;"><a href="' . $link . '" target="_blank" class="srv_icox spaceRight"><span class="faicon edit_square large"></span> ' . $lang['srv_survey_real'] . '</b></a>';
- echo '<span class="spaceLeft italic">('.$lang['srv_survey_real_savedata'].')</span></p>';
+ if ($title == 0) {
+ echo '<div class="divider_line"></div>';
- echo '<span class="'.($row['active']==1?'url_box_active':'').'" style="display:block;">' . $lang['url'] . ': ';
-
- $p->include_lang($p->lang_resp);
- $base_lang_resp = $lang['language'];
- $p->include_base_lang();
-
- $link1 = $site_url.'a/'.Common::encryptAnketaID($this->anketa);
- echo '<b><a href="'.$link1.'" target="_blank">'.$link1.'</a>'.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').'</b>';
-
- // Zlistamo vse lepe url-je
- $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id ASC");
- while ($rowl = mysqli_fetch_assoc($sqll)) {
+ echo '<div class="title">'.$lang['srv_publication_survey_niceurl'].'</div>';
+ $title = 1;
+ }
$link_nice = $site_url . $rowl['link'];
- echo '<br/><span style="margin-left:35px; margin-top:5px; display:inline-block;" ><b>';
- echo '<a href="'.$link_nice.'" target="_blank">'.$link_nice.'</a>'.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').'</b></span>';
+ echo ' <div class="niceurl">';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span>';
+ echo ' <a href="'.$link_nice.'">'.$site_url.'<span class="semi-bold">'.$rowl['link'].'</span></a>';
+ echo ' </div>';
+ echo ' <a class="input_box as_button onlyicon" href="ajax.php?a=nice_url_remove&anketa='.$this->anketa.'&nice_url='.$rowl['id'].'" title="'.$lang['srv_copy_remove'].'"><span class="faicon trash empty blue"></span></a>';
- //echo '<b><a href="'.$site_url.$rowl['link'].'" target="_blank">'.$site_url.$rowl['link'].'</a></b>';
- //echo '<a href="ajax.php?a=nice_url_remove&anketa='.$this->anketa.'&nice_url='.$rowl['id'].'" title="'.$lang['srv_copy_remove'].'"><img src="img_0/if_remove.png" /></a></b></span>';
+ echo ' <div class="input_box as_button" onclick="CopyToClipboard(\''.$link_nice.'\'); actionNotePopup(\'link_copied\', \'success\'); return false;" title="'.$lang['srv_diagnostika_testiranje_copy_url'].'">';
+ echo ' <span class="faicon copy blue no_margin"></span>'.$lang['srv_diagnostika_testiranje_copy_url'];
+ echo ' </div>';
+
+ echo ' </div>';
}
+
- // Imamo vec linkov za skupine
+ // Povezave za skupine in jezike
+ // Navaden url
+
$ss = new SurveySkupine($this->anketa);
- $spr_id = $ss->hasSkupine();
+ $spr_id = $ss->hasSkupine();
+
+ $vrednosti = $ss->getVrednosti($spr_id);
+
+ if (count($lang_array) > 0 || $spr_id > 0){
+ echo '<div class="divider_line"></div>';
+
+ echo '<div class="title">'.$lang['srv_publication_survey_grouplang'].'</div>';
+
+ if (count($lang_array) > 0){
+ echo '<div class="lang_wrapper">';
+ echo ' <div class="lang_title"><span class="semi-bold">'.$base_lang_resp.'</span>'.$lang['srv_nice_url_default_lang'].'</div>';
+ echo ' <hr class="lang_line">';
+ echo '</div>';
+
+ echo ' <div class="niceurl">';
+ echo ' <div class="group_name" title="'.$lang['srv_nice_url_no_group'].'">'.$lang['srv_nice_url_no_group'].'</div>';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span>';
+ echo ' <a href="'.$link.'">'.$link.'</a>';
+ echo ' </div>';
+
+ echo ' <div class="input_box as_button" onclick="CopyToClipboard(\''.$link.'\'); actionNotePopup(\'link_copied\', \'success\'); return false;" title="'.$lang['srv_diagnostika_testiranje_copy_url'].'">';
+ echo ' <span class="faicon copy blue no_margin"></span>'.$lang['srv_diagnostika_testiranje_copy_url'];
+ echo ' </div>';
+ echo ' </div>';
+
+ }
+ }
+
+ // Imamo vec linkov za skupine
if($spr_id > 0){
- $vrednosti = $ss->getVrednosti($spr_id);
+
foreach($vrednosti as $vrednost){
+
$link_skupine = isset($vrednost['nice_url']) ? $vrednost['nice_url'] : $vrednost['url'];
- echo '<br/><span style="margin-left:35px; margin-top:5px; display:inline-block;" ><b>';
- echo '<a href="'.$link_skupine.'" target="_blank">'.$link_skupine.'</a>'.(count($lang_array) > 0 ? ' - '.$base_lang_resp : '').' - '.$vrednost['naslov'].'</b></span>';
+
+ echo ' <div class="niceurl">';
+ echo ' <div class="group_name" title="'.$vrednost['naslov'].'">'.$vrednost['naslov'].'</div>';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span>';
+ echo ' <a href="'.$link_skupine.'">'.$link_skupine.'</a>';
+ echo ' </div>';
+
+ echo ' <div class="input_box as_button" onclick="CopyToClipboard(\''.$link_skupine.'\'); actionNotePopup(\'link_copied\', \'success\'); return false;" title="'.$lang['srv_diagnostika_testiranje_copy_url'].'">';
+ echo ' <span class="faicon copy blue no_margin"></span>'.$lang['srv_diagnostika_testiranje_copy_url'];
+ echo ' </div>';
+ echo ' </div>';
}
}
// Imamo vec linkov za jezike
if (count($lang_array) > 0) {
+
foreach ($lang_array AS $lang_id => $lang_name) {
- echo '<br/><span style="margin-left:35px; margin-top:5px; display:inline-block;" ><b>';
- echo '<a href="'.$link.'?language='.$lang_id.'" target="_blank">'.$link.'?language='.$lang_id.'</a> - '.$lang_name.'</b></span>';
+
+ echo '<div class="lang_wrapper">';
+ echo ' <div class="lang_title"><span class="semi-bold">'.$lang_name.'</span></div>';
+ echo ' <hr class="lang_line">';
+ echo '</div>';
+
+ echo ' <div class="niceurl">';
+ echo ' <div class="group_name" title="'.$lang['srv_nice_url_no_group'].'">'.$lang['srv_nice_url_no_group'].'</div>';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span>';
+ echo ' <a href="'.$link.'?language='.$lang_id.'">'.$link.'?language='.$lang_id.'</a>';
+ echo ' </div>';
+
+ echo ' <div class="input_box as_button" onclick="CopyToClipboard(\''.$link.'?language='.$lang_id.'\'); actionNotePopup(\'link_copied\', \'success\'); return false;" title="'.$lang['srv_diagnostika_testiranje_copy_url'].'">';
+ echo ' <span class="faicon copy blue no_margin"></span>'.$lang['srv_diagnostika_testiranje_copy_url'];
+ echo ' </div>';
+ echo ' </div>';
if($spr_id > 0){
foreach($vrednosti as $vrednost){
+
$link_skupine = isset($vrednost['nice_url']) ? $vrednost['nice_url'] : $vrednost['url'];
- echo '<br/><span style="margin-left:35px; margin-top:5px; display:inline-block;" ><b>';
- echo '<a href="'.$link_skupine.'&language='.$lang_id.'" target="_blank">'.$link_skupine.'&language='.$lang_id.'</a> - '.$lang_name.' - '.$vrednost['naslov'].'</b></span>';
+
+ echo ' <div class="niceurl">';
+ echo ' <div class="group_name" title="'.$vrednost['naslov'].'">'.$vrednost['naslov'].'</div>';
+ echo ' <div class="input_box">';
+ echo ' <span class="faicon link-chain link-right"></span>';
+ echo ' <a href="'.$link_skupine.'&language='.$lang_id.'">'.$link_skupine.'&language='.$lang_id.'</a>';
+ echo ' </div>';
+
+ echo ' <div class="input_box as_button" onclick="CopyToClipboard(\''.$link_skupine.'&language='.$lang_id.'\'); actionNotePopup(\'link_copied\', \'success\'); return false;" title="'.$lang['srv_diagnostika_testiranje_copy_url'].'">';
+ echo ' <span class="faicon copy blue no_margin"></span>'.$lang['srv_diagnostika_testiranje_copy_url'];
+ echo ' </div>';
+ echo ' </div>';
}
}
}
}
-
- echo '</span>';
-
- echo '</fieldset>';
-
-
- echo '<br />';
-
-
- // Okno za dodajanje lepega url-ja
- echo '<fieldset><legend>'.$lang['srv_nice_url'].'</legend>';
-
- // Zlistamo vse lepe url-je
- $sqll = sisplet_query("SELECT id, link FROM srv_nice_links WHERE ank_id = '$this->anketa' ORDER BY id ASC");
- while ($rowl = mysqli_fetch_assoc($sqll)) {
-
- echo '<span style="margin-top: 10px; display:inline-block;">';
- echo '<b><a href="'.$site_url.$rowl['link'].'" target="_blank">'.$site_url.$rowl['link'].'</a></b>';
-
- // Remove nice url
- echo '<a href="ajax.php?a=nice_url_remove&anketa='.$this->anketa.'&nice_url='.$rowl['id'].'" title="'.$lang['srv_copy_remove'].'"><span class="faicon delete_circle icon-orange_link spaceLeft"></span></a>';
-
- echo '<br />';
- }
-
- echo '<br />';
-
- // Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
- $userAccess = UserAccess::getInstance($global_user_id);
- if(!$userAccess->checkUserAccess($what='nice_url')){
- $userAccess->displayNoAccess($what='nice_url');
- }
- else{
- // Gumb za dodajanje lepega linka
- //echo '<div class="" style="margin-top:5px;"><a href="#" onclick="$(\'#spn_nice_url\').toggle(); return false;">' . $lang['srv_nice_url'] . '</a> '.Help::display('srv_nice_url');
- echo '<div class="buttonwrapper"><a class="ovalbutton floatLeft" title="' . $lang['srv_nice_url_add'] . '" href="#" onclick="$(\'#spn_nice_url\').fadeToggle(); return false;">' . $lang['srv_nice_url_add'] . '</a></div> '.Help::display('srv_nice_url');
-
-
- echo '<br /><span id="spn_nice_url" '.(isset($_GET['error']) ? '' : 'style="display:none;"').'><br /><br />';
-
- echo $site_url.' <input type="text" name="nice_url" id="nice_url" value="" /> <input type="submit" value="'.$lang['add'].'" onclick="$.redirect(\'ajax.php?a=nice_url\', {anketa: '.$this->anketa.', nice_url: $(\'#nice_url\').val()}); return false;" />';
-
- echo '</span>';
- echo '</div>';
-
- if (isset($_GET['error'])) {
-
- // Prekratek lep url
- if(strlen($_GET['error']) <= 2)
- echo '<br /><br /><span class="red"><b>'.$_GET['error'].'</b> '.$lang['srv_nice_url_short'].'</span>';
- // Predolg lep url
- elseif(strlen($_GET['error']) > 20)
- echo '<br /><br /><span class="red"><b>'.$_GET['error'].'</b> '.$lang['srv_nice_url_long'].'</span>';
- // Ze obstaja
- else
- echo '<br /><br /><span class="red"><b>'.$_GET['error'].'</b> '.$lang['srv_nice_url_taken'].'</span>';
- }
-
- echo '</div>';
- }
-
- echo '<br /><br />';
-
- echo '</fieldset>';
- }
-
- function anketa_vabila_url() {
- echo '<table width="100%">';
- echo '<tr style="">';
-
- echo '<td style="vertical-align:top;">';
- $this->displayInvSurveyEmbed();
-
- // Embed v popup je zaenkrat disablan zaradi cross domain omejitev browserjev
- //$this->displayInvSurveyPopup();
- echo '</td>';
-
- echo '<td style="width:45%; vertical-align:top;">';
- $this->displayInvSurveyLink();
- echo '</td>';
-
- echo '</tr>';
- echo '</table>';
}
- function displayInvSurveyEmbed() {
- global $lang;
-
- echo '<fieldset>';
- echo '<legend>'.$lang['srv_embed_title'].':</legend>';
-
- echo '<p><span onclick="$(\'#embed_js\').toggle(); $(\'#embed_js textarea\').click();" class="as_link">'.$lang['srv_embed_js'].Help :: display('srv_embed_js').'</span></p>';
- echo '<p id="embed_js" '.($_GET['js']!='open'?'style="display:none"':'').'><textarea id="ta" style="width: 99%; height:80px" onclick="this.select();" readonly>'.$this->getEmbed().'</textarea></p>';
-
- echo '<p><span onclick="$(\'#embed_js_fixed\').toggle(); $(\'#embed_js_fixed textarea\').click();" class="as_link">'.$lang['srv_embed_fixed'].Help :: display('srv_embed_fixed').'</span></p>';
- echo '<p id="embed_js_fixed" '.($_GET['js']!='open'?'style="display:none"':'').'><textarea style="width: 99%; height:80px" onclick="this.select();" readonly>'.$this->getEmbed(false).'</textarea></p>';
-
-
- echo '</fieldset>';
-
- if ($_GET['js'] == 'open') {
- ?><script>
- $('#ta').click();
- </script><?
- }
- }
function displayInvSurveyPopup() {
global $lang;
@@ -2555,71 +2930,6 @@ class SurveyAdminSettings { echo '</fieldset>';
}
- function displayInvSurveyLink() {
- global $lang, $site_url, $admin_type;
-
- $row = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<fieldset>';
- echo '<legend>' . $lang['srv_user_base_url'] . '</legend>';
-
- echo '<p><div class="as_link"><label onclick="$(\'#anketa_href\').toggle(); $(\'#anketa_href textarea\').click(); $(\'#space1\').toggle();" class="pointer">' . $lang['srv_anketa_href'] . ' </label></div>';
- echo '<div id="anketa_href" class="displayNone"><br>'.$lang['srv_anketa_href_text'].' <textarea style="width:99%; height:24px;" onclick="this.select();" readonly id="href">';
- echo '<a href="'.SurveyInfo::getSurveyLink().'">'.$lang['srv_complete_survey'].'</a>';
- echo '</textarea></div></p>';
- echo '<p><div class="as_link" ><label onclick="$(\'#anketa_href_count\').toggle(); $(\'#space2\').toggle(); $(\'#anketa_href_count textarea\').click();" class="pointer">' . $lang['srv_anketa_href_count'] . ' </label></div>';
- echo '<div id="anketa_href_count" class="displayNone"><br>'.$lang['srv_anketa_href_count_text'].' <textarea style="width:99%; height:48px" onclick="this.select();" readonly>';
- echo '<a href="'.SurveyInfo::getSurveyLink().'">'.$lang['srv_complete_survey'].'</a><img src="'.$site_url.'main/survey/view_count.php?a='.$this->anketa.'" style="display:none"/>';
- echo '</textarea></div></p>';
-
- echo '</fieldset><fieldset>';
-
- // Prikaz QR kode
- $img = 'classes/phpqrcode/imgs/code'.$this->anketa.'.png';
- QRcode::png(SurveyInfo::getSurveyLink(), $img, 'L', 4, 2);
-
- echo '<div class="as_link"><label onclick="$(\'#anketa_qr_code\').toggle();" class="pointer" title="'.$lang['srv_qr_code'].'">' . $lang['srv_qr_code'] . ' </label></div>';
-# echo '<p>'.$lang['srv_qr_code'].':<br>';
- echo '<div id="anketa_qr_code" class="displayNone">';
- echo '<img src="'.$site_url.'admin/survey/'.$img.'">';
- echo '</div>';
-
- // Prikaz ikon za deljenje (FB, twitter...)
- echo '<p class="clr" style="margin-top:15px;"><span class="labelSpanWide"><label>'.$lang['srv_share'].': </label></span> ';
-
- ?>
- <div class="addthis_toolbox addthis_default_style">
-
- <a class="addthis_button_facebook" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- <a class="addthis_button_gmail" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
-
- <!-- <a class="addthis_button_preferred_1" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- <a class="addthis_button_preferred_2" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>-->
-
- <!--
- <a class="addthis_button_preferred_3" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- <a class="addthis_button_preferred_4" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- <a class="addthis_button_preferred_5" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- <a class="addthis_button_preferred_6" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- -->
-
- <span class="addthis_separator">|</span>
- <a href="https://www.addthis.com/bookmark.php?v=250" class="addthis_button_compact" addthis:url="<?=SurveyInfo::getSurveyLink()?>" addthis:title="<?=$row['akronim']?>"></a>
- </div>
- <script type="text/javascript" src="https://s7.addthis.com/js/250/addthis_widget.js"></script>
-
- <script type="text/javascript">
- var addthis_config = {
- data_track_clickback: false,
- services_exclude: 'print'
- }
- </script>
-
- <?php
-
- echo '</p>';
- echo '</fieldset>';
- }
/**
* nastavitve za obveščanje na email
*
@@ -2664,10 +2974,9 @@ class SurveyAdminSettings { echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;"><span>';
// echo '<img src="icons/icons/disk.png" alt="" vartical-align="middle" />';
echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
- if ($_GET['s'] == '1') {
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
#echo '</div>';
@@ -2686,7 +2995,6 @@ class SurveyAdminSettings { SurveyInfo::getInstance()->SurveyInit($this->anketa);
$row = SurveyInfo::getInstance()->getSurveyRow();
- //return '<iframe id="1ka" src="'.$site_url.'main/survey/index.php?anketa='.$this->anketa.'" scrolling="auto" frameborder="0" width="100%"></iframe><script type="text/javascript">function r(){var a=window.location.hash.replace("#","");if(a.length==0)return;document.getElementById("1ka").style.height=a+"px";window.location.hash=""};window.setInterval(\\\'r()\\\',100);</script>';
$iframe = '<iframe id="1ka" src="'.$link.'?e=1" height="500px" width="100%" scrolling="auto" frameborder="0"></iframe>';
$javascript = '<script type="text/javascript">function r(){var a=window.location.hash.replace("#","");if(a.length==0)return;document.getElementById("1ka").style.height=a+"px";window.location.hash=""};window.setInterval("r()",100);'
.'</script>';
@@ -2722,9 +3030,11 @@ class SurveyAdminSettings { global $lang;
global $site_url;
global $admin_type;
- global $app_settings;
$anketa = $this->anketa;
+
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
/* moznosti:
* 'complete' -> obvsetilo o izpolnjeni anketi (respondent, respondent iz cms, avtor + dostop, dodatn-emaili)
@@ -2772,7 +3082,7 @@ class SurveyAdminSettings { if ($tab == 'complete') {
- //echo '<h4>' . $lang['srv_alert_title'] . '</h4>'."\n";
+ //Obveščanje o izpolnjeni anketi
echo ' <form name="alertanketa_' . $anketa . '" action="ajax.php?a=editanketaalert&m='.$tab.'" method="post" autocomplete="off">' . "\n";
echo ' <input type="hidden" name="anketa" value="' . $anketa . '" />' . "\n";
echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n";
@@ -2780,60 +3090,75 @@ class SurveyAdminSettings { echo ' <input type="hidden" name="submited" value="1" />' . "\n";
- echo ' <fieldset>'. "\n";
- echo ' <legend>' . $lang['srv_alert_prejemnik'] . '</legend>'. "\n";
-
- // respondent - ne prikazemo ce gre za glasovanje oz. volitve
+ echo ' <fieldset>';
+ echo ' <legend>' . $lang['srv_alert_completed_2'] . '</legend>';
+
+ echo '<div class="setting_holder alert_prejemniki">';
+ echo '<span class="setting_title">'.$lang['srv_alert_completed_prejemniki'].'</span>';
+
+ // respondent - ne prikazemo ce gre za glasovanje oz. volitve
if($rowS['survey_type'] != 0 && !SurveyInfo::getInstance()->checkSurveyModule('voting')){
- echo '<p>';
- echo '<input type="checkbox" name="alert_finish_respondent" id="alert_finish_respondent" value="1" onChange="change_alert_respondent(\'finish_respondent\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_finish_respondent">';
+ echo '<div class="setting_item" id="label_alert_finish_respondent">';
+
+ //echo '<input type="checkbox" name="alert_finish_respondent" id="alert_finish_respondent" value="1" onChange="change_alert_respondent(\'finish_respondent\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent'] == 1 ? ' checked' : '') . '>';
$this->display_alert_label('finish_respondent',($rowAlert['finish_respondent'] == 1));
- echo '</span>'. "\n";
+ echo '</div>';
+
// Ce imamo vec prevodov omogocimo za vsak prevod svoj email
$this->display_alert_label('finish_respondent_language',($rowAlert['finish_respondent'] == 1));
- echo '</p>';
+
}
- // respondent iz cms ne prikazemo ce gre za volitve
+ // respondent iz cms ne prikazemo ce gre za volitve
if(!SurveyInfo::getInstance()->checkSurveyModule('voting')){
- echo '<p><input type="checkbox" name="alert_finish_respondent_cms" id="alert_finish_respondent_cms" value="1" onChange="change_alert_respondent(\'finish_respondent_cms\', $(this)); chnage_alert_instruction($(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_finish_respondent_cms">';
+ echo '<div class="setting_item" id="label_alert_finish_respondent_cms">';
+
+ //echo '<input type="checkbox" name="alert_finish_respondent_cms" id="alert_finish_respondent_cms" value="1" onChange="change_alert_respondent(\'finish_respondent_cms\', $(this)); change_alert_instruction($(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;" ' . ($rowAlert['finish_respondent_cms'] == 1 ? ' checked' : '') . '>';
$this->display_alert_label('finish_respondent_cms',($rowAlert['finish_respondent_cms'] == 1));
- echo '</span></p>'. "\n";
+
+ echo '</div>';
}
- // avtor ankete oz osebe z dostopom
- //echo '<p><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this)); $(\'form[name=alertanketa_' . $anketa . ']\').submit(); return false;"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
- echo '<p><input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this));"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_finish_author">';
+ //Avtor ankete oz. souredniki
+ echo '<div class="setting_item" id="label_alert_finish_author">';
+ echo '<input type="checkbox" name="alert_finish_author" id="alert_finish_author" value="1" onChange="change_alert_respondent(\'finish_author\', $(this));return false;"' . ($rowAlert['finish_author'] == 1 ? ' checked' : '') . '>';
$this->display_alert_label('finish_author',($rowAlert['finish_author'] == 1));
- echo '</span></p>';
+ echo '</div>';
- // posebej navedeni maili
- echo '<p><input type="checkbox" name="alert_finish_other" id="alert_finish_other" value="1"' . (($rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'finish_other\'); if ( ! $(this).attr(\'checked\') ) { $(\'form[name=alertanketa_' . $anketa . ']\').submit(); }"><label for="alert_finish_other">' . $lang['email_prejemniki'] . $lang['email_one_per_line'] . '</label>';
- echo ' <a href="#" onclick="alert_custom(\'other\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ //Posebej navedeni maili
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_finish_other" id="alert_finish_other" value="1"' . (($rowAlert['finish_other'] == 1 || ($rowAlert['finish_other_emails'] && $rowAlert['finish_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'finish_other\'); if ( ! $(this).attr(\'checked\') ) { $(\'form[name=alertanketa_' . $anketa . ']\').submit(); }"><label for="alert_finish_other">' . $lang['email_prejemniki'] .'</label>';
+ echo ' <a href="#" onclick="alert_custom(\'other\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
echo ' <a href="#" onclick="alert_edit_if(\'4\'); return false;"><span class="faicon if_add" '.($rowAlert['finish_other_if']==0?'style=""':'').'></span></a> ';
- if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); }
- echo '</p>';
-
- echo '<p id="alert_holder_finish_other_emails" '.($rowAlert['finish_other'] == 0 ? 'class="displayNone"' : '' ).'>';
- echo '<label for="alert_finish_other_emails">' . $lang['email'] . ':</label>' .
- '<textarea name="alert_finish_other_emails" id="alert_finish_other_emails" style="height:100px" onblur="$(\'form[name=alertanketa_' . $anketa . ']\').submit();">' . $rowAlert['finish_other_emails'] . '</textarea>' .
- '</p>';
-
- echo '</fieldset>';
-
-
- echo '<br />';
+ if ($rowAlert['finish_other_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($rowAlert['finish_other_if']); }
+ echo '</div>';
+
+ echo '<div class="setting_item">';
- echo '<fieldset>';
- echo '<legend>' . $lang['srv_alert_oblika'] . '</legend>';
- echo '<div style="float:left; width:auto;">';
- echo '<p><label for="alert_finish_subject">' . $lang['subject'] . ': <input type="text" id="alert_finish_subject" name="alert_finish_subject" value="' . ($rowAlert['finish_subject'] ? $rowAlert['finish_subject'] : $lang['srv_alert_finish_subject']) . '" size="90"/></label></p>';
- echo '<p><label for="reply_to">'.$lang['srv_replay_to'].': <input type="text" id="reply_to" name="reply_to" value="' . ($rowAlert['reply_to'] ? $rowAlert['reply_to'] : $MailReply) . '" size="40"/></label></p>';
+ echo '<div class="setting_holder alert_other_emails '.($rowAlert['finish_other'] == 0 ? 'displayNone' : '' ).'" id="alert_holder_finish_other_emails">';
+ echo '<label for="alert_finish_other_emails">' . $lang['email_prejemniki_one_per_line'] . ':</label>';
+ echo '<textarea class="alert_other_emails" name="alert_finish_other_emails" id="alert_finish_other_emails">' . $rowAlert['finish_other_emails'] . '</textarea>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '<div id="obvescanje_sidebyside_holder">';
+ echo '<div id="obvescanje_sidebyside_left">';
+
+ echo '<p class="bold caps bottom16">'.$lang['message_content'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="alert_finish_subject">' . $lang['subject'] . ': </label>';
+ echo '<input type="text" class="large wauto" id="alert_finish_subject" name="alert_finish_subject" value="' . ($rowAlert['finish_subject'] ? $rowAlert['finish_subject'] : $lang['srv_alert_finish_subject']) . '"/>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="reply_to">' . $lang['srv_replay_to'] . Help::display('srv_obvescanje_odgovorZa').': </label>';
+ echo '<input type="text" class="large wauto" id="reply_to" name="reply_to" value="' . ($rowAlert['reply_to'] ? $rowAlert['reply_to'] : $MailReply) . '"/>';
+ echo '</div>';
+
if ($rowAlert['finish_text'] != '') {
$text = $rowAlert['finish_text'];
}
@@ -2845,95 +3170,134 @@ class SurveyAdminSettings { }
// prikaze editor za ne-spremenljivko (za karkoli druzga pac)
- echo ' <p><label for="alert_finish_text">' . $lang['text'] . ':</label>';
- echo ' <textarea name="alert_finish_text" id="alert_finish_text" rows="3" >' . $text . '</textarea>';
- echo ' </p>';
- echo '</div>';
- echo '<div style="float:left; width:auto; max-width:330px; margin-left:10px;">';
- echo '<div id="div_error">';
- echo $lang['srv_alert_instruction1'];
+ echo '<div class="setting_holder">';
+
+ echo '<label class="bottom4" for="alert_finish_text">' . $lang['message'] . ':</label>';
+ echo '<textarea name="alert_finish_text" id="alert_finish_text">' . $text . '</textarea>';
+
+ echo '</div>';
+ echo '</div>';
+
+ //Navodila na desni
+ echo '<div id="obvescanje_sidebyside_right">';
+ echo '<div class="message_instructions">';
+ echo '<p class="bold caps bottom16">'.$lang['srv_alert_instruction1'].'</p>';
+ echo '<p class="bold bottom16">'.$lang['srv_alert_instruction1a'].':</p>';
+
+ echo '<div class="izpolnjena_spremenljivke">';
+
// ta se skriva, potreben respondent iz CMS, da dobi NAME
echo '<span id="alert_respondent_cms_instruction" class="'.( $rowAlert['finish_respondent_cms'] == 1 ? '' : 'displayNone').'">'.$lang['srv_alert_instruction2'].'</span>';
- echo $lang['srv_alert_instruction_survey'].'<br/>';
- echo $lang['srv_alert_instruction_date'].'<br/>';
- echo $lang['srv_alert_instruction_site'].'<br/>';
- echo $lang['srv_alert_instruction_url'].'<br/>';
- echo $lang['srv_alert_instruction_pdf'].'<br/>';
- echo $lang['srv_alert_instruction_rtf'].'<br/>';
-
+ echo '<p>'.$lang['srv_alert_instruction_survey'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_date'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_site'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_url'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_pdf'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_rtf'].'</p>';
+
$row = SurveyInfo::getInstance()->getSurveyRow();
# če imamo prepoznavanje uporabnik iz CMS, potem ponudimo tudi META_REFERAL_URL
- echo $lang['srv_alert_instruction_meta_referer_url'].'<br/>';
- echo $lang['srv_alert_instruction_system'];
- echo $lang['srv_alert_instruction_sample'];
- echo $lang['srv_alert_instruction_available'];
-
-# echo $lang['srv_alert_instruction3'];
+ if ($rowAlert['finish_respondent_cms'] == 1)
+ echo '<p>'.$lang['srv_alert_instruction_meta_referer_url'].'</p>';
+
+ echo '</div>';
+
+ echo '<div class="izpolnjena_spremenljivke">';
+
$sqlSistemske = sisplet_query("SELECT s.id, s.naslov, s.variable FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.gru_id=g.id AND g.ank_id='$anketa' ORDER BY g.vrstni_red, s.vrstni_red");
$prefix = "";
+
while ($rowSistemske = mysqli_fetch_assoc($sqlSistemske)) {
- echo $prefix . '#' . $rowSistemske['variable'] . '#';
- $prefix = ", ";
+ $prefix = $prefix . $rowSistemske['variable'] . ', ';
}
- if ($prefix == "") { // ni sistemskih spremenljivk
- echo '<p class="red">'.$lang['srv_alert_no_sys_var'].'</p>';
+ if($prefix != "") {
+ echo '<p class="bold bottom16">'.$lang['srv_alert_instruction_available'].'</p>';
+ echo '<p class="bottom16">'.rtrim($prefix, ", ").'</p>';
+ echo '<p class="bold bottom16">'.$lang['srv_alert_instruction_system'].'</p>';
+ echo '<p>'.$lang['srv_alert_instruction_sample'].'</p>';
}
- echo '</span>';
- echo '</div>';
+ else{ // ni sistemskih spremenljivk
+ echo '<p class="bold">'.$lang['srv_alert_no_sys_var'].'</p>';
+ }
+
+ echo '</div>';
+
+
echo '</div>';
- echo ' </fieldset>';
-
- echo '<br />';
-
- echo ' <span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'] . '</span></a></div></span>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
- echo '<div class="clr"></div>';
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
- if ($_GET['s'] == '1') {
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
echo ' </form>';
} else if ($tab == 'expired') {
global $site_path, $global_user_id;
- //echo '<h4>' . $lang['srv_alert_expired_title'] . '</h4>'."\n";
+ //Obveščanje o izteku ankete
echo ' <form name="alertanketa_' . $anketa . '" action="ajax.php?a=editanketaalert&m='.$tab.'" method="post" autocomplete="off">' . "\n";
echo ' <input type="hidden" name="anketa" value="' . $anketa . '" />' . "\n";
echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n";
echo ' <input type="hidden" name="m" value="' . $_GET['m'] . '" />' . "\n";
- echo ' <fieldset>'. "\n";
- echo ' <legend>' . $lang['srv_alert_expired_time_title'] . '</legend>'. "\n";
+
+ echo ' <fieldset>';
+ echo ' <legend>' . $lang['srv_alert_expired_2'] . '</legend>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="alert_expire_days">'.$lang['srv_alert_expire_days'].':</label>';
+ echo '<input type="text" class="large w200" id="alert_expire_days" name="alert_expire_days" value="'.$rowAlert['expire_days'].'" size="3" >';
+ echo '</div>';
- echo $lang['srv_alert_expire_days1'];
- echo '<input type="text" id="alert_expire_days" name="alert_expire_days" value="'.$rowAlert['expire_days'].'" size="3" >';
- echo $lang['srv_alert_expire_days2'];
- echo $lang['srv_alert_expire_expire_at'] . $rowS['expire'].'<span>'.$lang['at'].'00:00</span><br/>';
- echo $lang['srv_alert_expire_note_at'] . '<span id="calc_alert_expire">'.$rowAlert['newdate'].'</span><span>'.$lang['at'].'01:00</span><br/>';
- echo ' </fieldset>';
+ echo '<div class="setting_holder">';
+ echo '<p class="bold">'. $lang['srv_alert_expire_expire_at'] .'</p>';
+ echo $rowS['expire'].$lang['at'].'00:00';
+ echo '</div>';
- echo '<br />';
- echo ' <fieldset>'. "\n";
- echo ' <legend>' . $lang['srv_alert_prejemnik'] . '</legend>'. "\n";
- echo '<p><input type="checkbox" name="alert_expire_author" id="alert_expire_author" value="1" onChange="change_alert_respondent(\'expire_author\', $(this));return false;"' . ($rowAlert['expire_author'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_expire_author">';
+ echo '<div class="setting_holder">';
+ echo '<p class="bold">'. $lang['srv_alert_expire_note_at'] .'</p>';
+ echo '<p><span id="calc_alert_expire">'.$rowAlert['newdate'].'</span><span>'.$lang['at'].'01:00</span></p>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_alert_expire_prejemniki'].'</span>';
+
+ echo '<div class="setting_item" id="label_alert_expire_author">';
+ echo '<input type="checkbox" name="alert_expire_author" id="alert_expire_author" value="1" onChange="change_alert_respondent(\'expire_author\', $(this));return false;"' . ($rowAlert['expire_author'] == 1 ? ' checked' : '') . '>';
$this->display_alert_label('expire_author',($rowAlert['expire_author'] == 1));
- echo '</span></p>';
- echo '<p><input type="checkbox" name="alert_expire_other" id="alert_expire_other" value="1"' . (($rowAlert['expire_other'] == 1 || ($rowAlert['expire_other_emails'] && $rowAlert['expire_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'expire_other\');"><label for="alert_expire_other">' . $lang['email_prejemniki'] . $lang['email_one_per_line'] . '</label></p>';
- echo '<p id="alert_holder_expire_other_emails" '.($rowAlert['expire_other'] == 0 ? 'class="displayNone"' : '' ).'>';
- echo '<label for="alert_expire_other_emails">' . $lang['email'] . ':</label>' .
- ' <textarea name="alert_expire_other_emails" id="alert_expire_other_emails" style="height:100px" >' . $rowAlert['expire_other_emails'] . '</textarea>' .
- ' </p>';
- echo ' </fieldset>';
+ echo '</div>';
- echo '</fieldset>';
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_expire_other" id="alert_expire_other" value="1"' . (($rowAlert['expire_other'] == 1 || ($rowAlert['expire_other_emails'] && $rowAlert['expire_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'expire_other\');"><label for="alert_expire_other">' . $lang['email_prejemniki'] .'</label>';
+ echo '</div>';
- echo '<br />';
- echo '<fieldset>';
- echo '<legend>' . $lang['srv_alert_oblika'] . '</legend>';
- echo '<div style="float:left; width:auto;">';
- echo '<p><label for="subject">' . $lang['subject'] . ': <input type="text" id="alert_expire_subject" name="alert_expire_subject" value="' . ($rowAlert['expire_subject'] ? $rowAlert['expire_subject'] : $lang['srv_alert_expire_subject']) . '" size="90"/></label></p>';
+ echo '<div class="setting_item">';
+
+ echo '<div class="setting_holder alert_other_emails '.($rowAlert['expire_other'] == 0 ? 'displayNone' : '' ).'" id="alert_holder_expire_other_emails">';
+ echo '<label for="alert_expire_other_emails">' . $lang['email_prejemniki_one_per_line'] . ':</label>';
+ echo '<textarea class="alert_other_emails" name="alert_expire_other_emails" id="alert_expire_other_emails" >' . $rowAlert['expire_other_emails'] . '</textarea>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div id="obvescanje_sidebyside_holder">';
+ echo '<div id="obvescanje_sidebyside_left">';
+
+ echo '<p class="bold caps bottom16">'.$lang['message_content'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="subject">' . $lang['subject'] . ': </label>';
+ echo '<input type="text" class="large wauto" id="alert_delete_subject" id="alert_expire_subject" name="alert_expire_subject" value="' . ($rowAlert['expire_subject'] ? $rowAlert['expire_subject'] : $lang['srv_alert_expire_subject']) . '"/>';
+ echo '</div>';
if ($rowAlert['expire_text'] != ''){
$text = $rowAlert['expire_text'];
@@ -2946,56 +3310,81 @@ class SurveyAdminSettings { }
// prikaze editor za ne-spremenljivko (za karkoli druzga pac)
- echo ' <p><label for="alert_expire_text">' . $lang['text'] . ':</label>';
- echo ' <textarea name="alert_expire_text" id="alert_expire_text" rows="3" >' . $text . '</textarea>';
- echo ' </p>';
- echo '</div>';
- echo '<div style="float:left; width:auto; max-width:550px; margin-left:10px;">';
- echo '<div id="div_error">';
- echo $lang['srv_alert_instruction1'];
- echo $lang['srv_alert_instruction4'];
+ echo '<div class="setting_holder">';
- echo '</div>';
- echo '</div>';
- echo '</fieldset>';
- echo '<br />';
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
- if ($_GET['s'] == '1') {
+ echo '<label class="bottom4" for="alert_expire_text">' . $lang['message'] . ':</label>';
+ echo '<textarea name="alert_expire_text" id="alert_expire_text">' . $text . '</textarea>';
+
+ echo '</div>';
+ echo '</div>';
+
+ //Navodila na desni
+ echo '<div id="obvescanje_sidebyside_right">';
+ echo '<div class="message_instructions">';
+ echo '<p class="bold caps bottom16">'.$lang['srv_alert_instruction1'].'</p>';
+ echo '<p class="bold bottom16">'.$lang['srv_alert_instruction1a'].':</p>';
+ echo '<p class="bottom16">'.$lang['srv_alert_instruction4'].'</p>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
+
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
echo '</form>';
- } else if ($tab == 'active') {
- //echo '<h4>' . $lang['srv_alert_active_title'] . '</h4>'."\n";
+ }
+
+ // Obveščanje o spremembi aktivnosti ankete
+ else if ($tab == 'active') {
echo ' <form name="alertanketa_' . $anketa . '" action="ajax.php?a=editanketaalert&m='.$tab.'" method="post" autocomplete="off">' . "\n";
echo ' <input type="hidden" name="anketa" value="' . $anketa . '" />' . "\n";
echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n";
echo ' <input type="hidden" name="m" value="' . $_GET['m'] . '" />' . "\n";
- echo '<fieldset>'. "\n";
- echo '<legend>' . $lang['srv_alert_prejemnik'] . '</legend>'. "\n";
- echo '<p><input type="checkbox" name="alert_active_author" id="alert_active_author" value="1" onChange="change_alert_respondent(\'active_author\', $(this));return false;"' . ($rowAlert['active_author'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_active_author">';
- $this->display_alert_label('active_author',($rowAlert['active_author'] == 1));
- echo '</span></p>';
- echo '<p><input type="checkbox" name="alert_active_other" id="alert_active_other" value="1"' . (($rowAlert['active_other'] == 1 || ($rowAlert['active_other_emails'] && $rowAlert['active_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'active_other\');"><label for="alert_active_other">' . $lang['email_prejemniki'] . $lang['email_one_per_line'] . '</label></p>';
- echo '<p id="alert_holder_active_other_emails" '.($rowAlert['active_other'] == 0 ? 'class="displayNone"' : '' ).'>';
- echo '<label for="alert_active_other_emails">' . $lang['email'] . ':</label>';
- echo '<textarea name="alert_active_other_emails" id="alert_active_other_emails" style="height:100px" >' . $rowAlert['active_other_emails'] . '</textarea>' .
- '</p>';
- echo '</fieldset>';
-
- echo '</fieldset>';
-
- echo '<br />';
echo '<fieldset>';
- echo '<legend>' . $lang['srv_alert_oblika'] . '</legend>';
- echo '<div style="float:left; width:auto;">';
- echo '<p>' . $lang['srv_alert_oblika_deactivate_note'] . '</p>';
- echo '<p><label for="subject">' . $lang['subject'] . ': ';
- echo '<input type="text" name="alert_active_subject0" id="alert_active_subject0" value="' . ($rowAlert['active_subject0'] ? $rowAlert['active_subject0'] : $lang['srv_alert_active_subject0']) . '" size="90"/></label></p>';
+ echo '<legend>' . $lang['srv_alert_active_2'] . '</legend>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_alert_active_prejemniki'].'</span>';
+
+ echo '<div class="setting_item" id="label_alert_active_author">';
+ echo '<input type="checkbox" name="alert_active_author" id="alert_active_author" value="1" onChange="change_alert_respondent(\'active_author\', $(this));return false;"' . ($rowAlert['active_author'] == 1 ? ' checked' : '') . '>';
+ $this->display_alert_label('active_author',($rowAlert['active_author'] == 1));
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_active_other" id="alert_active_other" value="1"' . (($rowAlert['active_other'] == 1 || ($rowAlert['active_other_emails'] && $rowAlert['active_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'active_other\');"><label for="alert_active_other">' . $lang['email_prejemniki'] .'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+
+ echo '<div class="setting_holder alert_other_emails '.($rowAlert['active_other'] == 0 ? 'displayNone' : '' ).'" id="alert_holder_active_other_emails">';
+ echo '<label for="alert_active_other_emails">' . $lang['email_prejemniki_one_per_line'] . ':</label>';
+ echo '<textarea class="alert_other_emails" name="alert_active_other_emails" id="alert_active_other_emails">' . $rowAlert['active_other_emails'] . '</textarea>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div id="obvescanje_sidebyside_holder">';
+ echo '<div id="obvescanje_sidebyside_left">';
+
+ echo '<p class="bold caps bottom16">'.$lang['message_content'].'</p>';
+ echo '<p class="bold bottom16">'.$lang['srv_alert_oblika_deactivate_note'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="subject">' . $lang['subject'] . ': </label>';
+ echo '<input type="text" class="large wauto" id="alert_active_subject0" name="alert_active_subject0" value="' . ($rowAlert['active_subject0'] ? $rowAlert['active_subject0'] : $lang['srv_alert_active_subject0']) . '"/>';
+ echo '</div>';
if ($rowAlert['active_text0'] != '') {
$text0 = $rowAlert['active_text0'];
@@ -3006,15 +3395,21 @@ class SurveyAdminSettings { $text0 = nl2br($lang['srv_alert_active_text0'].$signature);
}
+
// prikaze editor za ne-spremenljivko (za karkoli druzga pac)
- echo ' <p><label for="alert_active_text0">' . $lang['text'] . ':</label>';
- echo ' <textarea name="alert_active_text0" id="alert_active_text0" rows="3" >' . $text0 . '</textarea>';
- echo ' </p>';
+ echo '<div class="setting_holder">';
- echo '<br/>';
- echo '<p>' . $lang['srv_alert_oblika_activate_note'] . '</p>';
- echo '<p><label for="subject">' . $lang['subject'] . ': ';
- echo '<input type="text" name="alert_active_subject1" id="alert_active_subject1" value="' . ($rowAlert['active_subject1'] ? $rowAlert['active_subject1'] : $lang['srv_alert_active_subject1']) . '" size="90"/></label></p>';
+ echo '<label class="bottom4" for="alert_active_text0">' . $lang['message'] . ':</label>';
+ echo '<textarea name="alert_active_text0" id="alert_active_text0">' . $text0 . '</textarea>';
+
+ echo '</div>';
+
+ echo '<p class="bold top32 bottom16">'.$lang['srv_alert_oblika_activate_note'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="subject">' . $lang['subject'] . ': </label>';
+ echo '<input type="text" class="large wauto" id="alert_active_subject1" name="alert_active_subject1" value="' . ($rowAlert['active_subject1'] ? $rowAlert['active_subject1'] : $lang['srv_alert_active_subject1']) . '"/>';
+ echo '</div>';
if ($rowAlert['active_text1'] != '') {
$text1 = $rowAlert['active_text1'];
@@ -3025,55 +3420,81 @@ class SurveyAdminSettings { $text1 = nl2br($lang['srv_alert_active_text1'].$signature);
}
+
+ echo '<div class="setting_holder">';
+
+ echo '<label class="bottom4" for="alert_active_text1">' . $lang['message'] . ':</label>';
+ echo '<textarea name="alert_active_text1" id="alert_active_text1">' . $text1 . '</textarea>';
+
+ echo '</div>';
+ echo '</div>';
- echo ' <p><label for="alert_active_text1">' . $lang['text'] . ':</label>';
- echo ' <textarea name="alert_active_text1" id="alert_active_text1" rows="3" >' . $text1 . '</textarea>';
- echo ' </p>';
+ //Navodila na desni
+ echo '<div id="obvescanje_sidebyside_right">';
+ echo '<div class="message_instructions">';
+ echo '<p class="bold caps bottom16">'.$lang['srv_alert_instruction1'].'</p>';
+ echo '<p class="bold bottom16">'.$lang['srv_alert_instruction1a'].':</p>';
+ echo '<p class="bottom16">'.$lang['srv_alert_instruction5'].'</p>';
+ echo '</div>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
echo '</div>';
- echo '<div style="float:left; width:auto; max-width:550px; margin-left:10px;">';
- echo '<div id="div_error">';
- echo $lang['srv_alert_instruction1'];
- echo $lang['srv_alert_instruction5'];
- echo '</div>';
- echo '</div>';
- echo '</fieldset>';
- echo '<br />';
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
- if ($_GET['s'] == '1') {
+
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
echo '</form>';
- } else if ($tab == 'delete') {
- //echo '<h4>' . $lang['srv_alert_delete_title'] . '</h4>'."\n";
+ }
+
+ else if ($tab == 'delete') {
echo ' <form name="alertanketa_' . $anketa . '" action="ajax.php?a=editanketaalert&m='.$tab.'" method="post" autocomplete="off">' . "\n";
echo ' <input type="hidden" name="anketa" value="' . $anketa . '" />' . "\n";
echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n";
echo ' <input type="hidden" name="m" value="' . $_GET['m'] . '" />' . "\n";
- echo '<fieldset>'. "\n";
- echo '<legend>' . $lang['srv_alert_prejemnik'] . '</legend>'. "\n";
- echo '<p><input type="checkbox" name="alert_delete_author" id="alert_delete_author" value="1" onChange="change_alert_respondent(\'delete_author\', $(this));return false;"' . ($rowAlert['delete_author'] == 1 ? ' checked' : '') . '>';
- echo '<span id="label_alert_delete_author">';
+ //Obveščanje o izbrisu ankete
+ echo '<fieldset>';
+ echo '<legend>' . $lang['srv_alert_surveydelete'] . '</legend>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_alert_surveydelete_text'].'</span>';
+
+ echo '<div class="setting_item" id="label_alert_delete_author">';
+ echo '<input type="checkbox" name="alert_delete_author" id="alert_delete_author" value="1" onChange="change_alert_respondent(\'delete_author\', $(this));return false;"' . ($rowAlert['delete_author'] == 1 ? ' checked' : '') . '>';
$this->display_alert_label('delete_author',($rowAlert['delete_author'] == 1));
- echo '</span></p>';
- echo '<p><input type="checkbox" name="alert_delete_other" id="alert_delete_other" value="1"' . (($rowAlert['delete_other'] == 1 || ($rowAlert['delete_other_emails'] && $rowAlert['delete_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'delete_other\');"><label for="alert_delete_other">' . $lang['email_prejemniki'] . $lang['email_one_per_line'] . '</label></p>';
- echo '<p id="alert_holder_delete_other_emails" '.($rowAlert['delete_other'] == 0 ? 'class="displayNone"' : '' ).'>';
- echo '<label for="alert_delete_other_emails">' . $lang['email'] . ':</label>';
- echo '<textarea name="alert_delete_other_emails" id="alert_delete_other_emails" style="height:100px" >' . $rowAlert['delete_other_emails'] . '</textarea>';
- echo '</p>';
- echo '</fieldset>';
+ echo '</div>';
- echo '</fieldset>';
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_delete_other" id="alert_delete_other" value="1"' . (($rowAlert['delete_other'] == 1 || ($rowAlert['delete_other_emails'] && $rowAlert['delete_other'] != 0)) ? ' checked' : '') . ' onchange="toggleStatusAlertOtherCheckbox(\'delete_other\');"><label for="alert_delete_other">' . $lang['email_prejemniki'] .'</label>';
+ echo '</div>';
- echo '<br />';
- echo '<fieldset>';
- echo '<legend>' . $lang['srv_alert_oblika'] . '</legend>';
- echo '<div style="float:left; width:auto;">';
- echo '<p><label for="subject">' . $lang['subject'] . ': <input type="text" id="alert_delete_subject" name="alert_delete_subject" value="' . ($rowAlert['delete_subject'] ? $rowAlert['delete_subject'] : $lang['srv_alert_delete_subject']) . '" size="90"/></label></p>';
+ echo '<div class="setting_item">';
+
+ echo '<div class="setting_holder alert_other_emails '.($rowAlert['delete_other'] == 0 ? 'displayNone' : '' ).'" id="alert_holder_delete_other_emails">';
+ echo '<label for="alert_delete_other_emails">' . $lang['email_prejemniki_one_per_line'] . ':</label>';
+ echo '<textarea class="alert_other_emails" name="alert_delete_other_emails" id="alert_delete_other_emails">' . $rowAlert['delete_other_emails'] . '</textarea>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div id="obvescanje_sidebyside_holder">';
+ echo '<div id="obvescanje_sidebyside_left">';
+
+ echo '<p class="bold caps bottom16">'.$lang['message_content'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="subject">' . $lang['subject'] . ': </label>';
+ echo '<input type="text" class="large wauto" id="alert_delete_subject" name="alert_delete_subject" value="' . ($rowAlert['delete_subject'] ? $rowAlert['delete_subject'] : $lang['srv_alert_delete_subject']) . '"/>';
+ echo '</div>';
if ($rowAlert['delete_text'] != '') {
$text = $rowAlert['delete_text'];
@@ -3084,25 +3505,37 @@ class SurveyAdminSettings { $text = nl2br($lang['srv_alert_delete_text'].$signature);
}
+
// prikaze editor za ne-spremenljivko (za karkoli druzga pac)
- echo ' <p><label for="alert_delete_text">' . $lang['text'] . ':</label>';
- echo ' <textarea name="alert_delete_text" id="alert_delete_text" rows="3" >' . $text . '</textarea>';
- echo ' </p>';
+ echo '<div class="setting_holder">';
+
+ echo '<label class="bottom4" for="alert_delete_text">' . $lang['message'] . ':</label>';
+ echo '<textarea name="alert_delete_text" id="alert_delete_text">' . $text . '</textarea>';
+
echo '</div>';
- echo '<div style="float:left; width:auto; max-width:550px; margin-left:10px;">';
- echo '<div id="div_error">';
- echo $lang['srv_alert_instruction1'];
- echo $lang['srv_alert_instruction5'];
echo '</div>';
+
+ //Navodila na desni
+ echo '<div id="obvescanje_sidebyside_right">';
+ echo '<div class="message_instructions">';
+ echo '<p class="bold caps bottom16">'.$lang['srv_alert_instruction1'].'</p>';
+ echo '<p class="bold bottom16">'.$lang['srv_alert_instruction1a'].':</p>';
+ echo '<p class="bottom16">'.$lang['srv_alert_instruction5a'].'</p>';
echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;"><span>';
- echo $lang['edit1337'] . '</span></a></div></span>';
- echo '<div class="clr"></div>';
- if ($_GET['s'] == '1') {
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.alertanketa_' . $rowS['id'] . '.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
+
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
echo '</form>';
@@ -3153,7 +3586,7 @@ class SurveyAdminSettings { global $global_user_id;
global $mysql_database_name;
- echo '<fieldset>';
+ echo '<fieldset id="email_streznik_anketa">';
echo '<legend>'.$lang['srv_user_base_email_server_settings'].'</legend>';
$row = SurveyInfo::getInstance()->getSurveyRow();
@@ -3161,7 +3594,7 @@ class SurveyAdminSettings { // Opozorilo, ce imamo vklopljena vabila, da gre za iste nastavitve
$isEmail = (int)SurveyInfo::getInstance()->checkSurveyModule('email');
if($isEmail)
- echo '<p class="red bold">'.$lang['srv_email_server_settings_warning'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_email_server_settings_warning'].'</p>';
echo '<form name="settingsanketa_' . $row['id'] . '" action="ajax.php?a=editanketasettings&m=email_server" method="post" autocomplete="off">' . "\n\r";
@@ -3176,20 +3609,31 @@ class SurveyAdminSettings { // Dostop za posiljanje mailov preko 1ka serverja
$enabled1ka = ( $MA->is1KA() || (($admin_type == 0) && ($mysql_database_name == 'www1kasi' || $mysql_database_name == 'test1kasi' || $mysql_database_name == 'real1kasi' || $mysql_database_name == '1kaarnessi')) ) ? true : false;
- echo '<p>';
- echo '<span class="bold">'.$lang['srv_email_setting_select_server'].'</span> ';
- echo '<label><input type="radio" name="SMTPMailMode" value="0" '.($MA->is1KA() ? 'checked ="checked" ' : '').' '.($enabled1ka ? '' : ' disabled="disabled"').' onclick="$(\'#send_mail_mode1, #send_mail_mode2\').hide();$(\'#send_mail_mode0\').show();">';
- echo $lang['srv_email_setting_adapter0']. ' </label>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_select_server'].'</span>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="SMTPMailMode0" name="SMTPMailMode" value="0" '.($MA->is1KA() ? 'checked ="checked" ' : '').' '.($enabled1ka ? '' : ' disabled="disabled"').' onclick="$(\'#send_mail_mode1, #send_mail_mode2\').hide();$(\'#send_mail_mode0\').show();">';
+ echo '<label for="SMTPMailMode0">'.$lang['srv_email_setting_adapter0']. ' </label>';
+ echo '</div>';
+
// Google smtp je viden samo starim, kjer je ze vklopljen
- if($MA->isGoogle()){
- echo '<label><input type="radio" name="SMTPMailMode" value="1" '.($MA->isGoogle() ? 'checked ="checked" ' : '').' onclick="$(\'#send_mail_mode0, #send_mail_mode2\').hide(); $(\'#send_mail_mode1\').show();">';
- echo $lang['srv_email_setting_adapter1'].' </label>';
- }
- echo '<label><input type="radio" name="SMTPMailMode" value="2" '.($MA->isSMTP() ? 'checked ="checked" ' : '').' onclick="$(\'#send_mail_mode0, #send_mail_mode1\').hide(); $(\'#send_mail_mode2\').show();">';
- echo $lang['srv_email_setting_adapter2'].' </label>';
+ if($MA->isGoogle()){
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="SMTPMailMode" value="1" '.($MA->isGoogle() ? 'checked ="checked" ' : '').' onclick="$(\'#send_mail_mode0, #send_mail_mode2\').hide(); $(\'#send_mail_mode1\').show();">';
+ echo '<label>'.$lang['srv_email_setting_adapter1'].' </label>';
+ echo '</div>';
+ }
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="SMTPMailMode" value="2" '.($MA->isSMTP() ? 'checked ="checked" ' : '').' onclick="$(\'#send_mail_mode0, #send_mail_mode1\').hide(); $(\'#send_mail_mode2\').show();">';
+ echo '<label>'.$lang['srv_email_setting_adapter2'].' </label>';
echo Help :: display('srv_mail_mode');
- echo '</p>';
-
+ echo '</div>';
+
+ echo '</div>';
+
#1KA
$enkaSettings = $MA->get1KASettings($raziskave=true);
@@ -3200,7 +3644,7 @@ class SurveyAdminSettings { echo '<p><label>'.$lang['srv_email_setting_from'].'<span>'.$enkaSettings['SMTPFrom'].'</span><input type="hidden" name="SMTPFrom0" value="'.$enkaSettings['SMTPFrom'].'"></label>';
echo '</p>';
# replyTo
- echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo0" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
+ echo '<p><label>'.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').'<input type="text" name="SMTPReplyTo0" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
echo '</p>';
echo '</div>';
@@ -3213,7 +3657,7 @@ class SurveyAdminSettings { echo '<p><label>'.$lang['srv_email_setting_from'].'<input type="text" name="SMTPFrom1" value="'.$enkaSettings['SMTPFrom'].'"></label>';
echo '</p>';
# replyTo
- echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo1" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
+ echo '<p><label>'.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').'<input type="text" name="SMTPReplyTo1" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
echo '</p>';
#Password
echo '<p><label>'.$lang['srv_email_setting_password'].'<input type="password" name="SMTPPassword1" placeholder="'.$lang['srv_email_setting_password_placeholder'].'"></label>';
@@ -3223,89 +3667,155 @@ class SurveyAdminSettings { #SMTP
$enkaSettings = $MA->getSMTPSettings();
echo '<div id="send_mail_mode2" '.(!$MA->isSMTP() ? ' class="displayNone"' : '').'>';
- echo '<span class="italic">'.$lang['srv_email_setting_adapter2_note'].'</span><br />';
- echo '<br /><span class="bold">'.$lang['srv_email_setting_settings'].'</span><br />';
+ //echo '<span class="italic">'.$lang['srv_email_setting_adapter2_note'].'</span><br />';
+ echo '<p class="semi-bold bottom16">'.$lang['srv_email_setting_settings'].'</p>';
+
+ echo '<div class="setting_holder horizontal">';
+
# from - NICE
- echo '<p><label>'.$lang['srv_email_setting_from_nice'].'<input type="text" name="SMTPFromNice2" value="'.$enkaSettings['SMTPFromNice'].'"></label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_from_nice'].'</span>';
+ echo '<input type="text" class="text large" name="SMTPFromNice2" value="'.$enkaSettings['SMTPFromNice'].'">';
+ echo '</div>';
+
# from
- echo '<p><label>'.$lang['srv_email_setting_from'].'<input type="text" name="SMTPFrom2" value="'.$enkaSettings['SMTPFrom'].'"></label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_from'].'</span>';
+ echo '<input type="text" class="text large" name="SMTPFrom2" value="'.$enkaSettings['SMTPFrom'].'">';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+
# replyTo
- echo '<p><label>'.$lang['srv_email_setting_reply'].'<input type="text" name="SMTPReplyTo2" value="'.$enkaSettings['SMTPReplyTo'].'" ></label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_reply'].Help::display('srv_obvescanje_odgovorZa').'</span>';
+ echo '<input type="text" class="text large" name="SMTPReplyTo2" value="'.$enkaSettings['SMTPReplyTo'].'" >';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+
#Username
- echo '<p><label>'.$lang['srv_email_setting_username'].'<input type="text" name="SMTPUsername2" value="'.$enkaSettings['SMTPUsername'].'" ></label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_username'].'</span>';
+ echo '<input type="text" class="text large" name="SMTPUsername2" value="'.$enkaSettings['SMTPUsername'].'" >';
+ echo '</div>';
+
#Password
- echo '<p><label>'.$lang['srv_email_setting_password'].'<input type="password" name="SMTPPassword2" placeholder="'.$lang['srv_email_setting_password_placeholder'].'"></label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_password'].'</span>';
+ echo '<input type="password" class="text large" name="SMTPPassword2" placeholder="'.$lang['srv_email_setting_password_placeholder'].'">';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+
#autentikacija
- echo '<p>';
- echo $lang['srv_email_setting_autentication'];
- echo '<label><input type="radio" name="SMTPAuth2" value="0" '.((int)$enkaSettings['SMTPAuth'] != 1 ? 'checked ="checked" ' : '').'>';
- echo $lang['srv_email_setting_no'].'</label>';
- echo '<label><input type="radio" name="SMTPAuth2" value="1" '.((int)$enkaSettings['SMTPAuth'] == 1 ? 'checked ="checked" ' : '').'>';
- echo $lang['srv_email_setting_yes'].'</label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_autentication'].'</span>';
+
+ echo '<div class="fold">';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="SMTPAuth20" name="SMTPAuth2" value="0" '.((int)$enkaSettings['SMTPAuth'] != 1 ? 'checked ="checked" ' : '').'>';
+ echo '<label for="SMTPAuth20">'. $lang['srv_email_setting_no'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="SMTPAuth21" name="SMTPAuth2" value="1" '.((int)$enkaSettings['SMTPAuth'] == 1 ? 'checked ="checked" ' : '').'>';
+ echo '<label for="SMTPAuth21">'. $lang['srv_email_setting_yes'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
#Varnost SMTPSecure
- echo '<p>';
- echo $lang['srv_email_setting_encryption'];
- echo '<label><input type="radio" name="SMTPSecure2" value="0" '.((int)$enkaSettings['SMTPSecure'] == 0 ? 'checked ="checked" ' : '').'>';
- echo $lang['srv_email_setting_encryption_none'].'</label>';
- echo '<label><input type="radio" name="SMTPSecure2" value="ssl" '.($enkaSettings['SMTPSecure'] == 'ssl' ? 'checked ="checked" ' : '').'>';
- echo $lang['srv_email_setting_encryption_ssl'].'</label>';
- echo '<label><input type="radio" name="SMTPSecure2" value="tls" '.($enkaSettings['SMTPSecure'] == 'tls' ? 'checked ="checked" ' : '').'>';
- echo $lang['srv_email_setting_encryption_tls'].'</label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_encryption'].'</span>';
+ echo '<div class="fold">';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="SMTPSecure20" value="0" '.((int)$enkaSettings['SMTPSecure'] == 0 ? 'checked ="checked" ' : '').'>';
+ echo '<label for="SMTPSecure20">'. $lang['srv_email_setting_encryption_none'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="SMTPSecure21" value="ssl" '.($enkaSettings['SMTPSecure'] == 'ssl' ? 'checked ="checked" ' : '').'>';
+ echo '<label for="SMTPSecure21">'. $lang['srv_email_setting_encryption_ssl'].'</label>';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="SMTPSecure22" value="tls" '.($enkaSettings['SMTPSecure'] == 'tls' ? 'checked ="checked" ' : '').'>';
+ echo '<label for="SMTPSecure22">'. $lang['srv_email_setting_encryption_tls'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+
#port
- echo '<p><label>'.$lang['srv_email_setting_port'].'<input type="number" min="0" max="65535" name="SMTPPort2" value="'.(int)$enkaSettings['SMTPPort'].'" style="width:80px;"></label>';
- echo ' '.$lang['srv_email_setting_port_note'];
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_port'].$lang['srv_email_setting_port_note'].'</span>';
+ echo '<input type="number" class="text large min="0" max="65535" name="SMTPPort2" value="'.(int)$enkaSettings['SMTPPort'].'">';
+ echo '</div>';
+
#host
- echo '<p><label>'.$lang['srv_email_setting_host'].'<input type="text" name="SMTPHost2" value="'.$enkaSettings['SMTPHost'].'" ></label>';
- echo '</p>';
- #delay
- echo '<p><label>'.$lang['srv_email_setting_smtp_delay'].' '.Help::display('srv_inv_delay').': <select name="SMTPDelay2">'
- /*. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
- . '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
- . '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
- . '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
- . '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
- . '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'*/
- . '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
- . '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
- . '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
- . '<option value="4000000" '.($enkaSettings['SMTPDelay']=="4000000"?'selected="selected"':'') .'>4 sec (max 15 / min)</option>'
- . '<option value="5000000" '.($enkaSettings['SMTPDelay']=="5000000"?'selected="selected"':'') .'>5 sec (max 12 / min)</option>'
- . '<option value="10000000" '.($enkaSettings['SMTPDelay']=="10000000"?'selected="selected"':'') .'>10 sec (max 6 / min)</option>'
- . '<option value="20000000" '.($enkaSettings['SMTPDelay']=="20000000"?'selected="selected"':'') .'>20 sec (max 3 / min)</option>'
- . '<option value="30000000" '.($enkaSettings['SMTPDelay']=="30000000"?'selected="selected"':'') .'>30 sec (max 2 / min)</option>'
- . '</select></label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_host'].'</span>';
+ echo '<input type="text" class="text large" name="SMTPHost2" value="'.$enkaSettings['SMTPHost'].'" >';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+
+ #delay
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_email_setting_smtp_delay'].' '.Help::display('srv_inv_delay').':</span>';
+ echo '<select class="dropdown large" name="SMTPDelay2">'
+ /*. '<option value="0" '.($enkaSettings['SMTPDelay']=="0"?'selected="selected"':'') .'>0 </option>'
+ . '<option value="10000" '.($enkaSettings['SMTPDelay']=="10000"?'selected="selected"':'') .'>0.01 sec (max 100 / sec)</option>'
+ . '<option value="20000" '.($enkaSettings['SMTPDelay']=="20000"?'selected="selected"':'') .'>0.02 sec (max 50 / sec)</option>'
+ . '<option value="50000" '.($enkaSettings['SMTPDelay']=="50000"?'selected="selected"':'') .'>0.05 sec (max 20 / sec)</option>'
+ . '<option value="100000" '.($enkaSettings['SMTPDelay']=="100000"?'selected="selected"':'') .'>0.1 sec (max 10 / sec)</option>'
+ . '<option value="200000" '.($enkaSettings['SMTPDelay']=="200000"?'selected="selected"':'') .'>0.2 sec (max 5 / sec)</option>'*/
+ . '<option value="500000" '.($enkaSettings['SMTPDelay']=="500000"?'selected="selected"':'') .'>0.5 sec (max 2 / sec)</option>'
+ . '<option value="1000000" '.($enkaSettings['SMTPDelay']=="1000000"?'selected="selected"':'') .'>1 sec (max 1 / sec)</option>'
+ . '<option value="2000000" '.($enkaSettings['SMTPDelay']=="2000000"?'selected="selected"':'') .'>2 sec (max 30 / min)</option>'
+ . '<option value="4000000" '.($enkaSettings['SMTPDelay']=="4000000"?'selected="selected"':'') .'>4 sec (max 15 / min)</option>'
+ . '<option value="5000000" '.($enkaSettings['SMTPDelay']=="5000000"?'selected="selected"':'') .'>5 sec (max 12 / min)</option>'
+ . '<option value="10000000" '.($enkaSettings['SMTPDelay']=="10000000"?'selected="selected"':'') .'>10 sec (max 6 / min)</option>'
+ . '<option value="20000000" '.($enkaSettings['SMTPDelay']=="20000000"?'selected="selected"':'') .'>20 sec (max 3 / min)</option>'
+ . '<option value="30000000" '.($enkaSettings['SMTPDelay']=="30000000"?'selected="selected"':'') .'>30 sec (max 2 / min)</option>'
+ . '</select>';
+ echo '</div>';
+
+
+ echo '</div>';
- echo '</div>';
echo '</form>';
echo '</fieldset>';
-
-
- echo '<br class="clr" />';
-
- // Gumb shrani
- echo '<span class="floatLeft"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">';
- echo $lang['srv_email_setting_btn_save'] . '</a></div></span>';
-
+
+ echo '<div class="button_holder">';
// Gumb preveri nastavitve
- echo '<span id="send_mail_mode_test" class="floatLeft spaceLeft"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_green" href="#" onclick="showTestSurveySMTP(); return false;">';
- echo $lang['srv_email_setting_btn_test'].'</a></div></span>';
+ echo '<button class="medium white-black" onClick="showTestSurveySMTP(); return false;">'.$lang['srv_email_setting_btn_test'].'</button>';
+ // Gumb shrani
+ echo '<button class="medium blue" onclick="document.settingsanketa_' . $row['id'] . '.submit(); return false;">'.$lang['srv_email_setting_btn_save'].'</button>';
+ echo '</div>';
- if ($_GET['s'] == '1') {
- echo '<div id="success_save" style="float:left; display:inline; margin: -2px 0 0 0;"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
}
@@ -3365,7 +3875,6 @@ class SurveyAdminSettings { $sa = new SurveyAdmin(1, $this->anketa);
$sa->show_mailto_users('all', null);
echo '</div>';
- echo '<div class="clr"></div>';
} else { // pošljemo emaile
@@ -3551,71 +4060,96 @@ class SurveyAdminSettings { global $site_url;
global $site_path;
- echo '<fieldset>';
- echo '<legend >' . $lang['srv_splosna_navodila'] . '</legend>';
-
- echo '<p>'.$lang['srv_social_settings_text1'].'</p>';
- echo '<p>'.$lang['srv_social_settings_text2'].'</p>';
- echo '<p>'.$lang['srv_social_settings_text3'].'</p>';
- echo '<p>'.$lang['srv_social_settings_text4'].'</p>';
- echo '<p>'.$lang['srv_social_settings_text5'].' <a href="http://www.1ka.si/a/3510">http://www.1ka.si/a/3510</a>, </p>';
- echo '<p>'.$lang['srv_social_settings_text6'].' <a href="http://www.1ka.si/admin/survey/index.php?a=knjiznica">'.$lang['srv_library'].'</a> '.$lang['srv_social_settings_text7'].'</p>';
- echo '<p><a href="index.php?anketa='.$this->anketa.'">'.$lang['edit2'].'</a>'.$lang['srv_social_settings_text8'].'</p>';
+ echo '<p class="top16 bottom16">'.$lang['srv_social_settings_text1'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_social_settings_text2'].$lang['srv_social_settings_text3'].$lang['srv_social_settings_text4'].'</p>';
+ echo '<p>'.$lang['srv_social_settings_text5'].'<a href="index.php?anketa='.$this->anketa.'">'.$lang['srv_social_settings_text6'].'</a>.</p>';
- echo '</fieldset>';
// Omrežja so sestavljane vprašanja. Začnejo se iz generatorja imen (name generator). S tem respondent (ego) navede objekte, prijatelje - alterje. , s katerim pridobimo imena pzanke in vprašanj. Druga kompnenta je zanka, ki za vse alterje določenega ega sproži enaka vprašanja. Dretja komponenta so vprašanja. Primer omrežja je tukaj, http://www.1ka.si/a/3510, vprašalnik pa najdemo v knjižnjic med Primerov 1KA anket http://www.1ka.si/admin/survey/index.php?a=knjiznica
}
/**
* @desc prikaze tab arhivi
*/
- function arhivi() {//OSTANE
+ function arhivi() {
global $lang;
- echo '<fieldset style="width:100%">';
+ echo '<fieldset>';
echo '<legend >' . $lang['srv_questionnaire_archives'] . '</legend>';
-
- echo '<p style="margin-bottom:5px;"><span class="bold spaceRight" style="margin-top:5px;">' . $lang['srv_backup_label'] . '</span></p>';
- echo '<p style="margin-top:5px;margin-bottom:10px;">'.$lang['srv_note'].': <input class="" name="intro_opomba" id="intro_opomba" type="text" style="width:400px"></p>';
-
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="index.php?anketa=' . $this->anketa . '&a=backup_create" onclick="create_archive_survey(\'' . $this->anketa .'\',\'' . $lang['srv_wait_a_moment'] .'\'); return false;">';
- echo $lang['srv_backup_button'];
- echo '</a></div></span>';
-
- echo '<br /><br />';
+
+ echo '<p class="bottom16">'.$lang['srv_questionnaire_archives_text'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo $lang['srv_questionnaire_archives_note'].':';
+ echo '<input class="large w400" name="intro_opomba" id="intro_opomba" type="text"/>';
+ echo '</div>';
+
+ echo '<div class="button_holder bottom16">';
+ echo '<button class="medium blue" type="button" href="index.php?anketa=' . $this->anketa . '&a=backup_create" onclick="create_archive_survey(\'' . $this->anketa .'\'); return false;">'.$lang['srv_backup_button'].'</button>';
+ echo '</div>';
// Seznam ustvarjenih arhivov
$sql = sisplet_query("SELECT a.id, a.naslov, a.intro_opomba, a.insert_time, a.edit_time, CONCAT(i.name, ' ', i.surname) AS insert_name, CONCAT(e.name, ' ', e.surname) AS edit_name FROM srv_anketa a, users i, users e WHERE a.insert_uid=i.id AND a.edit_uid=e.id AND a.backup = '$this->anketa' AND a.active>='0' ORDER BY a.insert_time DESC");
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
- if (mysqli_num_rows($sql) > 0)
- echo '<br /><strong>' . $lang['srv_backup_list'] . ':</strong>';
-
- while ($row = mysqli_fetch_array($sql)) {
- echo '<div style="margin: 5px 0 10px 10px;">';
- echo '<span class="bold"><a href="index.php?anketa=' . $row['id'] . '">' . $row['naslov'] . '</a></span> '.($row['intro_opomba']!='' ? ' - <i>'.$row['intro_opomba'].'</i>' : '');
- echo '<br />(' . $lang['sent_by'] . ': <b>' . $row['insert_name'].'</b> ' . datetime($row['insert_time']) . ', ' . $lang['edit_by'] . ': <b>' . $row['edit_name'].'</b> ' . datetime($row['edit_time']) . ')';
- echo '<br /><a href="#" onclick="javascript:anketa_delete(\'' . $row['id'] . '\', \'' . $lang['srv_anketadeleteconfirm'] . '\'); return false;">' . $lang['srv_survey_archives_delete_survey'] . '</a>, <a href="index.php?anketa=' . $row['id'] . '&a=backup_restore">' . $lang['srv_anketarestore'] . '</a>';
- echo '</div>';
+ if (mysqli_num_rows($sql) > 0) {
+ echo '<p class="bold">' . $lang['srv_backup_list'] . ':</p>';
+
+ echo '<table id="survey_archives_table">';
+
+ echo '<tr>';
+ echo '<th>'.$lang['srv_questionnaire_archives_date'].'</th>';
+ echo '<th>'.$lang['srv_questionnaire_archives_by'].'</th>';
+ echo '<th>'.$lang['srv_questionnaire_archives_note2'].'</th>';
+ echo '<th></th>';
+ echo '</tr>';
+
+ while ($row = mysqli_fetch_array($sql)) {
+ echo '<tr>';
+ echo '<td>'.datetime($row['insert_time']).'</td>';
+ echo '<td>'.$row['insert_name'].'</td>';
+
+ if ($row['intro_opomba']=='')
+ $opomba = "/";
+ else if (strlen($row['intro_opomba']) > 40)
+ $opomba = substr($row['intro_opomba'], 0, 37).'...';
+ else
+ $opomba = $row['intro_opomba'];
+
+ echo '<td>'.$opomba.'</td>';
+
+ //Ikone
+ echo '<td class="right">';
+ echo '<div class="icon_holder multiple">';
+ echo '<a class="faicon" href="#" onclick="javascript:anketa_delete(\'' . $row['id'] . '\', \'' . $lang['srv_anketadeleteconfirm'] . '\'); return false;"><span class="faicon trash empty"></span></a>';
+ echo '<button class="table-inline white-black caps" type="button" onclick="window.location.href=\'index.php?anketa=' . $row['id'] . '&a=backup_restore\'">'.$lang['srv_questionnaire_archives_activate'].'</button>';
+ echo '</div>';
+ echo '</td>';
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+
}
+
+
echo '</fieldset>';
}
function arhivi_data() {
global $lang;
- echo '<fieldset style="width:100%">';
+ echo '<fieldset>';
echo '<legend>' . $lang['srv_arhiv_data'] . '</legend>';
-
- echo '<p style="margin-bottom:5px;"><span class="bold spaceRight" style="margin-top:5px;">' . $lang['srv_backup_data_label'] . '</span></p>';
-
- echo '<span class="floatLeft spaceRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="ajax.php?anketa=' . $this->anketa . '&a=backup_data" onclick="create_archive_survey_data(\'' . $this->anketa .'\',\'' . $lang['srv_wait_a_moment'] .'\'); return false;">';
- echo $lang['srv_backup_data_button'];
- echo '</a></div></span>';
- echo '<br /><br />';
+ echo '<p class="bottom16">'.$lang['srv_backup_data_text'].'</p>';
+
+ echo '<div class="button_holder bottom16">';
+ echo '<button class="medium blue" type="button" href="ajax.php?anketa=' . $this->anketa . '&a=backup_data" onclick="create_archive_survey_data(\'' . $this->anketa .'\'); return false;">'.$lang['srv_backup_data_label'].'</button>';
+ echo '</div>';
+ // Seznam ustvarjenih arhivov - 2. faza: kdo je arhiviral, opomba, možnost izbrisa
$backups = array();
if ($handle = opendir( dirname(__FILE__) . '/SurveyBackup/' )) {
while (false !== ($entry = readdir($handle))) {
@@ -3629,13 +4163,37 @@ class SurveyAdminSettings { closedir($handle);
}
if (count($backups) > 0) {
- echo '<br /><span class="bold">' . $lang['srv_backup_data_list'] . ':</span>';
+ echo '<p class="bold">' . $lang['srv_backup_data_list'] . ':</p>';
+
+ echo '<table id="survey_data_archives_table">';
+
+ echo '<tr>';
+ echo '<th>'.$lang['srv_questionnaire_archives_date'].'</th>';
+ echo '<th></th>';
+ echo '</tr>';
+
foreach ($backups AS $file) {
$e = explode('-', $file);
$e[2] = str_replace('.1ka', '', $e[2]);
- echo '<br /><span style="padding-left:10px;">'.$e[1].' '.$e[2].' - <a href="ajax.php?anketa='.$this->anketa.'&a=backup_restore&filename='.$file.'">'.$lang['srv_anketarestoredata'].'</a></span>';
+ $e[2] = str_replace('.', ':', $e[2]);
+ $e[2] = substr($e[2], 0, -3);
+
+ echo '<tr>';
+ echo '<td>'.$e[1].' '.$e[2].'</td>';
+
+
+ //Ikone
+ echo '<td class="right">';
+ echo '<div class="icon_holder multiple">';
+ //echo '<a class="faicon" href="#" onclick="delete_funkcija_todo"><span class="faicon trash empty"></span></a>';
+ echo '<button class="table-inline white-black caps" type="button" onclick="window.location.href=\'ajax.php?anketa='.$this->anketa.'&a=backup_restore&filename='.$file.'\'">'.$lang['srv_questionnaire_archives_activate'].'</button>';
+ echo '</div>';
+ echo '</td>';
+
+ echo '</tr>';
+
}
- echo '<br /><br />';
+ echo '</table>';
}
echo '</fieldset>';
@@ -3644,94 +4202,115 @@ class SurveyAdminSettings { function arhivi_testdata() {
global $lang;
- $str_testdata = "SELECT count(*) FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='1' OR testdata='2')";
- $query_testdata = sisplet_query($str_testdata);
- list($testdata) = mysqli_fetch_row($query_testdata);
-
- $str_testdata_auto = "SELECT count(*), add_date, add_uid FROM srv_testdata_archive WHERE ank_id='".$this->anketa."' GROUP BY add_date";
- $query_testdata_auto = sisplet_query($str_testdata_auto);
- $auto_testdata = array();
- while (list($_cnt, $_date, $_uid) = mysqli_fetch_row($query_testdata_auto) ) {
- $testdata_auto+=$_cnt;
- $auto_testdata[] = $cnt;
- }
-
echo '<fieldset>';
echo '<legend>'.$lang['srv_arhiv_testdata'].'</legend>';
-
- echo $lang['srv_archive_test_data_count'].(int)$testdata;
- if ($testdata_auto > 0) {
- echo $lang['srv_archive_test_data_auto'].(int)$testdata_auto;
+
+ $link = SurveyInfo::getSurveyLink();
+ $surveyName = SurveyInfo::getInstance()->getSurveyTitle();
+
+ $preview_disableif = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disableif');
+ $preview_disablealert = SurveySetting::getInstance()->getSurveyMiscSetting('preview_disablealert');
+ $preview_displayifs = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayifs');
+ $preview_displayvariables = SurveySetting::getInstance()->getSurveyMiscSetting('preview_displayvariables');
+ $preview_hidecomment = SurveySetting::getInstance()->getSurveyMiscSetting('preview_hidecomment');
+ $preview_options = '' . ($preview_disableif == 1 ? '&disableif=1' : '') . ($preview_disablealert == 1 ? '&disablealert=1' : '') . ($preview_displayifs == 1 ? '&displayifs=1' : '') . ($preview_displayvariables == 1 ? '&displayvariables=1' : '') . ($preview_hidecomment == 1 ? '&hidecomment=1' : '') . '';
+
+ echo '<p class="bottom16">'.$lang['srv_archive_test_data_text1'].'<a href="index.php?anketa=' . $this->anketa . '&a=testiranje&m=testnipodatki">'.$lang['srv_archive_test_data_text1a'].'</a>'.$lang['srv_archive_test_data_text2'].'<a href="' . $link . '&preview=on&testdata=on' . $preview_options . '" title="" target="_blank">'.$lang['srv_archive_test_data_text2a'].'</a>'.$lang['srv_archive_test_data_text3'].'</p>';
+
+ //Nimamo nobenih vnosov
+ $str_testdata_any = "SELECT count(*) as cnt, time_insert as time FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='1' OR testdata='2') GROUP BY day(time_insert)";
+ $query_testdata_any = sisplet_query($str_testdata_any);
+ list($testdata_any) = mysqli_fetch_row($query_testdata_any);
+ if ((int)$testdata_any == 0) {
+ echo '<p class="top16">'.$lang['srv_archive_test_data_none1']. $surveyName . $lang['srv_archive_test_data_none2'] . $lang['srv_archive_test_data_none3'].'.</p>';
+ }
+ else { // Imamo vnose, izpišemo eno ali obe tabeli
+
+ // Avtomatski vnosi
+ $str_testdata = "SELECT count(*) as cnt, time_insert as time FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='2') GROUP BY day(time_insert)";
+ $query_testdata = sisplet_query($str_testdata);
+ $table_exists1 = 0;
+ while ($testdata = mysqli_fetch_array($query_testdata)) {
+ // Izpišemo naslov in začetek tabele
+ if($table_exists1==0 && $testdata['cnt']!=0) {
+ echo '<p class="bold">'.$lang['srv_archive_test_data_timeline_auto'].$surveyName.':</p>';
+ echo '<table id="testni_vnosi">';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_archive_test_data_date'].'</th>';
+ echo '<th class="right">'.$lang['srv_archive_test_data_count'].'</th>';
+ echo '</tr>';
+
+ $table_exists1=1;
+ }
+
+ echo '<tr>';
+ echo '<td>'.date("d.m.Y",strtotime($testdata['time'])).'</td>';
+ echo '<td class="right">'.$testdata['cnt'].'</td>';
+ echo '</tr>';
+ }
+
+ if($table_exists1==1) {
+ echo '</table>';
+ }
+
+ // Ročni vnosi
+ $str_testdata = "SELECT count(*) as cnt, time_insert as time FROM srv_user WHERE ank_id='".$this->anketa."' AND (testdata='1') GROUP BY day(time_insert)";
+ $query_testdata = sisplet_query($str_testdata);
+ $table_exists2 = 0;
+ while ($testdata = mysqli_fetch_array($query_testdata)) {
+ // Izpišemo naslov in začetek tabele
+ if($table_exists2==0 && $testdata['cnt']!=0) {
+ echo '<p class="bold top16">'.$lang['srv_archive_test_data_timeline_manual'].$surveyName.':</p>';
+ echo '<table id="testni_vnosi">';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_archive_test_data_date'].'</th>';
+ echo '<th class="right">'.$lang['srv_archive_test_data_count'].'</th>';
+ echo '</tr>';
+
+ $table_exists2=1;
+ }
+
+ echo '<tr>';
+ echo '<td>'.date("d.m.Y",strtotime($testdata['time'])).'</td>';
+ echo '<td class="right">'.$testdata['cnt'].'</td>';
+ echo '</tr>';
+ }
+
+ if($table_exists2==1) {
+ echo '</table>';
+ }
}
-
echo '</fieldset>';
}
function arhivi_survey() {
global $lang;
- // Uvoz/izvoz samo ankete - po novem je uvoz pri kreiranju ankete
+ // Izvoz samo ankete
if($_GET['m'] == 'survey'){
echo '<fieldset>';
- echo '<legend>'.$lang['srv_survey_archives_ie_title'].'</legend>';
+ echo '<legend>'.$lang['srv_survey_archives_ie_title'].Help::display('srv_arhiv_vprasalnik').'</legend>';
- echo '<p class="italic">'.$lang['srv_survey_archives_note_survey'].'</p>';
-
- // Izvoz
- echo '<p>';
- echo '<span class="bold">'.$lang['srv_survey_archives_export'].'</span>';
- echo '<br />'.$lang['srv_survey_archives_export_text'];
- echo '<span class="buttonwrapper floatLeft" style="margin-top:3px;" title="'.$lang['srv_survey_archives_export_save'].'"><a class="ovalbutton ovalbutton_orange" href="ajax.php?a=archive_download&anketa='.$this->anketa.'">'.$lang['srv_survey_archives_export_save'].'</a></span>';
- echo '</p>';
-
- echo '<br /><br />';
-
- // Uvoz
- /*echo '<p style="margin-bottom:20px;">';
- echo '<span class="bold">'.$lang['srv_survey_archives_import'].'</span>';
- echo '<br />'.$lang['srv_survey_archives_import_text'];
- echo '<br /><span class="buttonwrapper floatLeft" style="margin-top:3px;" title="'.$lang['srv_survey_archives_import_import'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="$(\'#restore\').toggle(); return false;">'.$lang['srv_survey_archives_import_import'].'</a></span>';
- echo '<br />';
- echo '<form style="display:none" id="restore" action="ajax.php?a=archive_restore" method="post" name="restorefrm" enctype="multipart/form-data" >
- <span style="line-height:18px;">'.$lang['srv_arhiv_datoteka_save_txt2'].':
- <input type="hidden" name="has_data" value="0" />
- <input type="file" name="restore" onchange="document.restorefrm.submit();" /></span>
- <br /><span class="italic">'.$lang['srv_arhiv_datoteka_restore_help'].'</span>
- </form>';
- echo '</p>';*/
-
+ echo '<p>'.$lang['srv_survey_archives_note_survey'].'</p>';
+
+ echo '<div class="button_holder top16 bottom0">';
+ echo '<button class="medium blue" onClick="window.location.href=\'ajax.php?a=archive_download&anketa='.$this->anketa.'\';" >'.$lang['srv_survey_archives_export'].'</button>';
+ echo '</div>';
+
echo '</fieldset>';
}
- // Uvoz/izvoz ankete s podatki - po novem je uvoz pri kreiranju ankete
+
+ // Izvoz ankete s podatki
else{
echo '<fieldset>';
- echo '<legend>'.$lang['srv_survey_archives_ie_data_title'].'</legend>';
-
- echo '<p class="italic">'.$lang['srv_survey_archives_note_survey_data'].'</p>';
-
- // Izvoz
- echo '<p>';
- echo '<span class="bold">'.$lang['srv_survey_archives_export'].'</span>';
- echo '<br />'.$lang['srv_survey_archives_export_text'];
- echo '<span class="buttonwrapper floatLeft" style="margin-top:3px;" title="'.$lang['srv_survey_archives_export_save'].'"><a class="ovalbutton ovalbutton_orange" href="ajax.php?a=archive_download&anketa='.$this->anketa.'&data=true">'.$lang['srv_survey_archives_export_save'].'</a></span>';
- echo '</p>';
-
- echo '<br /><br />';
-
- // Uvoz
- /*echo '<p style="margin-bottom:20px;">';
- echo '<span class="bold">'.$lang['srv_survey_archives_import'].'</span>';
- echo '<br />'.$lang['srv_survey_archives_import_text'];
- echo '<br /><span class="buttonwrapper floatLeft" style="margin-top:3px;" title="'.$lang['srv_survey_archives_import_import'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="$(\'#restore_data\').toggle(); return false;">'.$lang['srv_survey_archives_import_import'].'</a></span>';
- echo '<br />';
- echo '<form style="display:none" id="restore_data" action="ajax.php?a=archive_restore" method="post" name="restoredatafrm" enctype="multipart/form-data" >
- <span style="line-height:18px;">'.$lang['srv_arhiv_datoteka_save_txt2'].':
- <input type="hidden" name="has_data" value="1" />
- <input type="file" name="restore_data" onchange="document.restoredatafrm.submit();" /></span>
- <br /><span class="italic">'.$lang['srv_arhiv_datoteka_restore_help'].'</span>
- </form>';
- echo '</p>';*/
-
+ echo '<legend>'.$lang['srv_survey_archives_ie_data_title'].Help::display('srv_arhiv_podatki').'</legend>';
+
+ echo '<p>'.$lang['srv_survey_archives_note_survey_data'].'</p>';
+
+ echo '<div class="button_holder top16 bottom0">';
+ echo '<button class="medium blue" onClick="window.location.href=\'ajax.php?a=archive_download&anketa='.$this->anketa.'&data=true\';" >'.$lang['srv_survey_archives_export'].'</button>';
+ echo '</div>';
+
echo '</fieldset>';
}
}
@@ -3770,7 +4349,7 @@ class SurveyAdminSettings { if ($anketa > 0)
$this->anketa = $anketa;
- $site = $_GET['site'];
+ $site = isset($_GET['site']) ? $_GET['site'] : 0;
SurveyCopy :: setSrcSurvey($this->anketa);
SurveyCopy :: setSrcConectDb($connect_db);
@@ -3780,7 +4359,7 @@ class SurveyAdminSettings { $napake = SurveyCopy :: getErrors();
- if (count($napake) > 0)
+ if (is_countable($napake) && count($napake) > 0)
print_r($napake);
if (!$new_anketa_id)
@@ -3892,11 +4471,9 @@ class SurveyAdminSettings { echo '</div>';
echo '</span>';
- echo '<br class="clr" />';
-
- if ($_GET['s'] == '1') {
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
}
@@ -3907,6 +4484,10 @@ class SurveyAdminSettings { global $site_url;
global $lang;
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
+
+
SurveySetting::getInstance()->Init($this->anketa);
if (count($_POST) > 0 && (isset($_POST['uporabnost_link']) || isset($_POST['uporabnost_razdeli']))) {
@@ -3938,52 +4519,59 @@ class SurveyAdminSettings { if ($row['uporabnost_link'] == '')
$row['uporabnost_link'] = 'http://';
- echo '<p class="bold">'.$lang['srv_uporabnost_link'].'</p>';
- echo '<p class="red">'.$lang['srv_uporabnost_warning'].'</p>';
- echo '<p>Link: <input type="text" name="uporabnost_link" value="' . $row['uporabnost_link'] . '" style="width:300px"></p>';
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_4_3b'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<p>'.$lang['srv_uporabnost_link'].'</p>';
+ echo '<input type="text" class="large w400" name="uporabnost_link" value="' . $row['uporabnost_link'] . '">';
+ echo '</div>';
$uporabnost_razdeli = SurveySetting::getInstance()->getSurveyMiscSetting('uporabnost_razdeli');
- echo '<p>'.$lang['srv_uporabnost_razdeli'].': <input type="radio" name="uporabnost_razdeli" value="0" '.($uporabnost_razdeli!=1?' checked':'').'>'.$lang['srv_vodoravno'].' <input type="radio" name="uporabnost_razdeli" value="1" '.($uporabnost_razdeli==1?' checked':'').'>'.$lang['srv_navpicno'].' ('.$lang['srv_razdeli_dodatno'].')</p>';
- echo '</fieldset>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_uporabnost_razdeli'].':</span>';
- echo '<br />';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="uporabnost_razdeli_0" name="uporabnost_razdeli" value="0" '.($uporabnost_razdeli!=1?' checked':'').'>';
+ echo '<label for="uporabnost_razdeli_0">'.$lang['srv_vodoravno'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" id="uporabnost_razdeli_1" name="uporabnost_razdeli" value="1" '.($uporabnost_razdeli==1?' checked':'').'>';
+ echo '<label for="uporabnost_razdeli_1">'.$lang['srv_navpicno'].' ('.$lang['srv_razdeli_dodatno'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '<p class="top16">'.$lang['srv_uporabnost_warning'].'</p>';
+
+
+ echo '</fieldset>';
echo '<fieldset><legend>'.$lang['srv_uporabnost_nadaljne'].'</legend>';
- echo '<p class="bold">'.$lang['srv_uporabnost_link_stran'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_uporabnost_link_stran'].'</p>';
$sqlg = sisplet_query("SELECT id, naslov FROM srv_grupa WHERE ank_id = '$this->anketa' ORDER BY vrstni_red ASC");
while ($rowg = mysqli_fetch_array($sqlg)) {
$link = SurveySetting::getInstance()->getSurveyMiscSetting('uporabnost_link_'.$rowg['id']);
if ($link == '')
$link = 'http://';
- echo '<p>'.$rowg['naslov'].': <input type="text" name="uporabnost_link_'.$rowg['id'].'" value="'.$link.'" style="width:300px"></p>';
+
+ echo '<div class="setting_holder">';
+ echo '<p>'.$rowg['naslov'].':</p>';
+ echo '<input type="text" class="large w400" name="uporabnost_link_'.$rowg['id'].'" value="'.$link.'">';
+ echo '</div>';
}
echo '</fieldset>';
- echo '<br class="clr">';
-
- //echo '<p><input type="submit" value="' . $lang['edit'] . '"></p>';
- echo '<span class="floatLeft spaceRight">';
- echo '<div class="buttonwrapper">';
- echo '<a class="ovalbutton ovalbutton_orange btn_savesettings" onclick="document.settingsanketa_'.$this->anketa.'.submit(); return false;" href="#">';
- echo '<span>'.$lang['edit1337'].'</span>';
- echo '</a>';
- echo '</div>';
- echo '</span>';
-
- echo '<br class="clr">';
- echo '<br />';
+ // Gumb shrani
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.'; return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.settingsanketa_'.$this->anketa.'.submit(); return false;">'.$lang['edit1337'].'</button>';
+ echo '</div>';
echo '</form>';
-
- /*echo '<fieldset><legend>'.$lang['srv_upora_dodatno'].'</legend>';
- echo '<p style="width:50%">' . $lang['srv_upora_text'] . '</p>';
- echo '<p><a href="#" onclick="javascript:$(\'#demo\').show(\'slow\'); return false;">'.$lang['srv_primer'].'</a></p>';
- echo '<p id="demo" style="display:none"><img src="img_0/uporabnost.png" /></p>';
- echo '</fieldset>';*/
}
/**
@@ -3994,6 +4582,8 @@ class SurveyAdminSettings { $sdf = SurveyDataFile::get_instance();
$sdf->init($this->anketa);
+ $sdf->prepareFiles();
+
$headFileName = $sdf->getHeaderFileName();
$dataFileName = $sdf->getDataFileName();
$dataFileStatus = $sdf->getStatus();
@@ -4001,15 +4591,17 @@ class SurveyAdminSettings { if ($dataFileStatus== FILE_STATUS_NO_DATA
|| $dataFileStatus == FILE_STATUS_NO_FILE
|| $dataFileStatus == FILE_STATUS_SRV_DELETED){
+ echo '<fieldset><legend>'.$lang['srv_no_data'].'</legend>';
Common::noDataAlert();
+ echo '</fieldset>';
return false;
}
- if ($_GET['m'] == 'excel') {
+ /* if ($_GET['m'] == 'excel') {
echo '<form id="export_excel_form" target="_blank" action="ajax.php?t=export&anketa='.$this->anketa.'&a=doexport&m=excel" method="POST">';
- } else if($_GET['m'] == 'excel_xls') {
+ } */ if($_GET['m'] == 'excel_xls') {
echo '<form id="export_excel_xls_form" target="_blank" action="ajax.php?t=export&anketa='.$this->anketa.'&a=doexport&m=excel_xls" method="POST">';
} else if($_GET['m'] == 'txt') {
- echo '<form id="export_txt_form" target="_blank" action="ajax.php?t=export&anketa='.$this->anketa.'&a=doexport&m=txt" method="POST">';
+ echo '<form id="export_excel_form" target="_blank" action="ajax.php?t=export&anketa='.$this->anketa.'&a=doexport&m=excel" method="POST">';
} else if($_GET['m'] == 'spss') {
echo '<form id="export_spss_form" target="_blank" action="ajax.php?t=export&anketa='.$this->anketa.'&a=doexport&m=spss" method="POST">';
} else if($_GET['m'] == 'sav') {
@@ -4018,134 +4610,212 @@ class SurveyAdminSettings { $row = SurveyInfo::getInstance()->getSurveyRow();
- echo '<div id="div_analiza_filtri_right" class="floatRight export">';
- echo '<ul>';
-
- if($_GET['m'] != 'export_PDF'){
- echo '<li>';
- echo '<span class="as_link gray" id="link_export_setting" onClick="$(\'#fade\').fadeTo(\'slow\', 1); $(\'#div_export_setting_show\').fadeIn(\'slow\'); return false;" title="' . $lang['srv_dsp_link'] . '">' . $lang['srv_dsp_link'] . '</span>';
- echo '</li>';
- }
-
- // profili statusov
- SurveyStatusProfiles :: Init($this->anketa);
- SurveyStatusProfiles :: DisplayLink(false);
-
- # div za profile variabel
- SurveyVariablesProfiles :: Init($this->anketa, $global_user_id);
- SurveyVariablesProfiles :: DisplayLink(false,false);
- SurveyConditionProfiles :: Init($this->anketa, $global_user_id);
- SurveyConditionProfiles::DisplayLink(false);
-
- # div za profile časov
- SurveyTimeProfiles :: Init($this->anketa, $global_user_id);
- SurveyTimeProfiles::DisplayLink(false,true);
-
- echo '</ul>';
- echo '</div>';
-
-
- if($_GET['m'] != 'export_PDF'){
+ //sedaj se prikaze staticno ob vsakem izvozu
+ /* if($_GET['m'] != 'export_PDF'){
if(session_id() == '')
session_start();
- echo '<div id="div_export_setting_show">';
+ echo '<div id="div_export_setting_show" class="divPopUp PopUpNarrow">';
+
+ echo '<h2>'.$lang['settings'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onClick="$(\'#div_export_setting_show\').fadeOut(\'slow\'); $(\'#fade\').fadeOut(\'slow\');return false;">✕</a></div>';
+
+
+ echo '<div class="setting_holder">';
// Izvozi identifikatorje
- echo '<label><input type="radio" name="exportSetting" id="hiddenSystem" value="2"'.
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportSetting" id="hiddenSystem" value="2"'.
((isset($_SESSION['exportHiddenSystem']) && $_SESSION['exportHiddenSystem'] == true) ? ' checked="checked"' : '') .
- ' onchange="exportChangeCheckbox(\'exportHiddenSystem\');"/>'.$lang['srv_export_hidden_system']
- .'</label>';
- echo Help::display('exportSettings');
-
- echo '<br />';
-
+ ' onchange="exportChangeCheckbox(\'exportHiddenSystem\');"/><label for="hiddenSystem">'.$lang['srv_export_hidden_system'];
+ echo Help::display('exportSettings').'</label>';
+ echo '</div>';
+
// Izvozi podatke
- echo '<label><input type="radio" name="exportSetting" id="onlyData" value="0"'.
- ((isset($_SESSION['exportOnlyData']) && $_SESSION['exportOnlyData'] == true) ? ' checked="checked"' : '') .
- ' onchange="exportChangeCheckbox(\'exportOnlyData\');"/>'.$lang['srv_export_only_data']
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportSetting" id="onlyData" value="0"'.
+ ( (isset($_SESSION['exportOnlyData']) && $_SESSION['exportOnlyData'] == true) || (!isset($_SESSION['exportHiddenSystem']) && !isset($_SESSION['exportOnlyData']) && !isset($_SESSION['exportFullMeta'])) ? ' checked="checked"' : '') .
+ ' onchange="exportChangeCheckbox(\'exportOnlyData\');"/><label for="onlyData">'.$lang['srv_export_only_data']
.'</label>';
-
- echo '<br />';
+ echo '</div>';
// Izvozi podatke in parapodatke
- echo '<label><input type="radio" name="exportSetting" id="fullMeta" value="1"'.
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportSetting" id="fullMeta" value="1"'.
((isset($_SESSION['exportFullMeta']) && $_SESSION['exportFullMeta'] == true) ? ' checked="checked"' : '') .
- ' onchange="exportChangeCheckbox(\'exportFullMeta\');"/>'.$lang['srv_export_full_meta']
- .'</label>';
- echo Help::display('srv_export_full_meta');
-
- echo '<br class="clr"/>';
-
- echo '<br />';
-
- echo '<div class="buttonwrapper floatRight"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="$(\'#div_export_setting_show\').fadeOut(\'slow\'); $(\'#fade\').fadeOut(\'slow\');return false;"><span>'.$lang['srv_zapri'] . '</span></a></div>';
+ ' onchange="exportChangeCheckbox(\'exportFullMeta\');"/><label for="fullMeta">'.$lang['srv_export_full_meta'];
+ echo Help::display('srv_export_full_meta').'</label>';
echo '</div>';
- }
+
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" onClick="$(\'#div_export_setting_show\').fadeOut(\'slow\'); $(\'#fade\').fadeOut(\'slow\');return false;">'.$lang['srv_zapri'].'</button>';
+ echo '</div>';
+
+ echo '</div>';
+
+ } */
# v odvisnosti od $_GET['m'] prikazemo podstran
- if (!$_GET['m'] || $_GET['m'] == M_EXPORT_EXCEL) {
+ if ($_GET['m'] == M_EXPORT_EXCEL_XLS) {
- echo '<fieldset><legend>'.$lang['srv_lnk_excel'].'</legend>';
+ echo '<fieldset><legend>'.$lang['srv_lnk_excel_xls'].'</legend>';
+
+ $this->exportSettingsData();
+ echo '<br>';
+
+ /* echo $lang['srv_izvoz_Excel_xls_labels'];
+ echo '<div class="setting_holder">';
+
+ // Izvozi podatke kot stevilske vrednosti
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportLabelsSetting" id="exportCodes" value="0" checked="checked"/>
+ <label for="fullMeta">'.$lang['srv_izvoz_Excel_xls_labels_codes'].'</label>';
+ echo '</div>';
+
+ // Izvozi podatke kot labele
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportLabelsSetting" id="exportLabels" value="1"/>
+ <label for="onlyData">'.$lang['srv_izvoz_Excel_xls_labels_labels'].'</label>';
+ echo '</div>';
- echo $lang['srv_izvoz_Excel_note'];
- echo $lang['srv_izvoz_Excel_note_2'];
-
- echo '<p class="strong">'.$lang['srv_izvoz_Excel_settings'].'</p>';
- echo '<p>';
- echo '<label>'.$lang['srv_expor_excel_cell_delimiter'].'</label>';
- echo '<label><input type="radio" name="export_delimit" id="export_delimit_semicolon" value="0" onchange="excelExportChangeDelimit(); return false;" checked="checked"/>'.$lang['srv_expor_excel_cell_delimiter1'].'</label>';
- echo '<label><input type="radio" name="export_delimit" id="export_delimit_coma" value="1" onchange="excelExportChangeDelimit(); return false;"/>'.$lang['srv_expor_excel_cell_delimiter2'].'</label>';
- echo '</p>';
-
- echo '<p>';
- echo '<div id="replace_export_delimit_semicolon">';
- echo '<span>';
- echo $lang['srv_export_replace1'].' <input type="text" value=";" name="replace_what0[]" id="replace_what_0" size="1">';
- echo $lang['srv_export_replace2'].' <input type="text" value="," name="replace_with0[]" id="replace_with_0" size="1">';
- echo '</span>';
- echo '</div>';
- echo '<div id="replace_export_delimit_comma" class="displayNone">';
- echo '<span>';
- echo $lang['srv_export_replace1'].' <input type="text" value="," name="replace_what1[]" id="replace_what_0" size="1">';
- echo $lang['srv_export_replace2'].' <input type="text" value=";" name="replace_with1[]" id="replace_with_0" size="1">';
- echo '</span>';
echo '</div>';
- echo '</p>';
- echo '<p>';
- echo '<label><input type="checkbox" name="export_labels" id="export_labels" checked="checked" value="1"/>'.$lang['srv_export_texts'].'</label>';
- echo '<p>';
-
+ echo '<br>'; */
+
+ echo $lang['srv_izvoz_Excel_xls_note1'];
+ echo '<div class="button_holder intext">';
+ echo '<button class="medium blue" onclick="doExcelXlsExport(); return false;">'.$lang['srv_izvoz_Excel_xls_file'].'</button>';
+ echo '</div>';
+
+ $this->filterNote();
+
+ echo '<p>'.$lang['srv_izvoz_Excel_xls_prirocnik'].'</p>';
echo '</fieldset>';
-
- } elseif ($_GET['m'] == M_EXPORT_EXCEL_XLS) {
+ }
+ elseif ($_GET['m'] == M_EXPORT_TXT) {
+
+ echo '<fieldset><legend>'.$lang['srv_lnk_excel'].'</legend>';
+
+ $this->exportSettingsData();
+ echo '<br>';
- echo '<fieldset><legend>'.$lang['srv_lnk_excel_xls'].'</legend>';
- echo $lang['srv_izvoz_Excel_xls_note'];
- echo $lang['srv_izvoz_Excel_xls_note_2'];
- echo '</fieldset>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_expor_excel_cell_delimiter'].Help::display('srv_izvozCSV_locitveni').':</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_delimit" id="export_delimit_semicolon" value="0" onchange="excelExportChangeDelimit(1); return false;" checked="checked"/>';
+ echo '<label for="export_delimit_semicolon">'.$lang['srv_expor_excel_cell_delimiter1'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_delimit" id="export_delimit_coma" value="1" onchange="excelExportChangeDelimit(2); return false;"/>';
+ echo '<label for="export_delimit_coma">'.$lang['srv_expor_excel_cell_delimiter2'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<br>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_export_texts'].Help::display('srv_izvozCSV_tekst').':</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_headers" id="export_header_yes" value="1" checked="checked"/>';
+ echo '<label for="export_header_yes">'.$lang['yes'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_headers" id="export_header_no" value="0" />';
+ echo '<label for="export_header_no">'.$lang['no'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<br>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_izvoz_txt_format'].'</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_format" id="export_format_csv" value="1" checked="checked"/>';
+ echo '<label for="export_format_csv">'.$lang['srv_izvoz_txt_format_csv'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="export_format" id="export_format_txt" value="0" />';
+ echo '<label for="export_format_txt">'.$lang['srv_izvoz_txt_format_txt'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<br>';
+
+ echo $lang['srv_izvoz_Excel_note_a'];
+ echo '<div class="button_holder intext">';
+ echo '<button class="medium blue" onclick="doExcelExport(); return false;">'.$lang['srv_izvoz_Excel_file'].'</button>';
+ echo '</div>';
+
+ $this->filterNote();
+
+ echo '<p>'.$lang['srv_izvoz_Excel_note_2'].'</p>';
+
}
elseif ($_GET['m'] == M_EXPORT_SPSS) {
- echo '<fieldset><legend>'.$lang['srv_lnk_spss'].'</legend>';
- echo $lang['srv_izvoz_SPSS_faq'];
- echo $lang['srv_izvoz_SPSS_note'];
+ echo '<fieldset><legend>'.$lang['srv_lnk_spss'].'</legend>';
+
+ $this->exportSettingsData();
+ echo '<br>';
+
+ echo '<p class="bottom16">'.$lang['srv_izvoz_SPSS_faq'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_izvoz_SPSS_note'].'</p>';
+
+
+ echo '<p class="bold">'.$lang['srv_izvoz_step1'].'</p>';
+ echo '<div class="export_indent">';
+ echo '<p>'.$lang['srv_izvoz_step1_SPSS'].'</p>';
+ echo '<div class="button_holder intext">';
+ echo '<button class="medium blue" onclick="doSpssExport(\'yes\'); return false;">'.$lang['srv_izvoz_step1_SPSS_file'].'</button>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<p class="bold">'.$lang['srv_izvoz_step2'].'</p>';
+ echo '<div class="export_indent">';
+ echo '<p>'.$lang['srv_izvoz_step2a_SPSS'].'</p>';
+ echo '<div class="button_holder intext">';
+ echo '<button class="medium blue" onclick="doSpssExport(\'no\'); return false;">'.$lang['srv_izvoz_step2_SPSS_file'].'</button>';
+ echo '</div>';
+ echo '<p class="top16">'.$lang['srv_izvoz_step2b_SPSS'].'</p>';
+ echo '</div>';
+
+ echo '<p class="bold">'.$lang['srv_izvoz_step3'].'</p>';
+ echo '<div class="export_indent">';
+ echo '<ul>';
+ echo '<li>'.$lang['srv_izvoz_step3a_SPSS'].'</li>';
+ echo '<li>'.$lang['srv_izvoz_step3b_SPSS'].'</li>';
+ echo '<li class="no_bullet top16">'.$lang['srv_izvoz_step3c_SPSS'].'</li>';
+ echo '</ul>';
+ echo '</div>';
+
+ echo '<p class="bold">'.$lang['srv_izvoz_step4'].'</p>';
+ echo '<div class="export_indent">';
+ echo '<p>'.$lang['srv_izvoz_step4_SPSS'].'</p>';
+ echo '</div>';
+
+ echo '<p class="bold">'.$lang['srv_izvoz_step5'].'</p>';
+ echo '<div class="export_indent">';
+ echo '<p>'.$lang['srv_izvoz_step5_SPSS'].'</p>';
+ echo '</div>';
+
+ $this->filterNote();
+
echo '</fieldset>';
}
- elseif ($_GET['m'] == M_EXPORT_SAV) {
+ /* elseif ($_GET['m'] == M_EXPORT_SAV) {
echo '<fieldset><legend>'.$lang['srv_lnk_sav'].'</legend>';
- echo $lang['srv_izvoz_SAV_note'];
+ echo $lang['srv_izvoz_SAV_note1'];
+ echo '<div class="button_holder intext">';
+ echo '<button class="medium blue" onclick="doSAVExport(); return false;">'.$lang['srv_izvoz_SAV_file'].'</button>';
+ echo '</div>';
+ echo '<p class="top16">'.$lang['srv_izvoz_SAV_note2a'].'<a href="index.php?anketa=' . $this->anketa . '&a=export&m=spss">'.$lang['srv_izvoz_SAV_note2b'].'</a>'.$lang['srv_izvoz_SAV_note2c'].'</p>';
+
echo '</fieldset>';
- }
- elseif ($_GET['m'] == M_EXPORT_TXT) {
-
- echo '<fieldset><legend>'.$lang['srv_lnk_txt'].'</legend>';
- echo $lang['srv_izvoz_txt_note'];
- echo '</fieldset>';
- }
+ } */
elseif ($_GET['m'] == 'export_PDF') {
$pageBreak = isset($_GET['pageBreak']) ? $_GET['pageBreak'] : 0;
@@ -4208,8 +4878,8 @@ class SurveyAdminSettings { }
/**
* @desc prikaze vnose v anketo
- * /
- function displayVnosi() {//OSTANE
+ */
+ /*function displayVnosi() {//OSTANE
global $lang;
$row = SurveyInfo::getInstance()->getSurveyRow();
if ($_GET['m'] == 'SN_izvozi') {
@@ -4264,6 +4934,66 @@ class SurveyAdminSettings { }
}
*/
+
+ // nastavitve glede katere podatke se naj izvozi
+ private function exportSettingsData(){
+ global $lang;
+ global $global_user_id;
+
+ //pridobi nastavitve za export ankete
+ //kateri podatki so v export se sedaj veze na naketo (0-onlydata, 1-data in paradata, 2-identifikatorji)
+ $sql_export_mode = sisplet_query("SELECT value FROM srv_user_setting_for_survey ".
+ "WHERE sid = '" . $this->anketa . "' AND what='default_export_data_mode' AND uid='$global_user_id'");
+ $export_mode = 0;
+ if($sql_export_mode){
+ $export_mode = mysqli_fetch_assoc($sql_export_mode);
+ $export_mode = isset($export_mode['value']) ? $export_mode['value'] : 0;
+ }
+
+ echo $lang['srv_izvoz_settings_data'];
+
+ echo '<div class="setting_holder">';
+
+ // Izvozi podatke
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportSetting" id="onlyData" value="0"'.
+ ( $export_mode == 0 ? ' checked="checked"' : '') .
+ ' onchange="exportChangeCheckbox();"/><label for="onlyData">'.$lang['srv_export_only_data']
+ .'</label>';
+ echo '</div>';
+
+ // Izvozi podatke in parapodatke
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportSetting" id="fullMeta" value="1"'.
+ ( $export_mode == 1 ? ' checked="checked"' : '') .
+ ' onchange="exportChangeCheckbox();"/><label for="fullMeta">'.$lang['srv_export_full_meta'];
+ echo Help::display('srv_export_full_meta').'</label>';
+ echo '</div>';
+
+ //pridobi header, da vidimo, ce imamo identifikatorje
+ $SDF = SurveyDataFile::get_instance();
+ $SDF->init($this->anketa);
+ $headFileName = $SDF->getHeaderFileName();
+ $HEADERS = unserialize(file_get_contents($headFileName));
+
+ // Izvozi identifikatorje, ce obstajajo
+ if((isset($HEADERS['_settings']['count_system_data_variables']) && (int)$HEADERS['_settings']['count_system_data_variables'] > 0)){
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="exportSetting" id="hiddenSystem" value="2"'.
+ ( $export_mode == 2 ? ' checked="checked"' : '') .
+ ' onchange="exportChangeCheckbox();"/><label for="hiddenSystem">'.$lang['srv_export_hidden_system'];
+ echo Help::display('exportSettings').'</label>';
+ echo '</div>';
+ }
+
+ echo '</div>';
+ }
+
+ private function filterNote(){
+ global $lang;
+ echo '<br><p>'.$lang['srv_izvoz_filter_note'].'</p><br>';
+ }
+
/**
* @desc prikaze podatke v tabeli
*/
@@ -4332,28 +5062,52 @@ class SurveyAdminSettings { global $global_user_id, $admin_type, $lang;
$avtorRow = SurveyInfo::getInstance()->getSurveyRow();
+
+ echo '<p class="bold">'.$lang['srv_dostop_users_list'].'</p>';
// Prikazemo samo userje ki lahko urejajo anketo
if($show_all == 0){
echo ' <input type="hidden" name="dostop_edit" value="1" />' . "\n";
+
+ echo '<table>';
+ echo '<tr>';
+ echo '<th>';
+ //echo '<input type="checkbox" id="user_access_check_all" name="user_access_check_all"></input><label class="empty" for="user_access_check_all"></label>';
+ echo '</th>';
+ echo '<th>' . $lang['srv_dostop_users_username'] . '</th>';
+ echo '<th>' . $lang['srv_dostop_users_email'] . '</th>';
+ echo '<th></th>';
+ echo '</tr>';
$sql1 = sisplet_query("SELECT u.name, u.surname, u.id, u.email FROM users u, srv_dostop d WHERE d.ank_id='$this->anketa' AND d.uid=u.id");
while ($row1 = mysqli_fetch_array($sql1)) {
-
- // Da ga ne pocistimo ce je disablan (sam sebe ne more odstranit in avtorja se ne sme odstranit)
+
+ // Da ga ne pocistimo, ce je disablan (sam sebe ne more odstranit in avtorja se ne sme odstranit)
if($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id'])
echo ' <input type="hidden" name="uid[]" value="' . $row1['id'] . '" />' . "\n";
-
- echo '<div id="div_for_uid_' . $row1['id'] . '" name="dostop_active_uid" class="floatLeft dostop_for_uid">' . "\n";
- echo '<label nowrap for="uid_' . $row1['id'] . '" title="' . $row1['email'] . '">';
- echo '<input type="checkbox" name="uid[]" value="' . $row1['id'] . '" id="uid_' . $row1['id'] . '" checked="checked" '.($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id'] ? ' disabled="disabled"' : '').' autocomplete="off"/>';
- echo $row1['name'] . ($avtorRow['insert_uid'] == $row1['id'] ? ' (' . $lang['author'] . ')' : '') . '</label>' . "\n";
- echo ' <span class="faicon edit small icon-as_link" onclick="javascript:anketa_user_dostop(\''.$row1['id'].'\');"></span>';
- echo '</div>' . "\n";
+
+ echo '<tr id="div_for_uid_' . $row1['id'] . '" name="dostop_active_uid">';
+
+ echo ' <td><input type="checkbox" name="uid[]" value="' . $row1['id'] . '" id="uid_' . $row1['id'] . '" checked="checked" '.($avtorRow['insert_uid'] == $row1['id'] || $global_user_id == $row1['id'] ? ' disabled="disabled"' : '').' autocomplete="off"/><label class="empty" for="uid_' . $row1['id'] . '" title="' . $row1['email'] . '"></label></td>';
+ echo ' <td>'.$row1['name'] . ($avtorRow['insert_uid'] == $row1['id'] ? ' (' . $lang['author'] . ')' : '') .'</td>';
+ echo ' <td>'.$row1['email'].'</td>';
+
+ // Avtor ne rabi ikone za urejanje
+ echo ' <td>';
+ if($avtorRow['insert_uid'] != $row1['id'])
+ echo ' <div class="icon_holder multiple"><a><span class="faicon edit" onclick="javascript:anketa_user_dostop(\''.$row1['id'].'\');"></span></a>';
+ echo ' </td>';
+
+ echo '</tr>';
}
+
+ echo '</table>';
+
+ //echo '<a class="noline undertable" href="#" onClick="________IZBRIS DOSTOPA ZA VSE OZNAČENE____________"><span class="faicon trash empty link-right"></span>'.$lang['srv_dostop_users_removeselected'].'</a>';
+
}
- // Prikazemo vse userje, ki jih lahko uporabnig dodaja
+ // Prikazemo vse userje, ki jih lahko uporabnik dodaja
else{
$sql1 = $this->db_select_users_forLevel($this->anketa);
if ( mysqli_num_rows($sql1) > 0 ) {
@@ -4384,6 +5138,55 @@ class SurveyAdminSettings { }
}
+ // Dodajanje uredniskega dostopa do ankete
+ public function display_add_survey_dostop(){
+ global $lang;
+ global $admin_type;
+
+ echo '<p class="red bottom16">';
+
+ // Admini in managerji lahko dodajo dostop komurkoli
+ if($admin_type == 0 || $admin_type == 1){
+ echo $lang['srv_dostop_adduserstxt_admin'].' '.AppSettings::getInstance()->getSetting('app_settings-app_name').'. ';
+ }
+ // Ostali uporabniki lahko dodajo dostop samo ze registriranim uporabnikom
+ else{
+ echo $lang['srv_dostop_adduserstxt'].' '.AppSettings::getInstance()->getSetting('app_settings-app_name').'! ';
+ }
+
+ // AAI ima poseben link na help
+ if(isAAI()){
+ echo $lang['srv_dostop_adduserstxt_aai_more'];
+ }
+
+ echo '</p>';
+
+ echo '<input type="hidden" name="aktiven" value="1" >';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="addusers">'.$lang['srv_dostop_adduserstxt_email'].'</label>';
+ echo '<textarea name="addusers" id="addusers"></textarea>';
+ echo '</div>';
+
+ echo '<p class="bottom16">'.$lang['srv_dostop_adduserstxt_end'].'</p>';
+
+ //Opcijsko sporočilo
+ echo '<div class="setting_holder">';
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" id="addusers_note_checkbox" onClick="dostopNoteToggle();">';
+ echo '<label for="addusers_note_checkbox">'.$lang['srv_dostop_adduserstxt_note'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<textarea class="displayNone" name="addusers_note" id="addusers_note">'.$lang['srv_dostop_adduserstxt_note_text'].'</textarea>';
+ echo '</div>';
+ echo '</div>';
+
+ // Gumb za dodajanje in posiljanje
+ echo '<div class="button_holder below">';
+ echo '<button class="medium blue" href="#" onclick="dostopAddAccess(); return false;">'.$lang['srv_dostop_addusers_button'].'</button>';
+ echo '</div>';
+ }
+
/**
* @desc Vrne podatke o uporabniku
@@ -4419,7 +5222,7 @@ class SurveyAdminSettings { // polovimo tip ankete
$str_survey_type = sisplet_query("SELECT survey_type FROM srv_anketa WHERE id = '" . $sid . "'");
$row_survey_type = mysqli_fetch_assoc($str_survey_type);
- $this->getSurvey_type = $row_survey_type['survey_type'];
+ $this->getSurvey_type = isset($row_survey_type['survey_type']) ? $row_survey_type['survey_type'] : null;
return $this->getSurvey_type;
}
@@ -4443,18 +5246,18 @@ class SurveyAdminSettings { case 'finish_respondent_language': // respondent ki je zakljucil anketo v drugem jeziku (mu omogocimo nastavljanje custom maila za obvescanje)
if ($isChecked) {
- $p = new Prevajanje($anketa);
+ $p = new Prevajanje($this->anketa);
$p->dostop();
$jeziki = $p->get_all_translation_langs();
if(!empty($jeziki)){
$row = SurveyInfo::getInstance()->getSurveyRow();
- echo '<br />';
foreach($jeziki as $key => $jezik){
- echo '<span class="clr" style="padding-left:20px; line-height:22px;">'.$lang['srv_alert_respondent'].' - '.$jezik;
- echo ' <a href="#" onclick="alert_custom(\'respondent_lang_'.$key.'\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
- echo '</span>';
+ echo '<div class="setting_item respondent_jeziki">';
+ echo '<label>'.$lang['srv_alert_respondent'].' - '.$jezik.'</label>';
+ echo '<a href="#" onclick="alert_custom(\'respondent_lang_'.$key.'\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
+ echo '</div>';
}
}
}
@@ -4463,14 +5266,15 @@ class SurveyAdminSettings { case 'finish_respondent': // respondent ki je zakljucil anketo
if ($isChecked) {
- // preverimo ali obszaja sistemska spremenljivka email če ne jo dodamo
+ // preverimo, ali obstaja sistemska spremenljivka email, če ne jo dodamo
$sqlEmail = sisplet_query("SELECT s.sistem, s.variable, s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.variable='email' AND s.gru_id=g.id AND g.ank_id='$this->anketa'");
$sqlIme = sisplet_query("SELECT s.sistem, s.variable, s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.variable='ime' AND s.gru_id=g.id AND g.ank_id='$this->anketa'");
- // ce sta dodani obe sistemski spremenljivki je fse ok
+ // ce sta dodani obe sistemski spremenljivki, je vse ok
$email_ok = $ime_ok = false;
if ( mysqli_num_rows($sqlEmail) > 0 && mysqli_num_rows($sqlIme) > 0) {
$email_ok = $ime_ok = true;
- } else {
+ }
+ else {
// manjka ena ali obe potrebni sistemski spremenljivki
// email je nujen, zato ga dodamo avtomatsko
@@ -4480,7 +5284,7 @@ class SurveyAdminSettings { if (in_array('email',$sa->alert_add_necessary_sysvar( array('email') , false))) {
$email_ok = true;
}
- // email v tem primeru spremenimo da je viden, ker gre za alert
+ // email v tem primeru spremenimo, da je viden, ker gre za alert
$sqlEmail = sisplet_query("SELECT s.id FROM srv_spremenljivka s, srv_grupa g WHERE s.sistem='1' AND s.variable='email' AND s.gru_id=g.id AND g.ank_id='$this->anketa'");
$rowEmail = mysqli_fetch_array($sqlEmail);
sisplet_query("UPDATE srv_spremenljivka SET visible='1' WHERE id = '$rowEmail[id]'");
@@ -4489,51 +5293,48 @@ class SurveyAdminSettings { $v->spremenljivka = $rowEmail['id'];
$v->set_email($reminder=1);
- } else {
- // email je ze dodan damo tekst za ok
+ }
+ else {
+ // email je ze dodan, damo tekst za ok
$email_ok = true;
}
// preverimo še za ime
if ( mysqli_num_rows($sqlIme) == 0 ) {
-
- } else{
+ }
+ else{
$ime_ok = true;
}
}
-
- if($forma)
- echo '<label for="alert_finish_respondent">'.$lang['srv_alert_anketiranec'].'</label>';
- else
- echo '<label for="alert_finish_respondent">'.$lang['srv_alert_respondent'].'</label>';
+ echo '<input type="checkbox" name="alert_'.$what.'" id="alert_'.$what.'" value="1" onChange="change_alert_respondent(\''.$what.'\', $(this)); $(\'form[name=alertanketa_' . $this->anketa . ']\').submit(); return false;"' . (($isChecked) ? ' checked' : '') . '>';
+ echo '<label for="alert_'.$what.'">'.$lang['srv_alert_respondent'].'</label>';
if ($email_ok && $ime_ok) {
- echo $lang['srv_alert_respondent_note_ok_email_ime'];
- echo ' <img src="icons/icons/accept.png" alt="" vartical-align="middle" />' . "\n\r";
-
- echo ' <a href="#" onclick="alert_custom(\'respondent\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ echo ' <a href="#" onclick="alert_custom(\'respondent\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
$sql1 = sisplet_query("SELECT finish_respondent_if FROM srv_alert WHERE ank_id='$this->anketa'");
$row1 = mysqli_fetch_array($sql1);
echo ' <a href="#" onclick="alert_edit_if(\'2\'); return false;"><span class="faicon if_add" '.($row1['finish_respondent_if']==0?'style=""':'').'></span></a> ';
if ($row1['finish_respondent_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['finish_respondent_if']); }
+
+ echo '<span class="gray">'.$lang['srv_alert_respondent_note_ok_email_ime'].' <span class="faicon fa-check-circle"></span></span>';
} else {
if ($ime_ok) {
// pomeni da email ni ok! napaka
- echo $lang['srv_alert_respondent_note_notok_email'];
+ echo '<span class="red">'.$lang['srv_alert_respondent_note_notok_email'].'</span>';
} else {
- // email je ok, ime ni, uporabnika fprasamo ali hoce se ime
- echo $lang['srv_alert_respondent_note_ok_email'];
-
- echo ' <a href="#" onclick="alert_custom(\'respondent\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ // email je ok, ime ni, uporabnika vprasamo, ali hoce se ime
+ echo '<a href="#" onclick="alert_custom(\'respondent\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
$sql1 = sisplet_query("SELECT finish_respondent_if FROM srv_alert WHERE ank_id='$this->anketa'");
$row1 = mysqli_fetch_array($sql1);
- echo ' <a href="#" onclick="alert_edit_if(\'2\'); return false;"><span class="faicon if_add" '.($row1['finish_respondent_if']==0?'style=""':'').'></span></a> ';
+ echo ' <a href="#" onclick="alert_edit_if(\'2\'); return false;"><span class="faicon if_add" '.($row1['finish_respondent_if']==0?'style=""':'').'></span></a>';
if ($row1['finish_respondent_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['finish_respondent_if']); }
+ echo '<p class="gray top8">'.$lang['srv_alert_respondent_note_ok_email'].'</p>';
+
if(!$forma){
- echo $lang['srv_alert_respondent_note_ime'];
- echo ' <a href="#" onClick="alert_add_necessary_sysvar(\'finish_respondent\', $(this)); return false;"><span class="faicon add icon-blue"></span> '.$lang['srv_alert_respondent_note_link'].'</a>' . "\n\r";
+ echo '<p class="top8"><span class="gray">'.$lang['srv_alert_respondent_note_ime'].'</span>';
+ echo '<a class="noline" href="#" onClick="alert_add_necessary_sysvar(\'finish_respondent\', $(this)); return false;"><span class="faicon add respondent_iconwithlink"></span> '.$lang['srv_alert_respondent_note_link'].'</a></p>';
}
}
}
@@ -4541,20 +5342,16 @@ class SurveyAdminSettings { // preverimo sistemske nastavitve in spremenljivke ime
} else {
- if($forma)
- echo '<label for="alert_finish_respondent">'.$lang['srv_alert_anketiranec'].'</label>';
- else
- echo '<label for="alert_finish_respondent">'.$lang['srv_alert_respondent'].'</label>';
+ echo '<input type="checkbox" name="alert_'.$what.'" id="alert_'.$what.'" value="1" onChange="change_alert_respondent(\''.$what.'\', $(this)); $(\'form[name=alertanketa_' . $this->anketa . ']\').submit(); return false;"' . (($isChecked) ? ' checked' : '') . '>';
+ echo '<label for="alert_'.$what.'">'.$lang['srv_alert_respondent'].'</label>';
}
break;
case 'finish_respondent_cms': // respondent prepoznan iz CMS ko je izpolnil anketo
- //respondent iz cms
- //pri hitrih nastavitvah forme prikazemo drug text
- if($forma)
- echo '<label for="alert_finish_respondent_cms">'.$lang['srv_alert_anketiranec_cms'].'</label>';
- else
- echo '<label for="alert_finish_respondent_cms">'.$lang['srv_alert_respondent_cms'].'</label>';
+
+ //respondent iz cms
+ echo '<input type="checkbox" name="alert_'.$what.'" id="alert_'.$what.'" value="1" onChange="change_alert_respondent(\''.$what.'\', $(this)); change_alert_instruction($(this)); $(\'form[name=alertanketa_' . $this->anketa . ']\').submit(); return false;" ' . (($isChecked) ? ' checked' : '') . '>';
+ echo '<label for="alert_finish_respondent_cms">'.$lang['srv_alert_respondent_cms'].'</label>';
if ($isChecked) {
// preverimo sistemske nastavitve in spremenljivke
@@ -4562,34 +5359,49 @@ class SurveyAdminSettings { //$rowCMS = mysqli_fetch_assoc($sqlCMS);
$rowCMS = SurveyInfo::getInstance()->getSurveyRow();
if ($rowCMS['user_from_cms'] > 0) {
- echo $lang['srv_alert_respondent_cms_note_ok'];
- echo ' <img src="icons/icons/accept.png" alt="" vartical-align="middle" />' . "\n\r";
-
- echo ' <a href="#" onclick="alert_custom(\'respondent_cms\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ echo ' <a href="#" onclick="alert_custom(\'respondent_cms\', \'0\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
$sql1 = sisplet_query("SELECT finish_respondent_cms_if FROM srv_alert WHERE ank_id='$this->anketa'");
$row1 = mysqli_fetch_array($sql1);
echo ' <a href="#" onclick="alert_edit_if(\'3\'); return false;"><span class="faicon if_add" '.($row1['finish_respondent_cms_if']==0?'style=""':'').'></span></a> ';
if ($row1['finish_respondent_cms_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['finish_respondent_cms_if']); }
+ echo '<span class="gray">'.$lang['srv_alert_respondent_cms_note_ok'].' <span class="faicon fa-check-circle"></span></span>';
+
} else {
- echo $lang['srv_alert_respondent_cms_note'];
- echo ' <a href="#" onClick="alert_change_user_from_cms(\'finish_respondent_cms\', $(this)); return false;"><span class="faicon add icon-blue"></span> '.$lang['srv_alert_respondent_cms_note_link'].'</a>' . "\n\r";
+ echo '<p class="top8"><span class="red">'.$lang['srv_alert_respondent_cms_note'].'</spam>';
+ echo '<a class="noline" href="#" onClick="alert_change_user_from_cms(\'finish_respondent_cms\', $(this)); return false;"><span class="faicon add respondent_iconwithlink"></span> '.$lang['srv_alert_respondent_cms_note_link'].'</a></p>';
}
}
break;
- case 'finish_author': // obveščanje ob izpolnjeni anketi
- case 'expire_author': // obveščanje ob poteku ankete
- case 'active_author': // obveščanje ob aktivaciji/deaktivaciej ankete
- case 'delete_author': // obveščanje ob izbrisu ankete
+ case 'finish_author': // obveščanje o izpolnjeni anketi
+ case 'expire_author': // obveščanje o poteku ankete
+ case 'active_author': // obveščanje o aktivaciji/deaktivaciej ankete
+ case 'delete_author': // obveščanje o izbrisu ankete
+
+ // preberemo nastavitve alertov
+ $sqlAlert = sisplet_query("SELECT * FROM srv_alert WHERE ank_id = '$this->anketa'");
+ if (!$sqlAlert)
+ echo mysqli_error($GLOBALS['connect_db']);
+
+ if (mysqli_num_rows($sqlAlert) > 0) {
+ $rowAlert = mysqli_fetch_array($sqlAlert);
+ }
+ else {
+ SurveyAlert::getInstance()->Init($this->anketa, $global_user_id);
+ $rowAlert = SurveyAlert::setDefaultAlertBeforeExpire();
+ }
// avtor ankete
- if($forma)
- echo '<label for="alert_'.$what.'">'.$lang['srv_alert_author2'].'</label>';
- else
+ if($forma) {
+ echo '<input type="checkbox" name="alert_'.$what.'" id="alert_'.$what.'" value="1" onChange="change_alert_respondent(\''.$what.'\', $(this));return false;"' . (($isChecked) ? ' checked' : '') . '>';
+ echo '<label for="alert_'.$what.'">'.$lang['srv_alert_author2'].'</label>';
+ }
+ else {
+ echo '<input type="checkbox" name="alert_'.$what.'" id="alert_'.$what.'" value="1" onChange="change_alert_respondent(\''.$what.'\', $(this));return false;"' . (($isChecked) ? ' checked' : '') . '>';
echo '<label for="alert_'.$what.'">'.$lang['srv_alert_author'].'</label>';
-
+ }
if ($isChecked) {
//$sql = sisplet_query("SELECT insert_uid, edit_uid FROM srv_anketa WHERE id='$this->anketa'");
//$row = mysqli_fetch_assoc($sql);
@@ -4597,8 +5409,6 @@ class SurveyAdminSettings { $row = SurveyInfo::getInstance()->getSurveyRow();
- echo '<br/>';
-
if ($what == 'finish_author')
$db_field = 'alert_complete';
else if ($what == 'expire_author')
@@ -4623,14 +5433,21 @@ class SurveyAdminSettings { $checked = ($row1[$db_field] == '1') ? ' checked="checked" ' : '';
}
- echo '<span class="alert_authors"><input type="checkbox" name="alert_'.$what.'_uid[]" value="' . $row['insert_uid'] . '" id="alert_'.$what.'_uid_' . $row['insert_uid'] . '"' . $checked . ' autocomplete="off"/>' . "\n\r";
- echo '<label for="alert_'.$what.'_uid_' . $row['insert_uid'] . '" title="' . $rowAuthor['email'] . '">' . $rowAuthor['name'] . ' (' . $lang['author'] . ': '.$rowAuthor['email']. ')' . '</label>' . "\n\r";
+ echo '<div class="alert_authors">';
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_'.$what.'_uid[]" value="' . $row['insert_uid'] . '" id="alert_'.$what.'_uid_' . $row['insert_uid'] . '"' . $checked . ' autocomplete="off"/>';
+ echo '<label for="alert_'.$what.'_uid_' . $row['insert_uid'] . '" title="' . $rowAuthor['email'] . '">' . $rowAuthor['name'] . ' (' . $lang['author'] . ': '.$rowAuthor['email']. ')' . '</label>';
+
if ($what == 'finish_author') {
- echo ' <a href="#" onclick="alert_custom(\'author\', \''.$row['insert_uid'].'\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ echo '<span>';
+ echo ' <a href="#" onclick="alert_custom(\'author\', \''.$row['insert_uid'].'\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
echo ' <a href="#" onclick="alert_edit_if(\'1\', \''.$row1['id'].'\'); return false;"><span class="faicon if_add" '.($row1['alert_complete_if']==0?'style=""':'').'></span></a> ';
if ($row1['alert_complete_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['alert_complete_if']); }
+ echo '</span>';
}
- echo '</span>' . "\n\r";
+ echo '</div>';
+
+ echo '</div>';
}
// polovimo avtorja pri ostalih obvestilih
else{
@@ -4639,14 +5456,21 @@ class SurveyAdminSettings { $sql1 = sisplet_query("SELECT *, uid AS id FROM srv_dostop WHERE ank_id='$this->anketa' AND uid='".$row['insert_uid']."'");
$row1 = mysqli_fetch_array($sql1);
- echo '<span class="alert_authors"><input type="checkbox" name="alert_'.$what.'_uid[]" value="' . $row['insert_uid'] . '" id="alert_'.$what.'_uid_' . $row['insert_uid'] . '" checked="checked" disabled="disabled" autocomplete="off"/>' . "\n\r";
- echo '<label for="alert_'.$what.'_uid_' . $row['insert_uid'] . '" title="' . $rowAuthor['email'] . '">' . $rowAuthor['name'] . ' (' . $lang['author'] . ': '.$rowAuthor['email']. ')' . '</label>' . "\n\r";
+ echo '<div class="alert_authors">';
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_'.$what.'_uid[]" value="' . $row['insert_uid'] . '" id="alert_'.$what.'_uid_' . $row['insert_uid'] . '" checked="checked" disabled="disabled" autocomplete="off"/>';
+ echo '<label for="alert_'.$what.'_uid_' . $row['insert_uid'] . '" title="' . $rowAuthor['email'] . '">' . $rowAuthor['name'] . ' (' . $lang['author'] . ': '.$rowAuthor['email']. ')' . '</label>';
+
if ($what == 'finish_author') {
- echo ' <a href="#" onclick="alert_custom(\'author\', \''.$row['insert_uid'].'\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ echo '<span>';
+ echo ' <a href="#" onclick="alert_custom(\'author\', \''.$row['insert_uid'].'\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
echo ' <a href="#" onclick="alert_edit_if(\'1\', \''.$row1['id'].'\'); return false;"><span class="faicon if_add" '.($row1['alert_complete_if']==0?'style=""':'').'></span></a> ';
if ($row1['alert_complete_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['alert_complete_if']); }
+ echo '</span>';
}
- echo '</span>' . "\n\r";
+ echo '</div>';
+
+ echo '</div>';
}
@@ -4657,14 +5481,21 @@ class SurveyAdminSettings { if ($row1['id']) { // se zgodi da je prazno za metauserje
// avtor je vedno chekiran
$checked = ( $row1[$db_field] == '1') ? ' checked="checked"' : '';
- echo '<span class="alert_authors"><input type="checkbox" name="alert_'.$what.'_uid[]" value="' . $row1['id'] . '" id="alert_'.$what.'_uid_' . $row1['id'] . '"' . $checked . ' autocomplete="off"/>' . "\n\r";
- echo '<label for="alert_'.$what.'_uid_' . $row1['id'] . '" title="' . $row1['email'] . '">' . $row1['name'] . ' ('.$row1['email'].')</label>' . "\n\r";
+ echo '<div class="alert_authors">';
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="alert_'.$what.'_uid[]" value="' . $row1['id'] . '" id="alert_'.$what.'_uid_' . $row1['id'] . '"' . $checked . ' autocomplete="off"/>';
+ echo '<label for="alert_'.$what.'_uid_' . $row1['id'] . '" title="' . $row1['email'] . '">' . $row1['name'] . ' ('.$row1['email'].')</label>';
+
if ($what == 'finish_author') {
- echo ' <a href="#" onclick="alert_custom(\'author\', \''.$row1['id'].'\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file_small"></span></a>';
+ echo '<span>';
+ echo ' <a href="#" onclick="alert_custom(\'author\', \''.$row1['id'].'\'); return false;" title="'.$lang['srv_alert_custom'].'"><span class="faicon text_file empty"></span></a>';
echo ' <a href="#" onclick="alert_edit_if(\'1\', \''.$row1['id'].'\'); return false;"><span class="faicon if_add" '.($row1['alert_complete_if']==0?'style=""':'').'></span></a> ';
if ($row1['alert_complete_if']>0) { if ($b==null) $b = new Branching($this->anketa); $b->conditions_display($row1['alert_complete_if']); }
+ echo '</span>';
}
- echo '</span>' . "\n\r";
+ echo '</div>';
+
+ echo '</div>';
}
}
}
@@ -4801,13 +5632,14 @@ class SurveyAdminSettings { }
function anketa_diagnostika_note($diagnostics,$show_link = false) {
global $lang;
+
$diagnostics->printNote($show_link);
-
}
/**
* @desc prikaze dropdown z nastavitvami ankete (globalne, za celo 1ko) -- Prva stran -> Nastavitve -> Sistemske nastavitve
+ * Sistemske nastavitve: mora biti admin da ima dostop
*/
function anketa_nastavitve_system() {
global $lang;
@@ -4816,110 +5648,125 @@ class SurveyAdminSettings { global $admin_type;
global $global_user_id;
- /* ** Sistemske nastavitve: mora biti admin da ima dostop *** */
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
- echo '<div id="anketa_edit">' . "\n\r";
- if ($admin_type == 0) {
+ // Ni admin - nima pravic
+ if ($admin_type != 0) {
- echo '<form name="settingsanketa" action="ajax.php?a=editanketasettings&m=system" method="post" autocomplete="off">' . "\n\r";
- echo ' <input type="hidden" name="anketa" value="' . $this->anketa . '" />' . "\n\r";
- echo ' <input type="hidden" name="grupa" value="' . $this->grupa . '" />' . "\n\r";
- echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n\r";
- echo ' <input type="hidden" name="submited" value="1" />' . "\n\r";
+ echo '<div id="anketa_edit">';
+ echo $lang['srv_settingsSystemNoRights'];
+ echo '</div>';
- echo '<fieldset>';
- echo '<legend>' . $lang['settings'] . '</legend>';
-
- $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyDostop'");
- list ($SurveyDostop) = mysqli_fetch_row($result);
- $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyCookie'");
- list ($SurveyCookie) = mysqli_fetch_row($result);
- $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyExport'");
- list ($SurveyExport) = mysqli_fetch_row($result);
- $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyForum'");
- list ($SurveyForum) = mysqli_fetch_row($result);
-
- echo '<span class="nastavitveSpan1" ><label>' . $lang['SurveyDostop'] . ':</label></span>';
- ?>
- <select name="SurveyDostop">
- <option value="0" <?=($SurveyDostop=='0'?"SELECTED":"") ?>><?=$lang['forum_admin']?></option>
- <option value="1" <?=($SurveyDostop=='1'?"SELECTED":"") ?>><?=$lang['forum_manager']?></option>
- <option value="2" <?=($SurveyDostop=='2'?"SELECTED":"") ?>><?=$lang['forum_clan']?></option>
- <option value="3" <?=($SurveyDostop=='3'?"SELECTED":"") ?>><?=$lang['forum_registered']?></option>
- </select>
- <br />
- <?php
-
-
- echo '<span class="nastavitveSpan1" ><label>' . $lang['SurveyCookie'] . ':</label></span>';
- ?>
- <select name="SurveyCookie">
- <option value="-1" <?=($SurveyCookie=='-1'?"SELECTED":"") ?>><?=$lang['without']?></option>
- <option value="0" <?=($SurveyCookie=='0'?"SELECTED":"") ?>><?=$lang['srv_cookie_0']?></option>
- <option value="1" <?=($SurveyCookie=='1'?"SELECTED":"") ?>><?=$lang['srv_cookie_1']?></option>
- <option value="2" <?=($SurveyCookie=='2'?"SELECTED":"") ?>><?=$lang['srv_cookie_2']?></option>
- </select>
- <br />
- <?php
-
-
- echo '<span class="nastavitveSpan1" ><label>' . $lang['SurveyExport'] . ':</label></span>';
- ?>
- <select name="SurveyExport">
- <option value="0" <?=($SurveyExport=='0'?"SELECTED":"") ?>><?=$lang['forum_admin']?></option>
- <option value="1" <?=($SurveyExport=='1'?"SELECTED":"") ?>><?=$lang['forum_manager']?></option>
- <option value="2" <?=($SurveyExport=='2'?"SELECTED":"") ?>><?=$lang['forum_clan']?></option>
- <option value="3" <?=($SurveyExport=='3'?"SELECTED":"") ?>><?=$lang['forum_registered']?></option>
- </select>
- <br />
- <?php
-
- echo '<span class="nastavitveSpan1" ><label>' . $lang['SurveyForum'] . ':</label></span>';
- ?>
- <select name="SurveyForum">
- <?
- echo '<option value="0">'.$lang['without'].'</option>';
- $sqlf = sisplet_query("SELECT id, naslov FROM forum WHERE parent = '0'");
- while ($rowf = mysqli_fetch_array($sqlf)) {
- echo '<option value="'.$rowf['id'].'"'.($SurveyForum==$rowf['id']?' selected':'').'>'.$rowf['naslov'].'</option>';
- }
- ?>
- </select>
- </fieldset>
+ return;
+ }
- <?php
- echo '<fieldset>';
- echo '<legend>' . $lang['srv_edithelp'] . '</legend>';
-
- echo '<span class="nastavitveSpan1" ><label>' . $lang['srv_edithelp'] . ' '.Help::display('srv_window_help').': </label></span>';
- Help :: edit_toggle();
-
- echo '</fieldset>';
- //echo ' <p><input type="submit" value="' . $lang['edit4'] . '" onclick="document.settingsanketa.submit();" /></p>' . "\n\r";
- echo ' </form>';
-
-
- $smv = new SurveyMissingValues();
- $smv->SystemFilters();
-
-
- // save gumb
- echo ' <div class="buttonwrapper floatLeft spaceLeft"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa.submit();"><span>'.$lang['edit1337'] . '</span></a></div>';
-
- echo '<span class="clr"></span>';
-
- // div za prikaz uspešnosti shranjevanja
- if ($_GET['s'] == '1') {
- echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
- }
+ echo '<div id="anketa_edit">';
- } else {
- echo $lang['srv_settingsSystemNoRights'];
- }
- echo '</div>' . "\n\r";
-
+ echo '<form name="settingsanketa" action="ajax.php?a=editanketasettings&m=system" method="post" autocomplete="off">';
+
+ echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />';
+ echo ' <input type="hidden" name="submited" value="1" />';
+
+
+ // SISTEMSKE NASTAVITVE (prej v settings_optional.php)
+ echo '<fieldset><legend>'.$lang['as_basic'].'</legend>';
+
+ echo '<div class="osnovne_nastavitve">';
+
+ AppSettings::getInstance()->displaySettingsGroup('basic');
+
+ // Kdo lahko ureja ankete
+ echo '<div class="osnovne_nastavitve_single">';
+
+ echo '<label>' . $lang['SurveyDostop'] . ':</label>';
+
+ $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyDostop'");
+ list ($SurveyDostop) = mysqli_fetch_row($result);
+
+ echo '<select class="dropdown" name="SurveyDostop">';
+ echo ' <option value="0" '.($SurveyDostop=='0'?"SELECTED":"").'>'.$lang['forum_admin'].'</option>';
+ echo ' <option value="1" '.($SurveyDostop=='1'?"SELECTED":"").'>'.$lang['forum_manager'].'</option>';
+ echo ' <option value="2" '.($SurveyDostop=='2'?"SELECTED":"").'>'.$lang['forum_clan'].'</option>';
+ echo ' <option value="3" '.($SurveyDostop=='3'?"SELECTED":"").'>'.$lang['forum_registered'].'</option>';
+ echo '</select>';
+
+ echo '</div>';
+
+ // Default trajanje piskotka
+ echo '<div class="osnovne_nastavitve_single">';
+ echo '<label>' . $lang['SurveyCookie'] . ':</label>';
+
+ $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyCookie'");
+ list ($SurveyCookie) = mysqli_fetch_row($result);
+
+ echo '<select class="dropdown" name="SurveyCookie">';
+ echo ' <option value="-1" '.($SurveyCookie=='-1'?"SELECTED":"").'>'.$lang['without'].'</option>';
+ echo ' <option value="0" '.($SurveyCookie=='0'?"SELECTED":"").'>'.$lang['srv_cookie_0'].'</option>';
+ echo ' <option value="1" '.($SurveyCookie=='1'?"SELECTED":"").'>'.$lang['srv_cookie_1'].'</option>';
+ echo ' <option value="2" '.($SurveyCookie=='2'?"SELECTED":"").'>'.$lang['srv_cookie_2'].'</option>';
+ echo '</select>';
+
+ echo '</div>';
+
+ echo '</div>';
+
+ echo '</fieldset>';
+
+
+ // INFO
+ echo '<fieldset><legend>'.$lang['as_info'].'</legend>';
+ echo '<div class="osnovne_nastavitve">';
+ AppSettings::getInstance()->displaySettingsGroup('info');
+ echo '</div>';
+ echo '</fieldset>';
+
+
+ // OMEJITVE
+ echo '<fieldset><legend>'.$lang['as_limits'].'</legend>';
+ echo '<div class="osnovne_nastavitve">';
+ AppSettings::getInstance()->displaySettingsGroup('limits');
+ echo '</div>';
+ echo '</fieldset>';
+
+
+ // SMTP NASTAVITVE
+ echo '<fieldset><legend>'.$lang['as_smtp'].'</legend>';
+ echo '<div class="osnovne_nastavitve">';
+ AppSettings::getInstance()->displaySettingsGroup('smtp');
+ echo '</div>';
+ echo '</fieldset>';
+
+
+ // MODULI
+ echo '<fieldset><legend>'.$lang['as_modules'].'</legend>';
+ echo '<div class="osnovne_nastavitve">';
+ AppSettings::getInstance()->displaySettingsGroup('modules');
+ echo '</div>';
+ echo '</fieldset>';
+
+
+ /* Missingi - zakomentirano, prenova po redizajnu
+ $smv = new SurveyMissingValues();
+ $smv->SystemFilters();
+ */
+
+
+ // save gumb
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.settingsanketa.submit();">'.$lang['edit1337'].'</button>';
+ echo '</div>';
+
+ // div za prikaz uspešnosti shranjevanja
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
+ echo '<div id="success_save"></div>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
+ }
+
+
+ echo '</div>';
}
/**
@@ -4928,71 +5775,78 @@ class SurveyAdminSettings { */
function anketa_nastavitve_predvidenicasi () {
global $lang;
-
+ global $site_url;
+
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
+
echo '<div id="anketa_edit">';
- echo $lang['srv_predvidenicasi_help'];
-
echo '<form name="timinganketa" method="post" action="ajax.php?a=editanketasettings&m=predvidenicasi">';
- echo '<fieldset><legend>'.$lang['srv_stran'].'</legend>';
- echo '<p>'.$lang['srv_timing_page'].': <input type="text" name="timing_stran" value="'.GlobalMisc::getMisc('timing_stran').'" /> s</p>';
- echo '</fieldset>';
-
- echo '<fieldset><legend>'.$lang['srv_vprasanja'].'</legend>';
- echo '<table style="width:100%">';
- echo '<tr><td></td><td>'.$lang['srv_timing_vprasanje'].'</td><td>'.$lang['srv_timing_kategorija'].'</td><td>'.$lang['srv_timing_kategorija_max'].'</td></tr>';
- for ($tip=1; $tip<= 21; $tip++) { if ($tip <= 8 || $tip >= 16) {
+ echo '<fieldset><legend>'.$lang['srv_testiranje_predvidenicas'].'</legend>';
+
+ echo '<p class="bottom16">'.$lang['srv_predvidenicasi_help'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<label>'.$lang['srv_timing_page'].'</label>';
+ echo '<span><input type="text" class="text large w200" name="timing_stran" value="'.GlobalMisc::getMisc('timing_stran').'" />  s</span>';
+ echo '</div>';
+
+ echo '<p class="top16 bottom16">'.$lang['srv_predvidenicasi_note'].'</p>';
+
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
+
+ echo '<table id="timinganketa_table">';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_question_type'].'</th>';
+ echo '<th>'.$lang['srv_timing_vprasanje'].'</th>';
+ echo '<th>'.$lang['srv_timing_kategorija'].'</th>';
+ echo '<th>'.$lang['srv_timing_kategorija_max'].'</th>';
+ echo '</tr>';
- echo '<tr><th align="left">'.$lang['srv_vprasanje_tip_'.$tip].'</th>';
- echo '<td><input type="text" name="timing_vprasanje_'.$tip.'" value="'.GlobalMisc::getMisc('timing_vprasanje_'.$tip).'" /> s</td>';
+ for ($tip=1; $tip<= 21; $tip++) {
- if ($tip<=3 || $tip==6 || $tip==16 || $tip==17 || $tip==18 || $tip==19 || $tip==20)
- echo '<td><input type="text" name="timing_kategorija_'.$tip.'" value="'.GlobalMisc::getMisc('timing_kategorija_'.$tip).'" /> s</td>';
-
- if ($tip==3){
- $kategorija_max = GlobalMisc::getMisc('timing_kategorija_max_'.$tip);
- echo '<td><input type="text" name="timing_kategorija_max_'.$tip.'" value="'.GlobalMisc::getMisc('timing_kategorija_max_'.$tip).'" /> s'
- /*. '<select name="timing_kategorija_max_'.$tip.'" value="'.GlobalMisc::getMisc('timing_kategorija_max_'.$tip).'" >'
- . '<option value="1" '. ($kategorija_max == 1 ? 'selected' : '') .'>1</option>'
- . '<option value="2" '. ($kategorija_max == 2 ? 'selected' : '') .'>2</option>'
- . '<option value="3" '. ($kategorija_max == 3 ? 'selected' : '') .'>3</option>'
- . '<option value="5" '. ($kategorija_max == 5 ? 'selected' : '') .'>5</option>'
- . '<option value="7" '. ($kategorija_max == 7 ? 'selected' : '') .'>7</option>'
- . '<option value="10" '. ($kategorija_max == 10 ? 'selected' : '') .'>10</option>'
- . '<option value="15" '. ($kategorija_max == 15 ? 'selected' : '') .'>15</option>'
- . '<option value="20" '. ($kategorija_max == 20 ? 'selected' : '') .'>20</option>'
- . '<option value="0" '. ($kategorija_max == 0 ? 'selected' : '') .'>'. $lang['all2'] .'</option>'
- . '</select>'*/
- . '</td>';
- }
- echo '</tr>';
-
- } }
+ if ($tip <= 8 || $tip >= 16) {
+ echo '<tr>';
+ echo '<td class="left">'.$lang['srv_vprasanje_tip_'.$tip].'</td>';
+ echo '<td class="nowrap"><input type="text" name="timing_vprasanje_'.$tip.'" value="'.GlobalMisc::getMisc('timing_vprasanje_'.$tip).'" />  s</td>';
+
+ if ($tip<=3 || $tip==6 || $tip==16 || $tip==17 || $tip==18 || $tip==19 || $tip==20)
+ echo '<td class="nowrap"><input type="text" name="timing_kategorija_'.$tip.'" value="'.GlobalMisc::getMisc('timing_kategorija_'.$tip).'" />  s</td>';
+ else
+ echo '<td></td>';
+
+ if ($tip==3){
+ $kategorija_max = GlobalMisc::getMisc('timing_kategorija_max_'.$tip);
+ echo '<td class="nowrap"><input type="text" name="timing_kategorija_max_'.$tip.'" value="'.GlobalMisc::getMisc('timing_kategorija_max_'.$tip).'" />  s</td>';
+ }
+ else
+ echo '<td></td>';
+
+ echo '</tr>';
+
+ }
+ }
echo '</table>';
- echo '</fieldset>';
-
- echo '<div class="buttonwrapper floatLeft spaceLeft">';
- echo '<a class="ovalbutton ovalbutton_orange btn_savesetting" onclick="document.timinganketa.submit();"><span>'.$lang['edit1337'].'</span></a>';
+
echo '</div>';
-
- echo '<br />';
+ echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.'; return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.timinganketa.submit();">'.$lang['edit1337'].'</button>';
+ echo '</div>';
echo '</form>';
echo '</div>';
}
-
- /** prikaze div da so nastavitve shranjene in ga nato skrije
- *
- */
- function displaySuccessSave() {
- global $lang;
- echo $lang['srv_success_save'];
- }
-
function tabTestiranje () {
global $lang;
@@ -5022,20 +5876,20 @@ class SurveyAdminSettings { global $lang;
$expected_time = array();
- $expected_time_block = array();
- $block_labels_by_number = array();
+ $expected_time_block = array();
+ $block_labels_by_number = array();
$expected_vprasanja = array();
$verjetnost = array();
- $verjetnost_block = array();
+ $verjetnost_block = array();
- //from php 7.2 this helps to round numbers calculated in bcmod() - without it, it always rounds down to int
- bcscale(1);
+ //from php 7.2 this helps to round numbers calculated in bcmod() - without it, it always rounds down to int
+ bcscale(1);
$sql = sisplet_query("SELECT introduction FROM srv_anketa WHERE id = '$this->anketa'");
$row = mysqli_fetch_array($sql);
+ $introduction = isset($row['introduction']) ? $row['introduction'] : $lang['srv_intro'];
+ $expected_vprasanja[0][0] = strlen(strip_tags($introduction)) * GlobalMisc::getMisc('timing_vprasanje_5') / 100;
- // nagovor racunamo kot da gre za labelo
- $expected_vprasanja[0][0] = strlen(strip_tags($row['introduction'])) * GlobalMisc::getMisc('timing_vprasanje_5') / 100;
$expected_vprasanja[0][1] = 1;
$expected_vprasanja[0][2] = $lang['srv_vprasanje_tip_5'];
$expected_vprasanja[0][3] = $lang['srv_intro_label'];
@@ -5043,7 +5897,7 @@ class SurveyAdminSettings { $expected_time[0][0] = $expected_vprasanja[0][0] + GlobalMisc::getMisc('timing_stran');
$expected_time[0][1] = $expected_time[0][0];
- $block_spr_data = $this->get_block_data_by_spr_id();
+ $block_spr_data = $this->get_block_data_by_spr_id();
$sql = sisplet_query("SELECT id, naslov, vrstni_red FROM srv_grupa g WHERE g.ank_id='$this->anketa' ORDER BY g.vrstni_red ASC");
while ($row = mysqli_fetch_array($sql)) {
@@ -5058,62 +5912,77 @@ class SurveyAdminSettings { $expected_vprasanja[$row1['id']][1] = $this->vprasanje_verjetnost($row1['id']);
$expected_vprasanja[$row1['id']][2] = strip_tags($row1['naslov']);
$expected_vprasanja[$row1['id']][3] = strip_tags($row['naslov']);
- $expected_vprasanja[$row1['id']][4] = strip_tags($block_spr_data[$row1['id']]['label']);
+
+ if(isset($block_spr_data[$row1['id']]['label']))
+ $expected_vprasanja[$row1['id']][4] = strip_tags($block_spr_data[$row1['id']]['label']);
+ else
+ $expected_vprasanja[$row1['id']][4] = '';
$expected_time[$row['vrstni_red']][0] += $expected_vprasanja[$row1['id']][0] * $expected_vprasanja[$row1['id']][1]; // dejanski
$expected_time[$row['vrstni_red']][1] += $expected_vprasanja[$row1['id']][0]; // bruto - z vsemi vprasanji
- if ( $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']])
+ if (isset($verjetnost[$row['vrstni_red']]) && $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']])
$verjetnost[$row['vrstni_red']] = $expected_vprasanja[$row1['id']][1];
}
- $expected_time[$row['vrstni_red']][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost[$row['vrstni_red']]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani)
- $expected_time[$row['vrstni_red']][1] += GlobalMisc::getMisc('timing_stran');
+ if(isset($verjetnost[$row['vrstni_red']]))
+ $expected_time[$row['vrstni_red']][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost[$row['vrstni_red']]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani)
+
+ $expected_time[$row['vrstni_red']][1] += GlobalMisc::getMisc('timing_stran');
}
- $sql = sisplet_query("SELECT * FROM srv_if as bl LEFT JOIN srv_branching as br ON br.parent = bl.id WHERE bl.enabled='0' AND bl.tip='1' AND br.ank_id = '$this->anketa' ORDER BY bl.number ASC, br.vrstni_red ASC");
- $last_block_st = -1;
+ $sql = sisplet_query("SELECT * FROM srv_if as bl LEFT JOIN srv_branching as br ON br.parent = bl.id WHERE bl.enabled='0' AND bl.tip='1' AND br.ank_id = '$this->anketa' ORDER BY bl.number ASC, br.vrstni_red ASC");
+ $last_block_st = -1;
while ($row = mysqli_fetch_array($sql)) {
- $new_block = $last_block_st != $row['number'];
- if($new_block){
- $last_block_st = $row['number'];
- $label = $row['label'] ? $row['label']: $lang['srv_blok'].' '.$last_block_st;
- $block_labels_by_number[$last_block_st] = $label;
- $expected_time_block[$last_block_st-1][0] = 0;
- $expected_time_block[$last_block_st-1][1] = 0;
- }
-
- if(!$row['element_if']){
- $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row['element_spr']][0] * $expected_vprasanja[$row['element_spr']][1]; // dejanski
- $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row['element_spr']][0]; // bruto - z vsemi vprasanji
-
- if ( $expected_vprasanja[$row['element_spr']][1] > $verjetnost_block[$last_block_st-1])
- $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row['element_spr']][1];
- }
- else{
- $sql1 = sisplet_query("SELECT * FROM srv_branching WHERE parent='".$row['element_if']."' ORDER BY vrstni_red ASC");
- while ($row1 = mysqli_fetch_array($sql1)) {
- $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row1['element_spr']][0] * $expected_vprasanja[$row1['element_spr']][1]; // dejanski
- $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row1['element_spr']][0]; // bruto - z vsemi vprasanji
- $expected_vprasanja[$row1['element_spr']][4] = $label;
-
- if ( $expected_vprasanja[$row1['element_spr']][1] > $verjetnost_block[$last_block_st-1])
- $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row1['element_spr']][1];
- }
- }
-
- if($new_block){
- $expected_time_block[$last_block_st-1][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost_block[$last_block_st-1]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani)
- $expected_time_block[$last_block_st-1][1] += GlobalMisc::getMisc('timing_stran');
- }
+
+ $new_block = $last_block_st != $row['number'];
+
+ if($new_block){
+ $last_block_st = $row['number'];
+ $label = $row['label'] ? $row['label']: $lang['srv_blok'].' '.$last_block_st;
+ $block_labels_by_number[$last_block_st] = $label;
+ $expected_time_block[$last_block_st-1][0] = 0;
+ $expected_time_block[$last_block_st-1][1] = 0;
+ }
+
+ if(!$row['element_if']){
+ $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row['element_spr']][0] * $expected_vprasanja[$row['element_spr']][1]; // dejanski
+ $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row['element_spr']][0]; // bruto - z vsemi vprasanji
+
+ if ( !isset($verjetnost_block[$last_block_st-1]) || $expected_vprasanja[$row['element_spr']][1] > $verjetnost_block[$last_block_st-1])
+ $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row['element_spr']][1];
+ }
+ else{
+ $sql1 = sisplet_query("SELECT * FROM srv_branching WHERE parent='".$row['element_if']."' ORDER BY vrstni_red ASC");
+ while ($row1 = mysqli_fetch_array($sql1)) {
+ if(array_key_exists($last_block_st, $expected_time_block)){
+ $expected_time_block[$last_block_st-1][0] += $expected_vprasanja[$row1['element_spr']][0] * $expected_vprasanja[$row1['element_spr']][1]; // dejanski
+ $expected_time_block[$last_block_st-1][1] += $expected_vprasanja[$row1['element_spr']][0]; // bruto - z vsemi vprasanji
+ $expected_vprasanja[$row1['element_spr']][4] = $label;
+
+ if ( !isset($verjetnost_block[$last_block_st-1]) || $expected_vprasanja[$row1['element_spr']][1] > $verjetnost_block[$last_block_st-1])
+ $verjetnost_block[$last_block_st-1] = $expected_vprasanja[$row1['element_spr']][1];
+ }
+ }
+ }
+
+ if($new_block){
+ $expected_time_block[$last_block_st-1][0] += GlobalMisc::getMisc('timing_stran') * $verjetnost_block[$last_block_st-1]; // pri dejanskem trajanju strani upostevamo verjetnost najverjetnejsega vprasanja na strani (stran se pojavi z najvisjo verjetnostjo vseh vprasanj na strani)
+ $expected_time_block[$last_block_st-1][1] += GlobalMisc::getMisc('timing_stran');
+ }
}
// izpis za strani
$max = 0;
$total = 0;
+ $total_brez_pogojev = 0;
foreach ($expected_time AS $key => $val) {
- if ($val[1] > $max) $max = $val[1];
+
+ if ($val[1] > $max)
+ $max = $val[1];
+
$total += $val[0];
+ $total_brez_pogojev += $val[1];
}
if ($max == 0) return;
@@ -5121,46 +5990,58 @@ class SurveyAdminSettings { return $total;
}
- $skupni_cas = (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s';
+ $skupni_cas = (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total, 60), 0).'<span class="time_text">s</span>';
+ $skupni_cas_brez_pogojev = (bcdiv($total_brez_pogojev, 60, 0)>0?bcdiv($total_brez_pogojev, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total_brez_pogojev, 60), 0).'<span class="time_text">s</span>';
if ($samo_izracunaj_skupini_cas == 1)
return $skupni_cas;
- echo '<div class="clr"></div>';
-
echo '<fieldset><legend>'.$lang['srv_total_trajanje'].'</legend>';
- echo '<p>'.$lang['srv_dejansko_trajanje'].': <b>'.$skupni_cas.'</b></p>';
+ echo '<p class="semi-bold">'.$lang['srv_dejansko_trajanje'].':</p>';
+ echo '<p>'.$skupni_cas.'</p>';
echo '</fieldset>';
- echo '<br />';
-
echo '<fieldset><legend>'.$lang['srv_casi_po_straneh'].'</legend>';
- echo '<table style="width:100%">';
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th>'.$lang['srv_casi_po_straneh_stran'].'</th>';
+ echo '<th colspan="2">'.$lang['srv_neto_t_cas'].' / '.$lang['srv_bruto_t_cas'].'</th>';
+ echo '</tr>';
+
foreach ($expected_time AS $vrstni_red => $time) {
$sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$vrstni_red' AND ank_id = '$this->anketa'");
$row = mysqli_fetch_array($sql);
+ $naslov = isset($row['naslov']) && $row['naslov'] != '' ? $row['naslov'] : $lang['srv_intro_label'];
echo '<tr>';
- echo '<th style="text-align:left; padding: 0 20px 0 0" nowrap>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</th>';
-
- echo '<td style="width:100%">';
- echo ' <div class="graph_db" style="text-align: right; float: left; width: '.($time[0]/$max*85).'%"> </div>';
+ echo '<td>'.$naslov.'</td>';
+
+ echo '<td class="right time">';
+ echo ($time[0]<60?round($time[0],1).'<span class="time_text">s</span> ':round($time[0]/60,1).'<span class="time_text">min</span> ').'/ <span class="gray">'.($time[1]<60?round($time[1],1).'<span class="time_text">s</span> ':round($time[1]/60,1).'<span class="time_text">min</span> ').'</span>';
+ echo '</td>';
+
+ echo '<td class="graph_cell">';
+ echo '<div class="graph_cell">';
+
+ echo '<div class="graph_full" style="width: '.($time[0]/$max*85).'%"></div>';
if ((($time[1]-$time[0])/$max*85) > 0)
- echo ' <div class="graph_lb" style="border-left: 0; text-align: right; float: left; width: '.(($time[1]-$time[0])/$max*85).'%"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.($time[0]<60?round($time[0],1).'s ':round($time[0]/60,1).'min ').'<span style="color:gray">/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').'</span></span>';
+ echo ' <div class="graph_empty" style="width: '.(($time[1]-$time[0])/$max*85).'%"></div>';
+
+ echo '</div>';
echo '</td>';
echo '</tr>';
}
- echo '<tr><td colspan="3" style="border-bottom:1px solid #E4E4F9"></td></tr>';
- echo '<tr><td></td><th style="text-align:left; padding-right: 20px" nowrap>'.$lang['srv_anl_suma1'].': '.(bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s</th></tr>';
-
+ echo '<tr class="semi-bold"><td>'.$lang['srv_casi_po_vprasanjih_skupaj'].'</td><td class="right time">'.$skupni_cas.' / <span class="gray">'.$skupni_cas_brez_pogojev.'</span></td><td></td></tr>';
echo '</table>';
- echo '<p><div class="graph_db" style="float: left; width: 11px"> </div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_neto_t_cas'].'</span>';
- echo '<div class="graph_lb" style="float: left; width: 11px"> </div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_bruto_t_cas'].'</span></p>';
+ echo '<div class="tabela_trajanje_legenda">';
+ echo '<div class="graph_full legend"></div><span class="legend"> '.$lang['srv_neto_t_cas'].'</span>';
+ echo '<div class="graph_empty legend"></div><span class="legend"> '.$lang['srv_bruto_t_cas'].'</span>';
+ echo '</div>';
echo '</fieldset>';
@@ -5176,15 +6057,21 @@ class SurveyAdminSettings { $prevstran = false;
- echo '<br />';
-
echo '<fieldset><legend>'.$lang['srv_casi_po_vprasanjih_strani'].'</legend>';
- echo '<table style="width:100%">';
- echo '<tr><td></td><th>'.$lang['srv_bruto_v_cas'].'</th><th>'.$lang['srv_verjetnost_pojavitve'].'</th><th>'.$lang['srv_neto_v_cas'].'</th></tr>';
+
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th>'.$lang['srv_casi_po_straneh_stran'].'/'.$lang['srv_casi_po_vprasanjih_vprasanje'].'</th>';
+ echo '<th>'.$lang['srv_bruto_v_cas'].'</th>';
+ echo '<th>'.$lang['srv_verjetnost_pojavitve'].'</th>';
+ echo '<th colspan="2">'.$lang['srv_neto_v_cas'].'/'.$lang['srv_bruto_v_cas_long'].'</th>';
+ echo '</tr>';
+
foreach ($expected_vprasanja AS $vprasanje) {
if (!$prevstran || $prevstran != $vprasanje[3]) {
- echo '<tr><th style="text-align:left; border-bottom:1px solid #E4E4F9; padding-top:10px" colspan="5">'.$vprasanje[3].'</th></tr>';
+ echo '<tr><td class="semi-bold" colspan="5">'.$vprasanje[3].'</td></tr>';
$prevstran = $vprasanje[3];
}
@@ -5192,102 +6079,156 @@ class SurveyAdminSettings { $verjetnost = $vprasanje[1];
$neto = $bruto * $verjetnost;
- echo '<tr><td align="left"><span title="'.$vprasanje[2].'">'.skrajsaj($vprasanje[2], 30).'</span></td><td align="center">'.round($bruto, 1).'s</td><td align="center">'.round($verjetnost*100, 2).'%</td><td align="center">'.round($neto, 1).'s</td>';
- echo '<td style="width:50%">';
- echo ' <div class="graph_db" style="text-align: right; float: left; width: '.($neto/$max*85).'%"> </div>';
+ echo '<tr>';
+ echo '<td><span title="'.$vprasanje[2].'">'.skrajsaj($vprasanje[2], 30).'</span></td>';
+ echo '<td class="right">'.round($bruto, 1).'s</td>';
+ echo '<td class="center">'.round($verjetnost*100, 2).'%</td>';
+
+ echo '<td class="right time">';
+ echo round($neto, 1).'s / <span class="gray">'.round($bruto, 1).'s</span>';
+ echo '</td>';
+
+ echo '<td class="graph_cell">';
+ echo '<div class="graph_cell">';
+
+ echo '<div class="graph_full" style="width: '.($neto/$max*85).'%"></div>';
if (($bruto-$neto)/$max*85 > 0)
- echo ' <div class="graph_lb" style="border-left:0; text-align: right; float: left; width: '.(($bruto-$neto)/$max*85).'%"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left; color: gray">'.round($neto, 1).'s / '.round($bruto, 1).'s</span>';
+ echo ' <div class="graph_empty" style="width: '.(($bruto-$neto)/$max*85).'%"></div>';
+
+ echo '</div>';
echo '</td>';
+
echo '</tr>';
}
- echo '<tr><th></th><th>'.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s</th><th></th><th>'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'min ':'').''.round(bcmod($neto_total, 60), 0).'s</th><tr>';
+ echo '<tr class="semi-bold"><td>'.$lang['srv_casi_po_vprasanjih_skupaj'].'</td><td class="right">'.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($bruto_total, 60), 0).'<span class="time_text">s</span></td><td></td><td class="right time">'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($neto_total, 60), 0).'<span class="time_text">s</span> / '.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($bruto_total, 60), 0).'<span class="time_text">s</span></td><td></td></tr>';
echo '</table>';
+
+ echo '<div class="tabela_trajanje_legenda">';
+ echo '<div class="graph_full legend"></div><span class="legend"> '.$lang['srv_neto_v_cas'].'</span>';
+ echo '<div class="graph_empty legend"></div><span class="legend"> '.$lang['srv_bruto_v_cas_long'].'</span>';
+ echo '</div>';
+
echo '</fieldset>';
- //CASI PO BLOKIH
- if($block_spr_data){
- // izpis za bloke
- $maxb = 0;
- $totalb = 0;
- foreach ($expected_time_block AS $key => $val) {
- if ($val[1] > $maxb) $maxb = $val[1];
- $totalb += $val[0];
- }
-
- echo '<br />';
- echo '<fieldset><legend>'.$lang['srv_casi_po_blokih'].'</legend>';
- echo '<table style="width:100%">';
-
- foreach ($expected_time_block AS $vrstni_red => $time) {
- echo '<tr>';
- echo '<th style="text-align:left; padding: 0 20px 0 0" nowrap>'.$block_labels_by_number[$vrstni_red+1].'</th>';
-
- echo '<td style="width:100%">';
- echo ' <div class="graph_db" style="text-align: right; float: left; width: '.($time[0]/$maxb*85).'%"> </div>';
- if ((($time[1]-$time[0])/$maxb*85) > 0)
- echo ' <div class="graph_lb" style="border-left: 0; text-align: right; float: left; width: '.(($time[1]-$time[0])/$maxb*85).'%"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.($time[0]<60?round($time[0],1).'s ':round($time[0]/60,1).'min ').'<span style="color:gray">/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').'</span></span>';
- echo '</td>';
-
- echo '</tr>';
- }
- echo '<tr><td colspan="3" style="border-bottom:1px solid #E4E4F9"></td></tr>';
- echo '<tr><td></td><th style="text-align:left; padding-right: 20px" nowrap>'.$lang['srv_anl_suma1'].': '.(bcdiv($totalb, 60, 0)>0?bcdiv($totalb, 60, 0).'min ':'').''.round(bcmod($totalb, 60), 0).'s</th></tr>';
+ //CASI PO BLOKIH
+ if($block_spr_data){
+ // izpis za bloke
+ $maxb = 0;
+ $totalb = 0;
+ foreach ($expected_time_block AS $key => $val) {
+ if ($val[1] > $maxb) $maxb = $val[1];
+ $totalb += $val[0];
+ }
+
+ echo '<fieldset><legend>'.$lang['srv_casi_po_blokih'].'</legend>';
+ echo '<table>';
- echo '</table>';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_casi_po_blokih_blok'].'</th>';
+ echo '<th colspan="2">'.$lang['srv_neto_t_cas'].' / '.$lang['srv_bruto_t_cas'].'</th>';
+ echo '</tr>';
- echo '<p><div class="graph_db" style="float: left; width: 11px"> </div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_neto_t_cas'].'</span>';
- echo '<div class="graph_lb" style="float: left; width: 11px"> </div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_bruto_t_cas'].'</span></p>';
+ foreach ($expected_time_block AS $vrstni_red => $time) {
+ echo '<tr>';
+ echo '<td class="nowrap">'.$block_labels_by_number[$vrstni_red+1].'</td>';
- echo '</fieldset>';
-
-
- // izpis za vprasanja po blokih
- $max = 0;
- $bruto_total = 0;
- $neto_total = 0;
- foreach ($expected_vprasanja AS $vpr) {
- if($vpr[4]){
- if ($vpr[0] > $max) $max = $vpr[0];
- $bruto_total += $vpr[0];
- $neto_total += $vpr[0] * $vpr[1];
- }
- }
+ echo '<td class="right time">';
+ echo ($time[0]<60?round($time[0],1).'<span class="time_text">s</span> ':round($time[0]/60,1).'<span class="time_text">min</span> ').'<span class="gray">/ '.($time[1]<60?round($time[1],1).'<span class="time_text">s</span> ':round($time[1]/60,1).'<span class="time_text">min</span> ').'</span>';
+ echo '</td>';
- $prevstran = false;
-
- echo '<br />';
-
- echo '<fieldset><legend>'.$lang['srv_casi_po_vprasanjih_bloki'].'</legend>';
- echo '<table style="width:100%">';
- echo '<tr><td></td><th>'.$lang['srv_bruto_v_cas'].'</th><th>'.$lang['srv_verjetnost_pojavitve'].'</th><th>'.$lang['srv_neto_v_cas'].'</th></tr>';
- foreach ($expected_vprasanja AS $vprasanje) {
- if($vprasanje[4]){
- if (!$prevstran || $prevstran != $vprasanje[4]) {
- echo '<tr><th style="text-align:left; border-bottom:1px solid #E4E4F9; padding-top:10px" colspan="5">'.$vprasanje[4].'</th></tr>';
- $prevstran = $vprasanje[4];
- }
-
- $bruto = $vprasanje[0];
- $verjetnost = $vprasanje[1];
- $neto = $bruto * $verjetnost;
-
- echo '<tr><td align="left"><span title="'.$vprasanje[2].'">'.skrajsaj($vprasanje[2], 30).'</span></td><td align="center">'.round($bruto, 1).'s</td><td align="center">'.round($verjetnost*100, 2).'%</td><td align="center">'.round($neto, 1).'s</td>';
- echo '<td style="width:50%">';
- echo ' <div class="graph_db" style="text-align: right; float: left; width: '.($neto/$max*85).'%"> </div>';
- if (($bruto-$neto)/$max*85 > 0)
- echo ' <div class="graph_lb" style="border-left:0; text-align: right; float: left; width: '.(($bruto-$neto)/$max*85).'%"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left; color: gray">'.round($neto, 1).'s / '.round($bruto, 1).'s</span>';
- echo '</td>';
- echo '</tr>';
- }
- }
- echo '<tr><th></th><th>'.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'min ':'').''.round(bcmod($bruto_total, 60), 0).'s</th><th></th><th>'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'min ':'').''.round(bcmod($neto_total, 60), 0).'s</th><tr>';
- echo '</table>';
- echo '</fieldset>';
- }
+ echo '<td class="graph_cell">';
+ echo '<div class="graph_cell">';
+ echo ' <div class="graph_full" style="width: '.($time[0]/$maxb*85).'%"></div>';
+ if ((($time[1]-$time[0])/$maxb*85) > 0)
+ echo ' <div class="graph_empty" style="width: '.(($time[1]-$time[0])/$maxb*85).'%"></div>';
+ echo '</div>';
+ echo '</td>';
+
+ echo '</tr>';
+ }
+ echo '<tr class="semi-bold"><td>'.$lang['srv_casi_po_vprasanjih_skupaj'].'</td><td class="right time">'.(bcdiv($totalb, 60, 0)>0?bcdiv($totalb, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($totalb, 60), 0).'<span class="time_text">s</span></td><td></td><td></td><td></td></tr>';
+
+ echo '</table>';
+
+ echo '<div class="tabela_trajanje_legenda">';
+ echo '<div class="graph_full legend"></div><span class="legend"> '.$lang['srv_neto_t_cas'].'</span>';
+ echo '<div class="graph_empty legend"></div><span class="legend"> '.$lang['srv_bruto_t_cas'].'</span>';
+ echo '</div>';
+
+ echo '</fieldset>';
+
+
+ // izpis za vprasanja po blokih
+ $max = 0;
+ $bruto_total = 0;
+ $neto_total = 0;
+ foreach ($expected_vprasanja AS $vpr) {
+ if($vpr[4]){
+ if ($vpr[0] > $max) $max = $vpr[0];
+ $bruto_total += $vpr[0];
+ $neto_total += $vpr[0] * $vpr[1];
+ }
+ }
+
+ $prevstran = false;
+
+ echo '<fieldset><legend>'.$lang['srv_casi_po_vprasanjih_bloki'].'</legend>';
+
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th>'.$lang['srv_casi_po_straneh_stran'].'/'.$lang['srv_casi_po_vprasanjih_vprasanje'].'</th>';
+ echo '<th>'.$lang['srv_bruto_v_cas'].'</th>';
+ echo '<th>'.$lang['srv_verjetnost_pojavitve'].'</th>';
+ echo '<th colspan="2">'.$lang['srv_neto_v_cas'].'/'.$lang['srv_bruto_v_cas_long'].'</th>';
+ echo '</tr>';
+
+ foreach ($expected_vprasanja AS $vprasanje) {
+
+ if($vprasanje[4]){
+ if (!$prevstran || $prevstran != $vprasanje[4]) {
+ echo '<tr><td class="semi-bold" colspan="5">'.$vprasanje[4].'</td></tr>';
+ $prevstran = $vprasanje[4];
+ }
+
+ $bruto = $vprasanje[0];
+ $verjetnost = $vprasanje[1];
+ $neto = $bruto * $verjetnost;
+
+ echo '<tr>';
+ echo '<td><span title="'.$vprasanje[2].'">'.skrajsaj($vprasanje[2], 30).'</span></td>';
+ echo '<td class="right">'.round($bruto, 1).'s</td>';
+ echo '<td class="center">'.round($verjetnost*100, 2).'%</td>';
+
+ echo '<td class="right time">';
+ echo round($neto, 1).'s / <span class="gray">'.round($bruto, 1).'s</span>';
+ echo '</td>';
+
+ echo '<td class="graph_cell">';
+ echo '<div class="graph_cell">';
+
+ echo '<div class="graph_full" style="width: '.($neto/$max*85).'%"></div>';
+ if (($bruto-$neto)/$max*85 > 0)
+ echo ' <div class="graph_empty" style="width: '.(($bruto-$neto)/$max*85).'%"></div>';
+
+ echo '</div>';
+ echo '</td>';
+
+ echo '</tr>';
+ }
+
+ }
+ echo '<tr class="semi-bold"><td>'.$lang['srv_casi_po_vprasanjih_skupaj'].'</td><td class="right">'.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($bruto_total, 60), 0).'<span class="time_text">s</span></td><td></td><td class="right time">'.(bcdiv($neto_total, 60, 0)>0?bcdiv($neto_total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($neto_total, 60), 0).'<span class="time_text">s</span> / '.(bcdiv($bruto_total, 60, 0)>0?bcdiv($bruto_total, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($bruto_total, 60), 0).'<span class="time_text">s</span></td><td></td></tr>';
+ echo '</table>';
+
+ echo '<div class="tabela_trajanje_legenda">';
+ echo '<div class="graph_full legend"></div><span class="legend"> '.$lang['srv_neto_v_cas'].'</span>';
+ echo '<div class="graph_empty legend"></div><span class="legend"> '.$lang['srv_bruto_v_cas_long'].'</span>';
+ echo '</div>';
+
+ echo '</fieldset>';
+ }
}
/**
@@ -5323,21 +6264,24 @@ class SurveyAdminSettings { if ($row1['tip'] <= 3 || $row1['tip'] == 6 || $row1['tip'] == 16 || $row1['tip'] == 17 || $row1['tip'] == 18 || $row1['tip'] == 19 || $row1['tip'] == 20) {
$sql2 = sisplet_query("SELECT naslov FROM srv_vrednost WHERE spr_id='$row1[id]'");
- //for those types we have max time option
- if($row1['tip'] == 3){
- while ($row2 = mysqli_fetch_array($sql2)) {
- $expected_time_temp += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100;
- }
- //if time is greater than max time, use max time
- $max_time = GlobalMisc::getMisc('timing_kategorija_max_'.$row1['tip']);
- $expected_time += ($max_time > $expected_time_temp) ? $expected_time_temp : $max_time;
- }
- //types that doesnt have max time option
- else{
- while ($row2 = mysqli_fetch_array($sql2)) {
- $expected_time += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100;
- }
- }
+
+ //for those types we have max time option
+ if($row1['tip'] == 3){
+ $expected_time_temp = 0;
+
+ while ($row2 = mysqli_fetch_array($sql2)) {
+ $expected_time_temp += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100;
+ }
+ //if time is greater than max time, use max time
+ $max_time = GlobalMisc::getMisc('timing_kategorija_max_'.$row1['tip']);
+ $expected_time += (isset($expected_time_temp) && $max_time > $expected_time_temp) ? $expected_time_temp : $max_time;
+ }
+ //types that doesnt have max time option
+ else{
+ while ($row2 = mysqli_fetch_array($sql2)) {
+ $expected_time += strlen(strip_tags($row2['naslov'])) * GlobalMisc::getMisc('timing_kategorija_'.$row1['tip']) / 100;
+ }
+ }
}
return $expected_time;
@@ -5516,15 +6460,20 @@ class SurveyAdminSettings { SurveyUserSetting :: getInstance()->Init($this->anketa, $global_user_id);
// nastavitve iz popupa
- $rezanje = SurveyUserSetting::getInstance()->getSettings('rezanje'); if ($rezanje == '') $rezanje = 1;
+ $rezanje = SurveyUserSetting::getInstance()->getSettings('rezanje'); if ($rezanje == '') $rezanje = 0;
$rezanje_meja_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_sp'); if ($rezanje_meja_sp == '') $rezanje_meja_sp = 5;
$rezanje_meja_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_meja_zg'); if ($rezanje_meja_zg == '') $rezanje_meja_zg = 5;
$rezanje_predvidena_sp = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_sp'); if ($rezanje_predvidena_sp == '') $rezanje_predvidena_sp = 10;
$rezanje_predvidena_zg = SurveyUserSetting::getInstance()->getSettings('rezanje_predvidena_zg'); if ($rezanje_predvidena_zg == '') $rezanje_predvidena_zg = 200;
$rezanje_preskocene = SurveyUserSetting::getInstance()->getSettings('rezanje_preskocene'); if ($rezanje_preskocene == '') $rezanje_preskocene = 1;
+ $get_predvideni = isset($_GET['predvideni']) ? $_GET['predvideni'] : '';
+ $get_prikazi01 = isset($_GET['prikazi01']) ? $_GET['prikazi01'] : '';
+ $get_pages = isset($_GET['pages']) ? $_GET['pages'] : '';
+
+
/* ++ Predvideni casi */
- if ($_GET['predvideni'] == 1 || $rezanje == 1) {
+ if ($get_predvideni == 1 || $rezanje == 1) {
$expected_time = array();
$expected_vprasanja = array();
$verjetnost = array();
@@ -5559,7 +6508,7 @@ class SurveyAdminSettings { $expected_time[$row['vrstni_red']][0] += $expected_vprasanja[$row1['id']][0] * $expected_vprasanja[$row1['id']][1]; // dejanski
$expected_time[$row['vrstni_red']][1] += $expected_vprasanja[$row1['id']][0]; // bruto - z vsemi vprasanji
- if ( $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']])
+ if (!isset($verjetnost[$row['vrstni_red']]) || $expected_vprasanja[$row1['id']][1] > $verjetnost[$row['vrstni_red']])
$verjetnost[$row['vrstni_red']] = $expected_vprasanja[$row1['id']][1];
}
@@ -5594,9 +6543,14 @@ class SurveyAdminSettings { $sql = sisplet_query("SELECT ug.usr_id, UNIX_TIMESTAMP(ug.time_edit) AS time_edit_u, g.vrstni_red FROM srv_user_grupa".$this->db_table." ug, srv_grupa g, srv_user u WHERE ug.usr_id=u.id AND u.last_status IN ($status) $lurker AND ug.gru_id=g.id AND g.ank_id='$this->anketa' ORDER BY usr_id, gru_id");
if (!$sql) echo mysqli_error($GLOBALS['connect_db']);
if (mysqli_num_rows($sql) == 0) {
+
if ($samo_izracunaj_skupini_cas == 1) {
return null;
- } else {
+ }
+ elseif ($samo_izracunaj_skupini_cas == 2) {
+ return array(null, null);
+ }
+ else {
echo '<div style="padding: 5px;" class="clr">'.$lang['srv_analiza_no_entry'].'</div>';
}
}
@@ -5636,35 +6590,25 @@ class SurveyAdminSettings { $casi = array();
foreach ($user_grupa AS $usr_id => $val) {
- //$sql = sisplet_query("SELECT recnum, time_insert, UNIX_TIMESTAMP(time_insert) AS time_insert_u FROM srv_user WHERE id = '$usr_id'");
- //$row = mysqli_fetch_array($sql);
- $row = $cache_row[$usr_id];
-
- //$sql1 = sisplet_query("SELECT time_edit, UNIX_TIMESTAMP(time_edit) AS time_edit_u FROM srv_user_grupa".$this->db_table." WHERE usr_id = '$usr_id' AND gru_id = '0'");
- //$row1 = mysqli_fetch_array($sql1);
- $row1 = $cache_row1[$usr_id];
+ $row = isset($cache_row[$usr_id]) ? $cache_row[$usr_id] : array();
+ $row1 = isset($cache_row1[$usr_id]) ? $cache_row1[$usr_id] : array();
- //echo $row1['time_edit'].' ('.($row1['time_edit_u'] - strtotime($row1['time_edit'])).') - '.$row['time_insert'].' ('.($row['time_insert_u'] - strtotime($row['time_insert'])).')<br>';
- $prev = ($row1['time_edit'] != '' ? $row1['time_edit_u'] : $row['time_insert_u']);
+ $prev = (isset($row1['time_edit']) && $row1['time_edit'] != '' ? $row1['time_edit_u'] : $row['time_insert_u']);
// nagovor
- //if ($row1['time_edit'] != '') $casi[0][$usr_id] = $this->diff($row1['time_edit'], $row['time_insert']);
- if ($row1['time_edit'] != '') $casi[0][$usr_id] = abs($row1['time_edit_u'] - $row['time_insert_u']);
+ if (isset($row1['time_edit']) && $row1['time_edit'] != '') $casi[0][$usr_id] = abs($row1['time_edit_u'] - $row['time_insert_u']);
- if ($row['recnum'] > 0) { // zapisi brez recnuma ne pridejo v poštev, ker nimajo pravih časov
+ if (isset($row['recnum']) && $row['recnum'] > 0) { // zapisi brez recnuma ne pridejo v poštev, ker nimajo pravih časov
foreach ($val AS $vrstni_red => $time_edit) {
-
- //$casi[$vrstni_red][$usr_id] = $this->diff($time_edit, $prev);
- $casi[$vrstni_red][$usr_id] = abs($time_edit - $prev);
-
- $prev = $time_edit;
-
+
+ $casi[$vrstni_red][$usr_id] = abs($time_edit - $prev);
+
+ $prev = $time_edit;
}
}
}
// porezemo zgornjih in spodnjih 5% casov vsake strani
- //if (isset($_GET['truncate'])) $truncate = ((int)$_GET['truncate'])/100; else $truncate = 0.05;
$spodnja = $rezanje_meja_sp / 100;
$zgornja = $rezanje_meja_zg / 100;
@@ -5695,23 +6639,27 @@ class SurveyAdminSettings { }
}
-
- //foreach ($casi AS $key => $val) { echo $key.': '; foreach ($val AS $k => $v) { echo $v.', '; } echo '<br>'; }
-
+
// izracunamo povprecne case
$sql = sisplet_query("SELECT MAX(vrstni_red) AS max FROM srv_grupa WHERE ank_id = '$this->anketa'");
$row = mysqli_fetch_array($sql);
$count = array();
- $count_bruto = array();
$povprecni_casi = array();
- $povprecni_casi_bruto = array();
- $max_time = 0;
- for ($i=0; $i<=$row['max']; $i++) $povprecni_casi[$i] = 0;
- foreach ($casi AS $vrstni_red => $val) {
+ $user_casi = array();
+
+ $max_time_on_page = 0;
+
+ // Na zacetku nastavimo vse povprecne case po straneh na 0
+ for ($i=0; $i<=$row['max']; $i++){
+ $povprecni_casi[$i] = 0;
+ }
+
+ // Loop po vseh straneh
+ foreach ($casi AS $vrstni_red => $uporabniki_na_strani) {
- // pogledamo za preskocene strani
+ // pogledamo za preskocene strani - samo ce nimamo nastavljeno, da se uposteva preskocene kot 0s
$preskocene = array();
if ($rezanje_preskocene == 0) {
$sqlp = sisplet_query("SELECT ug.usr_id FROM srv_user_grupa".$this->db_table." ug, srv_grupa g WHERE g.id=ug.gru_id AND g.vrstni_red='$vrstni_red' AND ug.preskocena='1'");
@@ -5720,229 +6668,478 @@ class SurveyAdminSettings { }
}
- foreach ($casi[$vrstni_red] AS $usr_id => $time) {
- if (!in_array($usr_id, $preskocene)) {
- $povprecni_casi_bruto[$vrstni_red] += $time; // bruto so kao brez upoštevanja strani ki so se preskocile (0s, 1s)
- $count_bruto[$vrstni_red] ++; // to je dejansko trajanje strani, ce uporabnik pride nanjo
- }
- if (!in_array($usr_id, $preskocene) || $rezanje_preskocene==1) {
- $povprecni_casi[$vrstni_red] += $time; // neto je kao povprecno trajanje strani in uposteva tudi 0s, 1s ce se je preskocilo
- $count[$vrstni_red] ++; // ta cas pride potem dejansko krajsi od bruto casa
- }
- if ($time > $max_time) $max_time = $time;
+ // Loop po vseh uporabnikih na strani (cas, ki ga je prezivel na trenutni strani)
+ foreach ($uporabniki_na_strani AS $usr_id => $time) {
+
+ // Racunanje casov - eliminiramo preskocene samo ce imamo to nastavitev vklopljeno
+ //if (!in_array($usr_id, $preskocene) || $rezanje_preskocene==1) {
+
+ // neto je kao povprecno trajanje strani in uposteva tudi 0s, 1s ce se je preskocilo
+ if(isset($povprecni_casi[$vrstni_red]))
+ $povprecni_casi[$vrstni_red] += $time;
+ else
+ $povprecni_casi[$vrstni_red] = $time;
+
+ // Pristejemo cas userja
+ if(isset($user_casi[$usr_id]))
+ $user_casi[$usr_id] += $time;
+ else
+ $user_casi[$usr_id] = $time;
+ //}
+
+ // Zabelezimo najdaljsi obisk strani
+ if ($time > $max_time_on_page)
+ $max_time_on_page = $time;
}
+
+ // Izracunamo povprecje na strani
+ if (count($uporabniki_na_strani) > 0){
+ $povprecni_casi[$vrstni_red] = $povprecni_casi[$vrstni_red] / count($uporabniki_na_strani);
+ }
+
+ $count[$vrstni_red] = count($casi[$vrstni_red]);
}
- foreach ($povprecni_casi AS $vrstni_red => $time) {
- if ($count[$vrstni_red] > 0)
- $povprecni_casi[$vrstni_red] = $time / $count[$vrstni_red];
- }
-
- foreach ($povprecni_casi_bruto AS $vrstni_red => $time) {
- if ($count_bruto[$vrstni_red] > 0)
- $povprecni_casi_bruto[$vrstni_red] = $time / $count_bruto[$vrstni_red];
- }
-
+ // Loop po povprecnih casih in dobimo najvecji povprecni cas in celoten cas
$max = 0;
- $total = 0;
- $total_predvideni = 0;
+ $total_povprecni_cas = 0;
+ $total_predvideni_cas = 0;
foreach ($povprecni_casi AS $key => $val) {
- if ($val > $max) $max = $val;
- $total += $val;
- }
- /*foreach ($povprecni_casi AS $key => $val) {
- if ($val > $max) $max = $val;
- //$total += $val;
- }*/
- if ($_GET['predvideni'] == 1) {
+
+ // Shranimo vecji povprecni cas
+ if ($val > $max)
+ $max = $val;
+
+ // Pristejemo povprecni cas strani celotnemu povprecnemu casu
+ $total_povprecni_cas += $val;
+ }
+
+ if ($get_predvideni == 1) {
if ($rezanje_preskocene == 1) {
foreach ($expected_time AS $key => $val) {
if ($val[0] > $max) $max = $val[0];
- $total_predvideni += $val[0];
+ $total_predvideni_cas += $val[0];
}
} else {
foreach ($expected_time AS $key => $val) {
if ($val[1] > $max) $max = $val[1];
- $total_predvideni += $val[1];
+ $total_predvideni_cas += $val[1];
}
}
}
+
- if ($max == 0) return;
-
- if ($samo_izracunaj_skupini_cas == 1)
- return (bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s';
-
+ // Izracunamo mediano, min in max cas na anketi
+ $total_median_cas = 0;
+ $total_min_cas = 0;
+ $total_max_cas = 0;
+
+ // Sortiramo case uporabnikov po velikosti
+ sort($user_casi, SORT_NUMERIC);
+ $user_count = count($user_casi);
+
+ // Dobimo index srednjega elementa
+ $user_median_index = floor($user_count / 2);
+
+ // Liho stevilo userjev - dobimo mediano - vrednost srednjega
+ if ($user_count % 2 === 1) {
+ $total_median_cas = $user_casi[$user_median_index];
+ }
+ // Sodo stevilo - izracunamo mediano iz srednjih dveh
+ else {
+ if(isset($user_casi[$user_median_index-1]))
+ $total_median_cas = ($user_casi[$user_median_index-1] + $user_casi[$user_median_index]) / 2;
+ else
+ $total_median_cas = $user_casi[$user_median_index];
+ }
+
+ // Zabelezimo min in max cas uporabnika na anketi
+ $total_min_cas = $user_casi[0];
+ $total_max_cas = $user_casi[$user_count-1];
+
+
+ if ($max == 0)
+ return;
+
// izpis
- echo '<div class="clr"></div>';
+ $skupni_cas = (bcdiv($total_povprecni_cas, 60, 0) > 0 ? bcdiv($total_povprecni_cas, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total_povprecni_cas, 60), 0).'<span class="time_text">s</span>';
+ $predviden_cas = (bcdiv($total_predvideni_cas, 60, 0)>0?bcdiv($total_predvideni_cas, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total_predvideni_cas, 60), 0);
+
+ $mediana = (bcdiv($total_median_cas, 60, 0) > 0 ? bcdiv($total_median_cas, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total_median_cas, 60), 0).'<span class="time_text">s</span>';
+ $minimum = (bcdiv($total_min_cas, 60, 0) > 0 ? bcdiv($total_min_cas, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total_min_cas, 60), 0).'<span class="time_text">s</span>';
+ $maximum = (bcdiv($total_max_cas, 60, 0) > 0 ? bcdiv($total_max_cas, 60, 0).'<span class="time_text">min</span> ':'').''.round(bcmod($total_max_cas, 60), 0).'<span class="time_text">s</span>';
+ $numerus = $user_count;
+
+
+ // Ce izipsujemo samo dejanski cas na nekem drugem mestu
+ if ($samo_izracunaj_skupini_cas > 0){
+
+ // Vracamo array tudi z mediano
+ if($samo_izracunaj_skupini_cas == 2)
+ return array($skupni_cas, $mediana);
+ else
+ return $skupni_cas;
+ }
+
+
+ // Prvi segment - dejansko trajanje, mediana...
+ echo '<fieldset><legend>'.$lang['srv_total_trajanje'].'</legend>';
+ echo ' <p class="semi-bold">'.$lang['srv_dejansko_trajanje_real'].':</p>';
+ echo ' <p>'.$skupni_cas.'</p>';
+
+ echo ' <p class="semi-bold top16">'.$lang['median'].':</p>';
+ echo ' <p>'.$mediana.'</p>';
+
+ echo ' <p class="semi-bold top8">Min:</p>';
+ echo ' <p>'.$minimum.'</p>';
+
+ echo ' <p class="semi-bold top8">Max:</p>';
+ echo ' <p>'.$maximum.'</p>';
+
+ echo ' <p class="semi-bold top8">'.$lang['numerus'].':</p>';
+ echo ' <p>'.$numerus.'</p>';
+
+ echo '</fieldset>';
+
+
echo '<fieldset><legend>'.$lang['srv_dejanski_casi'].'</legend>';
- echo '<table style="width:100%" >';
- echo '<tr><td></td><td>';
- echo '<input type="checkbox" name="predvideni" id="predvideni" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.($_GET['predvideni']==1?'0':'1').'&pages='.$_GET['pages'].'&prikazi01='.$_GET['prikazi01'].'\');" '.($_GET['predvideni']==1?'checked':'').' /><label for="predvideni">'.$lang['srv_vkljuci_predvidene'].'</label>';
- echo '</td><td nowrap>'.$lang['srv_stevilo_enot'].'</td></tr>';
+
+ echo '<p class="bottom16"><input type="checkbox" name="predvideni" id="predvideni" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.($get_predvideni == 1 ? '0' : '1').'&pages='.$get_pages.'&prikazi01='.$get_prikazi01.'\');" '.($get_predvideni == 1 ? 'checked' : '').' /><label for="predvideni">'.$lang['srv_vkljuci_predvidene'].'</label></p>';
+
+ echo '<table>';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_casi_po_straneh_stran'].'</th>';
+ echo '<th colspan="2">'.$lang['srv_neto_v_cas'];
+
+ if ($get_predvideni == 1) {
+ echo ' / '.$lang['srv_testiranje_predvidenicas_1'];
+ }
+ echo '</th>';
+ echo '<th>'.$lang['srv_stevilo_enot'].'</th>';
+ echo '</tr>';
foreach ($povprecni_casi AS $vrstni_red => $time) {
+ $naslov = $lang['srv_intro_label'];
+
$sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$vrstni_red' AND ank_id = '$this->anketa'");
- $row = mysqli_fetch_array($sql);
-
- $bruto = $povprecni_casi_bruto[$vrstni_red];
-
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+
+ if($row['naslov'] != '')
+ $naslov = $row['naslov'];
+ }
+
echo '<tr>';
- echo '<th style="text-align:left; padding-right:20px" nowrap>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</th>';
-
- echo '<td style="width:100%">';
- echo ' <div class="graph_db" style="text-align: right; float: left; width: '.($time/$max*85).'%"> </div>';
- //if ($bruto-$time > 0)
- //echo ' <div class="graph_lb" style="text-align: right; float: left; width: '.(($bruto-$time)/$max*85).'%; border-left:0px"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.($time<60?round($time,1).'s ':round($time/60,1).'min ')./*'<span style="color:gray">/ '.($bruto<60?round($bruto,1).'s ':round($bruto/60,1).'min ').'</span>'.*/'</span>';
+ echo '<td>'.$naslov.'</td>';
+ echo '<td class="right time">'.($time<60 ? round($time,1).'<span class="time_text">s</span> ' : round($time/60,1).'<span class="time_text">min</span> ');
+ if ($get_predvideni == 1) {
+ if ($rezanje_preskocene == 1)
+ $time = $expected_time[$vrstni_red][0];
+ else
+ $time = $expected_time[$vrstni_red][1];
+
+ echo '<span class="gray"> / '.($time<60 ? round($time,1).'<span class="time_text">s</span> ' : round($time/60,1).'<span class="time_text">min</span> ').'</span>';
+ }
echo '</td>';
- echo '<td style="text-align:center" nowrap>'.$count[$vrstni_red]./*' <span style="color:gray">/ '.$count_bruto[$vrstni_red].'</span>'.*/'</td>';
-
- echo '</tr>';
-
- if ($_GET['predvideni'] == 1) {
+ echo '<td class="graph_cell">';
+ echo '<div class="graph_cell">';
+ echo '<div class="graph_full" style="width: '.($time/$max*85).'%"></div>';
+
+ if ($get_predvideni == 1) {
if ($rezanje_preskocene == 1)
$time = $expected_time[$vrstni_red][0];
else
$time = $expected_time[$vrstni_red][1];
- echo '<tr>';
- echo '<th style="text-align:left; padding-right: 20px; color:gray" nowrap>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</th>';
-
- echo '<td style="width:100%">';
- echo ' <div class="graph_'.($rezanje_preskocene==1?'lb':'lr').'" style="text-align: right; float: left; width: '.($time/$max*85).'%"> </div>';
- //if ((($time[1]-$time[0])/$max*85) > 0)
- // echo ' <div class="graph_lb" style="border-left: 0; text-align: right; float: left; width: '.(($time[1]-$time[0])/$max*85).'%"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.($time<60?round($time,1).'s ':round($time/60,1).'min ')./*'<span style="color:gray">/ '.($time[1]<60?round($time[1],1).'s ':round($time[1]/60,1).'min ').'</span>'.*/'</span>';
- echo '</td>';
- echo '</tr>';
- echo '<tr><td colspan="3" style="border-bottom:1px solid #E4E4F9"></td></tr>';
+
+ echo '<div class="graph_'.($rezanje_preskocene==1?'empty':'red').'" style="width: '.($time/$max*85).'%"></div>';
}
+
+ echo '</div>';
+ echo '</td>';
+
+ echo '<td class="right">'.(isset($count[$vrstni_red]) ? $count[$vrstni_red] : 0).'</td>';
+
+ echo '</tr>';
}
- if ($_GET['predvideni'] != 1)
- echo '<tr><td colspan="3" style="border-bottom:1px solid #E4E4F9"></td></tr>';
- echo '<tr><td></td><th style="text-align:left">'.$lang['srv_anl_suma1'].': '.(bcdiv($total, 60, 0)>0?bcdiv($total, 60, 0).'min ':'').''.round(bcmod($total, 60), 0).'s';
- if ($_GET['predvideni'] == 1) echo ' / '.$lang['srv_skupaj_predvideni'].': '.(bcdiv($total_predvideni, 60, 0)>0?bcdiv($total_predvideni, 60, 0).'min ':'').''.round(bcmod($total_predvideni, 60), 0).'s';
- echo '</th></tr>';
-
- echo '</table>';
- if ($_GET['predvideni'] == 1) {
- echo '<p><div class="graph_db" style="float: left; width: 11px"> </div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_neto_t_cas'].'</span>';
- echo '<div class="graph_'.($rezanje_preskocene==1?'lb':'lr').'" style="float: left; width: 11px"> </div><span style="float:left; margin:0 10px 0 5px"> - '.$lang['srv_testiranje_predvidenicas'].'</span></p>';
+ echo '<tr class="semi-bold"><td>'.$lang['srv_anl_suma1'].'<td class="right time">'.$skupni_cas;
+ if ($get_predvideni == 1) {
+ if ($rezanje_preskocene == 1)
+ $time = $expected_time[$vrstni_red][0];
+ else
+ $time = $expected_time[$vrstni_red][1];
+
+ echo '<span class="gray"> / '.$predviden_cas.'s</span>';
}
+ echo '</td><td></td><td></td>';
- echo '</fieldset>';
+ echo '</td></tr>';
- if ($max_time > 1000 && $admin_type > 0) return; // pridejo prevelike tabele
+ echo '</table>';
+
+ echo '<div class="tabela_trajanje_legenda">';
+ echo '<div class="graph_full legend"></div><span class="legend"> '.$lang['srv_neto_t_cas'].'</span>';
+ if ($get_predvideni == 1)
+ echo '<div class="graph_empty legend"></div><span class="legend"> '.$lang['srv_testiranje_predvidenicas_1'].'</span>';
+ echo '</div>';
- if ($_GET['prikazi01'] == 1)
- $t_min = 0;
- else
- $t_min = 2;
+ echo '</fieldset>';
+
- // izpis histograma casov za vsako stran
+ // pridejo prevelike tabele
+ if ($max_time_on_page > 1000 && $admin_type > 0)
+ return;
- echo '<br /><fieldset><legend>'.$lang['srv_frekvencna_porazdelitev'].'</legend>';
+
+ // izpis histograma casov za vsako stran
- echo '<p>';
- echo ' <input type="checkbox" name="pages" id="pages" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$_GET['predvideni'].'&prikazi01='.$_GET['prikazi01'].'&pages='.($_GET['pages']==1?'0':'1').'\');" '.($_GET['pages']==1?'checked':'').' /><label for="pages">'.$lang['srv_show_pages'].'</label>';
- echo '</p>';
+ echo '<fieldset style="position:relative;"><legend>'.$lang['srv_frekvencna_porazdelitev'].'</legend>';
+
+ echo '<div class="setting_holder bottom16">';
+
+ echo '<div class="setting_item">';
+ echo '<input type="checkbox" name="pages" id="pages" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$get_predvideni.'&prikazi01='.$get_prikazi01.'&pages='.($get_pages == 1 ? '0' : '1').'\');" '.($get_pages == 1 ? 'checked' : '').' /><label for="pages">'.$lang['srv_show_pages'].'</label>';
+ echo '</div>';
if ($rezanje_preskocene == 1) {
- echo '<p>';
- echo ' <input type="checkbox" name="prikazi01" id="prikazi01" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$_GET['predvideni'].'&pages='.$_GET['pages'].'&prikazi01='.($_GET['prikazi01']==1?'0':'1').'\');" '.($_GET['prikazi01']==1?'checked':'').' /><label for="prikazi01">'.$lang['srv_prikazi01'].'</label>';
- echo '</p>';
+ echo '<div class="setting_item">';
+ echo ' <input type="checkbox" name="prikazi01" id="prikazi01" value="1" onclick="vnos_redirect(\'index.php?anketa='.$this->anketa.'&a=testiranje&m=cas&predvideni='.$get_predvideni.'&pages='.$get_pages.'&prikazi01='.($get_prikazi01 == 1 ? '0' : '1').'\');" '.($get_prikazi01 == 1 ? 'checked' : '').' /><label for="prikazi01">'.$lang['srv_prikazi01'].'</label>';
+ echo '</div>';
}
+
+ echo '</div>';
- // zdruzimo vse case po straneh na en graf
- if ($_GET['pages'] != '1') {
- $casi2 = array();
- $casi2[0] = array();
- foreach ($casi AS $key => $val) {
- foreach ($val AS $k => $v) {
- if (isset($casi2[0][$k]))
- $casi2[0][$k] += $v;
+
+ // Zdruzimo vse case po straneh na en histogram
+ if ($get_pages != '1') {
+
+ // Dobimo case resevanja celotne ankete - po respondentih
+ $skupni_casi = array();
+
+ // Loop po posameznih straneh - sestejemo case po straneh na skupni cas na anketi
+ foreach ($casi AS $stran => $casi_na_strani) {
+
+ // Loop po vseh casih na strani
+ foreach ($casi_na_strani AS $usr_id => $cas_na_strani) {
+
+ if (isset($skupni_casi[$usr_id]))
+ $skupni_casi[$usr_id] += $cas_na_strani;
else
- $casi2[0][$k] = $v;
- //array_push($casi2[0], $v);
+ $skupni_casi[$usr_id] = $cas_na_strani;
}
}
- $casi = $casi2;
- $max_time = 0;
- foreach ($casi[0] AS $k => $v)
- if ($v > $max_time) $max_time = $v;
- }
-
- $minute = true;
- if ($minute) { // minute
- foreach ($casi AS $k => $page) {
- foreach ($page AS $key => $val) {
- $casi[$k][$key] = (int) round($val / 60, 0);
- }
+
+ // Nastavimo se min cas in max cas na anketi
+ $max_cas_na_anketi = 0;
+ $min_cas_na_anketi = 0;
+ foreach ($skupni_casi AS $usr_id => $cas_na_anketi){
+
+ if ($cas_na_anketi > $max_cas_na_anketi)
+ $max_cas_na_anketi = $cas_na_anketi;
+
+ if ($cas_na_anketi < $min_cas_na_anketi || $min_cas_na_anketi == 0)
+ $min_cas_na_anketi = $cas_na_anketi;
}
- $max_time = (int) round($max_time / 60, 0);
- }
-
- foreach ($casi AS $key => $val) {
-
- if ($_GET['pages'] == '1') {
- $sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$key' AND ank_id='$this->anketa'");
- $row = mysqli_fetch_array($sql);
- echo '<h2>'.($row['naslov']!=''?$row['naslov']:$lang['srv_intro_label']).'</h2>';
+
+ // Pretvorimo v minute
+ foreach ($skupni_casi AS $usr_id => $cas_na_anketi) {
+ $skupni_casi[$usr_id] = (int) round($cas_na_anketi / 60, 0);
}
+ $max_cas_na_anketi = (int) round($max_cas_na_anketi / 60, 0);
+ $min_cas_na_anketi = (int) round($min_cas_na_anketi / 60, 0);
+
+ if($get_prikazi01 == 1)
+ $min_cas_na_anketi = 0;
+ else
+ $min_cas_na_anketi = 2;
+
+ // Pripravimo podatke za histogram
+ $histogram_data = array();
- echo '<table style="width:100%; padding:0; margin: 0"><tr>';
-
- $histogram = array();
- for ($t=0; $t<=$max_time; $t++) $histogram[$t] = 0;
- foreach ($val AS $k => $v) {
- if ($v >= $t_min) $histogram[$v]++;
- }
- $max_stran = 0;
- $max_stran_time = 0;
- foreach ($histogram AS $k => $v) {
- if ($v > $max_stran) $max_stran = $v;
- if ($v > 0) $max_stran_time = $k;
+ // Napolnimo vrednosti 0 na vsakem koraku (minuti)
+ for ($t=0; $t<=$max_cas_na_anketi; $t++)
+ $histogram_data[$t] = 0;
+
+ // Napolnimo vrednosti v histogram in dobimo najvecjo vrednost
+ $histogram_max_data = 0;
+ foreach ($skupni_casi AS $usr_id => $cas_na_anketi) {
+ $histogram_data[$cas_na_anketi]++;
+
+ if($histogram_data[$cas_na_anketi] > $histogram_max_data)
+ $histogram_max_data = $histogram_data[$cas_na_anketi];
}
-
-
- if ($max_stran != 0) {
-
- for ($t=$t_min; $t<=$max_time; $t++) {
-
- echo '<td style="vertical-align:bottom; margin:0; padding:0; border:0">';
-
- echo ' <div style="background-color:#D8DFEA; border:1px solid transparent; text-align: right; height: '.($histogram[$t]/$max_stran*150).'px; width: 100%; margin:0; padding:0; min-height:1px" title="'.$t.($minute?'min':'s').': '.$histogram[$t].'"></div>';
- //echo '<span style="display:block; width: 100%; text-align:center">'.$t.'</span>';
- echo '</td>';
+
+
+ // Izrisemo histogram - ce imamo kaksno vrednost nad 0
+ if ($histogram_max_data != 0) {
+
+ echo '<table class="casi_histogram">';
+
+ // Sivi stolpci
+ echo '<tr>';
+
+ for ($t=$min_cas_na_anketi; $t<=$max_cas_na_anketi; $t++) {
+
+ if(isset($histogram_data[$t])){
+ echo '<td class="histogram">';
+ echo ' <div class="histogram" style="height: '.($histogram_data[$t]/$histogram_max_data*150).'px;" title="'.$histogram_data[$t].' ('.$t.'min)"></div>';
+ echo '</td>';
+ }
}
+
+ echo '</tr>';
+
+
+ // Spodnja os
+ echo '<tr>';
+
+ // Korak 1 min
+ if ($max_cas_na_anketi <= 20) {
+ for ($t=$min_cas_na_anketi; $t<=$max_cas_na_anketi; $t++) {
+ echo '<td class="histogram_time">'.$t.'min'.'</td>';
+ }
+ }
+ // Korak 10 min
+ else {
+ $colspan = 10 - $min_cas_na_anketi;
+ echo '<td class="histogram_time" colspan="'.$colspan.'">'.$min_cas_na_anketi.'min</td>';
+
+ for ($t=10; $t<=$max_cas_na_anketi; $t+=10) {
+
+ // Pri zadnji labeli odstejemo span
+ if(($t + 10) > count($histogram_data))
+ $colspan = count($histogram_data) - $t;
+ else
+ $colspan = 10;
+
+ echo '<td class="histogram_time" colspan="'.$colspan.'">'.$t.'</td>';
+ }
+ }
+
+ echo '</tr>';
+
+ echo '</table>';
}
+ }
+ // Casi po straneh - 1 histogram na stran
+ else{
+
+ foreach ($casi AS $stran => $casi_na_strani) {
+
+ // Izpisemo naslov posamezne strani
+ $naslov = $lang['srv_intro_label'];
+
+ $sql = sisplet_query("SELECT naslov FROM srv_grupa WHERE vrstni_red='$stran' AND ank_id='$this->anketa'");
+ if(mysqli_num_rows($sql) > 0){
+ $row = mysqli_fetch_array($sql);
+
+ if($row['naslov'] != '')
+ $naslov = $row['naslov'];
+ }
+
+ echo '<p class="bold blue bottom16">'.$naslov.'</p>';
+
+
+ // Dobimo podatke za histogram
+ // Nastavimo min cas in max cas na anketi
+ $max_cas_na_strani = 0;
+ $min_cas_na_strani = 0;
+ foreach ($casi_na_strani AS $usr_id => $cas_na_strani) {
- echo '</tr><tr>';
-
-
- if ($max_time <= 20) {
- for ($t=$t_min; $t<=$max_time; $t++) {
- echo '<td>'.$t.($minute?'min':'s').'</td>';
+ if ($cas_na_strani > $max_cas_na_strani)
+ $max_cas_na_strani = $cas_na_strani;
+
+ if ($cas_na_strani < $min_cas_na_strani || $min_cas_na_strani == 0)
+ $min_cas_na_strani = $cas_na_strani;
}
- } else {
- if ($t_min == 0)
- echo '<td colspan="10">0'.($minute?'min':'s').'</td>';
- else
- echo '<td colspan="8">2'.($minute?'min':'s').'</td>';
+
+ // Pretvorimo v minute
+ $max_cas_na_strani = (int) round($max_cas_na_strani / 60, 0);
+ $min_cas_na_strani = (int) round($min_cas_na_strani / 60, 0);
+
+ if($get_prikazi01 == 1)
+ $min_cas_na_strani = 0;
+
+ // Pripravimo podatke za histogram
+ $histogram_data = array();
- for ($t=10; $t<=$max_time; $t+=10) {
- echo '<td colspan="10">'.$t.'</td>';
+ // Napolnimo vrednosti 0 na vsakem koraku (minuti)
+ for ($t=0; $t<=$max_cas_na_strani; $t++)
+ $histogram_data[$t] = 0;
+
+ // Napolnimo vrednosti v histogram in dobimo najvecjo vrednost
+ $histogram_max_data = 0;
+ foreach ($casi_na_strani AS $usr_id => $cas_na_strani) {
+
+ // Pretvorimo v minute
+ $cas_na_strani = (int) round($cas_na_strani / 60, 0);
+
+ $histogram_data[$cas_na_strani]++;
+
+ if($histogram_data[$cas_na_strani] > $histogram_max_data)
+ $histogram_max_data = $histogram_data[$cas_na_strani];
+ }
+
+
+ // Izrisemo histogram za stran - ce imamo kaksno vrednost nad 0
+ if ($histogram_max_data != 0) {
+
+ echo '<table class="casi_histogram">';
+
+ // Sivi stolpci
+ echo '<tr>';
+
+ for ($t=$min_cas_na_strani; $t<=$max_cas_na_strani; $t++) {
+
+ if(isset($histogram_data[$t])){
+ echo '<td class="histogram">';
+ echo ' <div class="histogram" style="height: '.($histogram_data[$t]/$histogram_max_data*150).'px;" title="'.$histogram_data[$t].' ('.$t.'min)"></div>';
+ echo '</td>';
+ }
+ }
+
+ echo '</tr>';
+
+
+ // Spodnja os
+ echo '<tr>';
+
+ // Korak 1 min
+ if ($max_cas_na_strani <= 20) {
+ for ($t=$min_cas_na_strani; $t<=$max_cas_na_strani; $t++) {
+ echo '<td class="histogram_time">'.$t.'min'.'</td>';
+ }
+ }
+ // Korak 10 min
+ else {
+ if ($min_cas_na_strani == 0)
+ echo '<td class="histogram_time" colspan="10">0'.'min'.'</td>';
+ else
+ echo '<td class="histogram_time" colspan="8">2'.'min'.'</td>';
+
+ for ($t=10; $t<=$max_cas_na_strani; $t+=10) {
+
+ $colspan = 10;
+ if(($t + 10) > count($histogram_data))
+ $colspan = $t + 10 - count($histogram_data);
+ if($min_cas_na_strani != 0)
+ $colspan -= 2;
+
+ echo '<td class="histogram_time" colspan="'.$colspan.'">'.$t.'</td>';
+ }
+ }
+
+ echo '</tr>';
+
+ echo '</table>';
}
}
-
- echo '</tr></table>';
-
+
}
- echo '</fieldset>';
+ echo '</fieldset>';
}
/**
@@ -5962,51 +7159,86 @@ class SurveyAdminSettings { $rezanje_preskocene = SurveyUserSetting::getInstance()->getSettings('rezanje_preskocene'); if ($rezanje_preskocene == '') $rezanje_preskocene = 1;
- echo '<p><input type="radio" name="rezanje" value="0"'.($rezanje==0?' checked':'').'> '.$lang['srv_rezanje_0'].'</p>';
- echo '<p> '.$lang['srv_rezanje_meja_sp'].': <select name="rezanje_meja_sp">';
- echo '<option value="0"'.($rezanje_meja_sp==0?' selected':'').'>0%</option>';
- echo '<option value="1"'.($rezanje_meja_sp==1?' selected':'').'>1%</option>';
- echo '<option value="3"'.($rezanje_meja_sp==3?' selected':'').'>3%</option>';
- echo '<option value="5"'.($rezanje_meja_sp==5?' selected':'').'>5%</option>';
- echo '<option value="10"'.($rezanje_meja_sp==10?' selected':'').'>10%</option>';
- echo '<option value="20"'.($rezanje_meja_sp==20?' selected':'').'>20%</option>';
- echo '</select></p>';
-
- echo '<p> '.$lang['srv_rezanje_meja_zg'].': <select name="rezanje_meja_zg">';
- echo '<option value="0"'.($rezanje_meja_zg==0?' selected':'').'>0%</option>';
- echo '<option value="1"'.($rezanje_meja_zg==1?' selected':'').'>1%</option>';
- echo '<option value="3"'.($rezanje_meja_zg==3?' selected':'').'>3%</option>';
- echo '<option value="5"'.($rezanje_meja_zg==5?' selected':'').'>5%</option>';
- echo '<option value="10"'.($rezanje_meja_zg==10?' selected':'').'>10%</option>';
- echo '<option value="20"'.($rezanje_meja_zg==20?' selected':'').'>20%</option>';
- echo '</select></p>';
-
- echo '<p><input type="radio" name="rezanje" value="1"'.($rezanje==1?' checked':'').'> '.$lang['srv_rezanje_1'].'</p>';
- echo '<p> '.$lang['srv_rezanje_meja_sp'].': <select name="rezanje_predvidena_sp">';
- echo '<option value="0"'.($rezanje_predvidena_sp==0?' selected':'').'>0%</option>';
- echo '<option value="1"'.($rezanje_predvidena_sp==1?' selected':'').'>1%</option>';
- echo '<option value="3"'.($rezanje_predvidena_sp==3?' selected':'').'>3%</option>';
- echo '<option value="5"'.($rezanje_predvidena_sp==5?' selected':'').'>5%</option>';
- echo '<option value="10"'.($rezanje_predvidena_sp==10?' selected':'').'>10%</option>';
- echo '<option value="20"'.($rezanje_predvidena_sp==20?' selected':'').'>20%</option>';
- echo '</select> '.$lang['srv_rezanje_predvidenega'].'</p>';
-
- echo '<p> '.$lang['srv_rezanje_meja_zg'].': <select name="rezanje_predvidena_zg">';
- echo '<option value="100"'.($rezanje_predvidena_zg==100?' selected':'').'>100%</option>';
- echo '<option value="150"'.($rezanje_predvidena_zg==150?' selected':'').'>150%</option>';
- echo '<option value="200"'.($rezanje_predvidena_zg==200?' selected':'').'>200%</option>';
- echo '<option value="300"'.($rezanje_predvidena_zg==300?' selected':'').'>300%</option>';
- echo '<option value="500"'.($rezanje_predvidena_zg==500?' selected':'').'>500%</option>';
- echo '<option value="1000"'.($rezanje_predvidena_zg==1000?' selected':'').'>1000%</option>';
- echo '</select> '.$lang['srv_rezanje_predvidenega'].'</p>';
-
- echo '<p> </p>';
- echo '<p><input type="checkbox" name="rezanje_preskocene" value="1"'.($rezanje_preskocene==1?' checked':'').' onchange="javascript: if (this.checked == 1) { $(\'#preskocene_txt\').hide(); } else { $(\'#preskocene_txt\').show(); }"> '.$lang['srv_rezanje_preskocene'].'</p>';
- echo '<p id="preskocene_txt" '.($rezanje_preskocene==1?'style="display:none"':'').'>'.$lang['srv_rezanje_preskocene_txt'].'</p>';
-
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="statusCasiAction(\'run_rezanje\'); return false;"><span>'.$lang['srv_save_run_profile'].'</span></a></span></span>';
- echo '<span class="floatRight spaceLeft" ><span class="buttonwrapper"><a class="ovalbutton ovalbutton_gray" href="#" onclick="statusCasiAction(\'cancle\'); return false;"><span>'.$lang['srv_close_profile'].'</span></a></span></span>';
-
+ echo '<h2>'.$lang['srv_rezanje'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onClick="popupClose(); return false;">✕</a></div>';
+
+
+ echo '<div class="popup_main">';
+
+ echo ' <div class="setting_line">';
+ echo ' <input type="radio" name="rezanje" id="rezanje_0" value="0"'.($rezanje==0?' checked':'').'>';
+ echo ' <label for="rezanje_0">'.$lang['srv_rezanje_0'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <label for="rezanje_meja_sp">'.$lang['srv_rezanje_meja_sp'].':</label>';
+ echo ' <select name="rezanje_meja_sp" id="rezanje_meja_sp">';
+ echo ' <option value="0"'.($rezanje_meja_sp==0?' selected':'').'>0%</option>';
+ echo ' <option value="1"'.($rezanje_meja_sp==1?' selected':'').'>1%</option>';
+ echo ' <option value="3"'.($rezanje_meja_sp==3?' selected':'').'>3%</option>';
+ echo ' <option value="5"'.($rezanje_meja_sp==5?' selected':'').'>5%</option>';
+ echo ' <option value="10"'.($rezanje_meja_sp==10?' selected':'').'>10%</option>';
+ echo ' <option value="20"'.($rezanje_meja_sp==20?' selected':'').'>20%</option>';
+ echo ' </select>';
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <label for="rezanje_meja_sp">'.$lang['srv_rezanje_meja_zg'].':</label>';
+ echo ' <select name="rezanje_meja_zg" id="rezanje_meja_zg">';
+ echo ' <option value="0"'.($rezanje_meja_zg==0?' selected':'').'>0%</option>';
+ echo ' <option value="1"'.($rezanje_meja_zg==1?' selected':'').'>1%</option>';
+ echo ' <option value="3"'.($rezanje_meja_zg==3?' selected':'').'>3%</option>';
+ echo ' <option value="5"'.($rezanje_meja_zg==5?' selected':'').'>5%</option>';
+ echo ' <option value="10"'.($rezanje_meja_zg==10?' selected':'').'>10%</option>';
+ echo ' <option value="20"'.($rezanje_meja_zg==20?' selected':'').'>20%</option>';
+ echo ' </select>';
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <input type="radio" name="rezanje" id="rezanje_1" value="1"'.($rezanje==1?' checked':'').'>';
+ echo ' <label for="rezanje_1">'.$lang['srv_rezanje_1'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <label for="rezanje_predvidena_sp">'.$lang['srv_rezanje_meja_sp'].':</label>';
+ echo ' <select name="rezanje_predvidena_sp" id="rezanje_predvidena_sp">';
+ echo ' <option value="0"'.($rezanje_predvidena_sp==0?' selected':'').'>0%</option>';
+ echo ' <option value="1"'.($rezanje_predvidena_sp==1?' selected':'').'>1%</option>';
+ echo ' <option value="3"'.($rezanje_predvidena_sp==3?' selected':'').'>3%</option>';
+ echo ' <option value="5"'.($rezanje_predvidena_sp==5?' selected':'').'>5%</option>';
+ echo ' <option value="10"'.($rezanje_predvidena_sp==10?' selected':'').'>10%</option>';
+ echo ' <option value="20"'.($rezanje_predvidena_sp==20?' selected':'').'>20%</option>';
+ echo ' </select> '.$lang['srv_rezanje_predvidenega'];
+ echo ' </div>';
+
+ echo ' <div class="setting_line">';
+ echo ' <label for="rezanje_meja_sp">'.$lang['srv_rezanje_meja_zg'].':</label>';
+ echo ' <select name="rezanje_predvidena_zg" id="rezanje_predvidena_zg">';
+ echo ' <option value="100"'.($rezanje_predvidena_zg==100?' selected':'').'>100%</option>';
+ echo ' <option value="150"'.($rezanje_predvidena_zg==150?' selected':'').'>150%</option>';
+ echo ' <option value="200"'.($rezanje_predvidena_zg==200?' selected':'').'>200%</option>';
+ echo ' <option value="300"'.($rezanje_predvidena_zg==300?' selected':'').'>300%</option>';
+ echo ' <option value="500"'.($rezanje_predvidena_zg==500?' selected':'').'>500%</option>';
+ echo ' <option value="1000"'.($rezanje_predvidena_zg==1000?' selected':'').'>1000%</option>';
+ echo ' </select> '.$lang['srv_rezanje_predvidenega'];
+ echo ' </div>';
+
+ echo ' <div class="setting_line top8">';
+ echo ' <input type="checkbox" name="rezanje_preskocene" id="rezanje_preskocene" value="1"'.($rezanje_preskocene==1?' checked':'').' onchange="javascript: if (this.checked == 1) { $(\'#preskocene_txt\').hide(); } else { $(\'#preskocene_txt\').show(); }">';
+ echo ' <label for="rezanje_preskocene">'.$lang['srv_rezanje_preskocene'].':</label>';
+ echo ' </div>';
+
+ echo ' <div class="bottom16">';
+ echo ' <span id="preskocene_txt" '.($rezanje_preskocene==1? 'style="display:none"' : '').'>'.$lang['srv_rezanje_preskocene_txt'].'</span>';
+ echo ' </div>';
+
+ echo '</div>';
+
+
+ echo '<div class="button_holder">';
+ echo ' <button class="medium white-blue" onclick="statusCasiAction(\'cancle\'); return false;">'.$lang['srv_close_profile'].'</button>';
+ echo ' <button class="medium blue" onclick="statusCasiAction(\'run_rezanje\'); return false;">'.$lang['srv_save_run_profile'].'</button>';
+ echo '</div>';
}
/**
@@ -6027,61 +7259,6 @@ class SurveyAdminSettings { }
- function testiranje_komentarji_links($comment_count){
- global $lang;
- global $site_url;
- global $site_path;
- global $admin_type;
- global $global_user_id;
-
-
- if($_GET['a'] == 'komentarji_anketa'){
-
- // Gumb nazaj
- echo '<div class="switch_button '.($_GET['a'] == A_KOMENTARJI ? ' active' : '').'">';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_KOMENTARJI.'" title="' . $lang['srv_testiranje_komentarji_title'] . '">' . $lang['srv_q_comments_back'] . '</a>';
- echo '</div>';
-
- echo '<span class="bold"> (';
- if($comment_count['question']['unresolved'] > 0)
- echo '<span class="orange">';
- echo $comment_count['question']['unresolved'];
- if($comment_count['question']['unresolved'] > 0)
- echo '</span>';
- echo '/'.$comment_count['question']['all'];
- echo ')</span>';
- }
- else{
-
- echo '<span id="comment_question_note">';
-
- echo $lang['srv_komentarji_imate'].' ';
- if($comment_count['question']['unresolved'] > 0) echo '<span class="red">';
- echo $this->string_format((int)$comment_count['question']['unresolved'], 'srv_cnt_komentarji');
- if($comment_count['question']['unresolved'] > 0) echo '</span>';
-
- echo ' '.$lang['srv_komentarji_odskupno'].' ';
- echo $this->string_format((int)$comment_count['question']['all'], 'srv_cnt_komentar_na_vprs');
-
- echo '</span>';
-
-
- // Gumb splosni komentarji
- echo '<div class="switch_button '.($_GET['a'] == A_KOMENTARJI_ANKETA ? ' active' : '').'">';
- echo '<a href="index.php?anketa=' . $this->anketa . '&a='.A_KOMENTARJI_ANKETA.'" title="' . $lang['srv_testiranje_komentarji_anketa_title'] . '">' . $lang['srv_testiranje_komentarji_anketa_title'] . '</a>';
- echo '</div>';
-
- echo '<span class="bold"> (';
- if($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved'] > 0)
- echo '<span class="orange">';
- echo ($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']);
- if($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved'] > 0)
- echo '</span>';
- echo '/'.($comment_count['survey_resp']['all']+$comment_count['survey_admin']['all']);
- echo ')</span>';
- }
- }
-
function string_format($cnt,$lang_root) {
global $lang;
@@ -6100,1023 +7277,6 @@ class SurveyAdminSettings { }
/**
- * izpise komentarje na anketo - stara ki se ne uporablja
- *
- */
- function testiranje_komentarji_anketa_old () {
- global $lang;
- global $site_url;
- global $admin_type;
- global $global_user_id;
-
- $rowa = SurveyInfo::getInstance()->getSurveyRow();
-
- SurveySetting::getInstance()->Init($this->anketa);
- $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder');
-
- $f = new Forum;
-
- $sql = sisplet_query("SELECT * FROM post WHERE tid='$rowa[thread]'");
-
- echo '<div style="padding:0 20px">';
- echo '<p><b>'.$lang['srv_admin_s_comments'].'</b></p>';
-
- if (mysqli_num_rows($sql) > 0) {
- $rows = mysqli_num_rows($sql);
- if ($rows > 0) echo '<img src="img_0/'.($sortpostorder==1?'up':'down').'.gif" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'" />';
- }
-
- $i=0;
- while ($row = mysqli_fetch_array($sql)) {
-
- if (($i != 0 && $sortpostorder==0) || ($i < $rows-1 && $sortpostorder==1)) {
- if ($row['ocena'] == 0) echo '<span style="color:black">';
- elseif ($row['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($row['ocena'] == 2) echo '<span style="color:lightgray">';
- elseif ($row['ocena'] == 3) echo '<span style="color:lightgray">';
- else echo '<span>';
-
- echo '<b>'.$f->user($row['uid']).'</b> ('.$f->datetime1($row['time']).'):';
- echo '<br/>'.$row['vsebina'].'<hr>';
-
- echo '</span>';
- }
- $i++;
- }
-
- echo '</div>';
-
- }
-
- /**
- * izpise komentarje na anketo
- *
- */
- function testiranje_komentarji_anketa () {
- global $lang;
- global $site_url;
- global $admin_type;
- global $global_user_id;
-
- $b = new Branching($this->anketa);
- $f = new Forum;
- $d = new Dostop();
-
- SurveySetting::getInstance()->Init($this->anketa);
- $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder');
- $commentmarks = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks');
- $survey_comment = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment');
- $survey_comment_resp = SurveySetting::getInstance()->getSurveyMiscSetting('survey_comment_resp');
- $comment_count = $this->testiranje_komentarji_count();
-
- $rowa = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<div id="placeholder" class="komentarji">';
-
-
- echo '<div id="branching" class="branching_new expanded komentarji">';
-
-
- echo '<span id="comment_question_note">';
-
- echo $lang['srv_komentarji_imate'].' ';
- if(($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']) > 0) echo '<span class="red">';
- echo $this->string_format((int)($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']), 'srv_cnt_komentarji');
- if(($comment_count['survey_resp']['unresolved']+$comment_count['survey_admin']['unresolved']) > 0) echo '</span>';
-
- echo ' '.$lang['srv_komentarji_odskupno'].' ';
- echo $this->string_format((int)($comment_count['survey_resp']['all']+$comment_count['survey_admin']['all']), 'srv_cnt_komentarji_survey');
-
- echo '</span>';
-
-
- echo ' <span class="tooltip clr spaceLeft">';
- echo '<a href="'.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.'" target="_blank" style="font-size:15px"><span class="faicon edit_square"></span> '.$lang['srv_survey_testdata'].'</a>';
- echo ' ('.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.') ';
- echo '<span class="expanded-tooltip bottom light" style="left: -20px;">';
- echo '<b>' . $lang['srv_survey_testdata2'] . ':</b> '.$lang['srv_testdata_text'].'';
- echo '<p>'.$lang['srv_preview_testdata_longtext'].'</p>';
- echo '<span class="arrow"></span>';
- echo '</span>'; // expanded-tooltip bottom
- echo '</span>'; // tooltip
-
-
- # VV: privzeto naj bodo samo nerešeni komentarji
- if (!isset($_GET['only_unresolved'])) {
- $_GET['only_unresolved'] = 1;
- }
-
-
- echo '<span style="float:left; width:auto; margin-top:20px; display:inline-block;">';
-
- # samo nerešeni komentarji
- if ($commentmarks == 0) {
- echo '<label for="only_unresolved"><input type="checkbox" id="only_unresolved" onchange="window.location = \'index.php?anketa='.$this->anketa.'&a=komentarji_anketa&only_unresolved=\'+$(\'#only_unresolved:checked\').val()" value="1" '.($_GET['only_unresolved']==1?'checked':'').' />';
- echo $lang['srv_comments_unresolved'];
- echo '</label>';
- } else {
- echo $lang['move_show'].': <select id="only_unresolved" name="" onchange="window.location = \'index.php?anketa='.$this->anketa.'&a=komentarji_anketa&only_unresolved=\'+$(\'#only_unresolved\').val(); " >
- <option value="0"'.($_GET['only_unresolved']==0?' selected="selected"':'').'>'.$lang['all2'].'</option>
- <option value="1"'.($_GET['only_unresolved']==1?' selected="selected"':'').'>'.$lang['srv_comments_unresolved'].'</option>
- <option value="2"'.($_GET['only_unresolved']==2?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
- <option value="3"'.($_GET['only_unresolved']==3?' selected="selected"':'').'>'.$lang['srv_todo'].'</option>
- <option value="4"'.($_GET['only_unresolved']==4?' selected="selected"':'').'>'.$lang['srv_done'].'</option>
- <option value="5"'.($_GET['only_unresolved']==5?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- }
- echo ' '.Help::display('srv_comments_only_unresolved').'</span>';
-
- $only_unresolved = " ";
- switch($_GET['only_unresolved']){
- case 1:
- $only_unresolved = " AND ocena <= '1' ";
- break;
- case 2:
- $only_unresolved = " AND ocena = '0' ";
- break;
- case 3:
- $only_unresolved = " AND ocena = '1' ";
- break;
- case 4:
- $only_unresolved = " AND ocena = '2' ";
- break;
- case 5:
- $only_unresolved = " AND ocena = '3' ";
- break;
- default:
- break;
- }
-
-
- echo '<span class="clr"></span>';
-
- // Splosni komentarji urednikov - levo
- echo '<div class="komentarji_anketa komentarji_ured">';
- echo '<span class="komentarji_title">'.$lang['srv_comments_anketa_ured'].' ('.$comment_count['survey_admin']['unresolved'].'/'.$comment_count['survey_admin']['all'].')</span>';
-
- echo '<div style="padding: 20px 20px">';
-
- $sql = sisplet_query("SELECT * FROM post WHERE tid='$rowa[thread]' ".$only_unresolved." ");
- $rows = (mysqli_num_rows($sql) == 0) ? 0 : mysqli_num_rows($sql) - 1;
- if ($rows > 0){
- echo '<img src="img_0/'.($sortpostorder==1?'up':'down').'.gif" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'" />';
- echo '<br />';
-
- $i=0;
- while ($row = mysqli_fetch_array($sql)) {
-
- if (($i != 0 && $sortpostorder==0) || ($i < $rows && $sortpostorder==1)) {
- if ($row['ocena'] == 0) echo '<span style="color:black">';
- elseif ($row['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($row['ocena'] == 2) echo '<span style="color:#999999">';
- elseif ($row['ocena'] == 3) echo '<span style="color:#999999">';
- else echo '<span>';
-
- echo '<b>'.$f->user($row['uid']).'</b> ('.$f->datetime1($row['time']).'):';
-
- echo '<div style="float:right">';
- if ($commentmarks == 1) {
- echo ' <select name="ocena'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: this.value, id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});">
- <option value="0"'.($row['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
- <option value="1"'.($row['ocena']==1?' selected="selected"':'').'>'.$lang['srv_todo'].'</option>
- <option value="2"'.($row['ocena']==2?' selected="selected"':'').'>'.$lang['srv_done'].'</option>
- <option value="3"'.($row['ocena']==3?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- } else {
- // Checkbox za "Koncano"
- echo '<input type="checkbox" name="ocena_'.$row['id'].'" id="ocena_'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (this.checked?\'2\':\'0\'), id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});" value="2" '.($row['ocena'] >= 2?' checked':'').' />';
- echo '<label for="ocena_'.$row['id'].'">'.$lang['srv_done'].'</label>';
- }
- echo '</div>';
-
- echo '<br/>'.$row['vsebina'].'<hr>';
-
- echo '</span>';
- }
- $i++;
- }
- }
- // Nimamo komentarja
- else{
- // Ce so komentarji aktivirani
- if($survey_comment != ''){
- echo $lang['srv_no_comments_solved'];
- }
- else{
- echo $lang['srv_no_comments'];
- }
- }
-
- echo '</div>';
-
- // Dodajanje novega komentarja
- echo '<div id="survey_comment_0_4" style="display:none"></div>';
- echo '<p><a href="#" onclick="$(\'#comment_field_admin\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
- echo '<p id="comment_field_admin" style="display:none">';
- $ba = new BranchingAjax($this->anketa);
- $ba->add_comment_field(0, '1', '4', false);
- echo '</p>';
-
- echo '</div>';
-
-
- // Splosni komentarji respondentov - desno
- echo '<div class="komentarji_anketa komentarji_resp">';
- echo '<span class="komentarji_title">'.$lang['srv_comments_anketa_resp'].' ('.$comment_count['survey_resp']['unresolved'].'/'.$comment_count['survey_resp']['all'].')</span>';
-
- echo '<div style="padding: 20px 20px">';
-
- $sql = sisplet_query("SELECT * FROM srv_comment_resp WHERE ank_id='$this->anketa' ".$only_unresolved." ORDER BY comment_time $orderby, id $orderby");
- if (mysqli_num_rows($sql) > 0) {
-
- echo '<img src="img_0/'.($sortpostorder==1?'up':'down').'.gif" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'" />';
- echo '<br />';
-
- while ($row = mysqli_fetch_array($sql)) {
-
- if ($row['ocena'] == 0) echo '<span style="color:black">';
- elseif ($row['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($row['ocena'] == 2) echo '<span style="color:#999999">';
- elseif ($row['ocena'] == 3) echo '<span style="color:#999999">';
- else echo '<span>';
-
- $datetime = strtotime($row['comment_time']);
- $datetime = date("d.m G:i", $datetime);
-
- if($row['usr_id'] == 0){
- $user = $lang['guest'];
- }
- else{
- $sqlU = sisplet_query("SELECT name FROM users WHERE id='$row[usr_id]'");
- $rowU = mysqli_fetch_array($sqlU);
-
- $user = $rowU['name'];
- }
-
- echo '<b>'.$user.'</b> ('.$datetime.'):';
-
- echo '<div style="float:right">';
- if ($commentmarks == 1) {
- echo ' <select name="ocena'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: this.value, id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});">
- <option value="0"'.($row['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
- <option value="1"'.($row['ocena']==1?' selected="selected"':'').'>'.$lang['srv_todo'].'</option>
- <option value="2"'.($row['ocena']==2?' selected="selected"':'').'>'.$lang['srv_done'].'</option>
- <option value="3"'.($row['ocena']==3?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- } else {
- // Checkbox za "Koncano"
- echo '<input type="checkbox" name="ocena_'.$row['id'].'" id="ocena_'.$row['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_survey_comment\', ocena: (this.checked?\'2\':\'0\'), id: \''.$row['id'].'\', anketa: \''.$rowa['id'].'\'}, function () {window.location.reload();});" value="2" '.($row['ocena'] >= 2?' checked':'').' />';
- echo '<label for="ocena_'.$row['id'].'">'.$lang['srv_done'].'</label>';
- }
- echo '</div>';
-
- echo '<br/>'.$row['comment'].'<hr>';
-
- echo '</span>';
- }
- }
- // Nimamo komentarja
- else{
- // Ce so komentarji aktivirani
- if($survey_comment_resp != ''){
- echo $lang['srv_no_comments_solved'];
- }
- else{
- echo $lang['srv_no_comments'];
- }
- }
-
- echo '</div>';
-
- // Dodajanje novega komentarja
- echo '<div id="survey_comment_0_5" style="display:none"></div>';
- echo '<p><a href="#" onclick="$(\'#comment_field_resp\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
- echo '<p id="comment_field_resp" style="display:none">';
- $ba = new BranchingAjax($this->anketa);
- $ba->add_comment_field(0, '4', '5', false);
- echo '</p>';
-
- echo '</div>';
-
-
- echo '</div>';
- echo '</div>';
- }
-
- function testiranje_komentarji_komentarji_na_anketo ($return = true) {
-
- $rowi = SurveyInfo::getInstance()->getSurveyRow();
-
- #komentarji na anketo
- # vsi komentarji na anketo
- $strta = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0";
- $sqlta = sisplet_query($strta);
- list($rowta) = mysqli_fetch_row($sqlta);
-
- # nerešeni komentarji: only_unresolved => ocena <= 1
- $strtu = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0 AND ocena <= 1 ";
- $sqltu = sisplet_query($strtu);
- list($rowtu) = mysqli_fetch_row($sqltu);
-
- if ($return)
- return '(<span class="lightRed">'.(int)$rowtu.'</span>/'.(int)$rowta.')';
- else
- return (int)$rowtu;
- }
-
- public function testiranje_komentarji_count () {
-
- $comment_count = array();
-
- $rowi = SurveyInfo::getInstance()->getSurveyRow();
-
-
- // KOMENTARJI NA ANKETO - UREDNIK
- # vsi komentarji na anketo
- $strta = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0";
- $sqlta = sisplet_query($strta);
- list($rowta) = mysqli_fetch_row($sqlta);
-
- # nerešeni komentarji: only_unresolved => ocena <= 1
- $strtu = "SELECT count(*) FROM post WHERE tid='".$rowi['thread']."' AND parent > 0 AND ocena <= 1 ";
- $sqltu = sisplet_query($strtu);
- list($rowtu) = mysqli_fetch_row($sqltu);
- //(int)$rowtu.'/'.(int)$rowta;
- $comment_count['survey_admin']['all'] = (int)$rowta;
- $comment_count['survey_admin']['unresolved'] = (int)$rowtu;
-
-
- // KOMENTARJI NA ANKETO - RESPONDENT
- # vsi komentarji na anketo
- $strta = "SELECT count(*) FROM srv_comment_resp WHERE ank_id='".$this->anketa."'";
- $sqlta = sisplet_query($strta);
- list($rowta) = mysqli_fetch_row($sqlta);
-
- # nerešeni komentarji: only_unresolved => ocena <= 1
- $strtu = "SELECT count(*) FROM srv_comment_resp WHERE ank_id='".$this->anketa."' AND ocena <= 1 ";
- $sqltu = sisplet_query($strtu);
- list($rowtu) = mysqli_fetch_row($sqltu);
- //(int)$rowtu.'/'.(int)$rowta;
- $comment_count['survey_resp']['all'] = (int)$rowta;
- $comment_count['survey_resp']['unresolved'] = (int)$rowtu;
-
-
- // KOMENTARJI NA VPRASANJE
- # naenkrat preberemo vse spremenljivke, da ne delamo queryja vsakic posebej
- $spremenljivke = Cache::cache_all_srv_spremenljivka($this->anketa, true);
- $spr_id=array();
- $threads=array();
- if ( is_array($spremenljivke) && count($spremenljivke) > 0 ) {
-
- foreach ($spremenljivke as $id=>$value) {
- $spr_id[] = $id;
-
- if ((int)$value['thread'] > 0) {
- $threads[] = $value['thread'];
- }
- }
- }
- if (count($spr_id) > 0) {
- #preštejemo komentarje uporabnikov na vprašanja
- # srv_data_text where spr_id = 0 AND vre_id IN (id-ji spremenljivk)
- $strqr = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).")";
- $sqlqr = sisplet_query($strqr);
- list($rowqr) = mysqli_fetch_row($sqlqr);
-
- #končani komentarji respondentov
- #text2 = 2 => končan
- #text2 = 3 => nerelevantno
- $strqrf = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).") AND text2 IN (2,3)";
- $sqlqrf = sisplet_query($strqrf);
- list($rowqrf) = mysqli_fetch_row($sqlqrf);
-
- # preštejemo
- if (count($threads) > 0) {
- # vsi komentarji na anketo
- $strta = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0";
- $sqlta = sisplet_query($strta);
- list($rowtqa) = mysqli_fetch_row($sqlta);
- # nerešeni komentarji: only_unresolved => ocena <= 1
- $strtu = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0 AND ocena IN (2,3) ";
- $sqltu = sisplet_query($strtu);
- list($rowtqu) = mysqli_fetch_row($sqltu);
- }
- }
-
- #vsi
- //$all = (int)((int)$rowqr + (int)$rowtqa);
- #nerešeni
- //$unresolved = $all - (int)((int)$rowqrf + (int)$rowtqu);
- $comment_count['question']['all'] = (int)((int)$rowqr + (int)$rowtqa);
- $comment_count['question']['unresolved'] = $comment_count['question']['all'] - (int)((int)$rowqrf + (int)$rowtqu);
-
- // KOMENTARJI NA IF ALI BLOK
- # naenkrat preberemo vse ife in bloke, da ne delamo queryja vsakic posebej
- $ifi = Cache::cache_all_srv_if($this->anketa, true);
- $if_id = array();
- $threads_if = array();
- if ( is_array($ifi) && count($ifi) > 0 ) {
-
- foreach ($ifi as $id=>$value) {
- $if_id[] = $id;
-
- if ((int)$value['thread'] > 0) {
- $threads_if[] = $value['thread'];
- }
- }
- }
- if (count($if_id) > 0) {
-
- #preštejemo komentarje uporabnikov na vprašanja
- # srv_data_text where if_id = 0 AND vre_id IN (id-ji spremenljivk)
- $strqr = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$if_id).")";
- $sqlqr = sisplet_query($strqr);
- list($rowqr_if) = mysqli_fetch_row($sqlqr);
-
- #končani komentarji respondentov
- #text2 = 2 => končan
- #text2 = 3 => nerelevantno
- $strqrf = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$if_id).") AND text2 IN (2,3)";
- $sqlqrf = sisplet_query($strqrf);
- list($rowqrf_if) = mysqli_fetch_row($sqlqrf);
-
- # preštejemo
- if (count($threads_if) > 0) {
- # vsi komentarji na anketo
- $strta = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads_if).") AND parent > 0";
- $sqlta = sisplet_query($strta);
- list($rowtqa_if) = mysqli_fetch_row($sqlta);
- # nerešeni komentarji: only_unresolved => ocena <= 1
- $strtu = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads_if).") AND parent > 0 AND ocena IN (2,3) ";
- $sqltu = sisplet_query($strtu);
- list($rowtqu_if) = mysqli_fetch_row($sqltu);
- }
- }
-
- $comment_count['question']['all'] += (int)((int)$rowqr_if + (int)$rowtqa_if);
- $comment_count['question']['unresolved'] += ((int)((int)$rowqr_if + (int)$rowtqa_if)) - ((int)((int)$rowqrf_if + (int)$rowtqu_if));
-
-
- return $comment_count;
- }
-
- /**
- * $return pove a vrne text (true) ali samo številko (false)
- */
- function testiranje_komentarji_komentarji_na_vprasanje ($return = true) {
-
- # naenkrat preberemo vse spremenljivke, da ne delamo queryja vsakic posebej
- $spremenljivke = Cache::cache_all_srv_spremenljivka($this->anketa, true);
-
- $spr_id=array();
- $threads=array();
- if ( is_array($spremenljivke) && count($spremenljivke) > 0 ) {
- foreach ($spremenljivke as $id=>$value) {
- $spr_id[] = $id;
- if ((int)$value['thread'] > 0) {
- $threads[] = $value['thread'];
- }
- }
- }
- if (count($spr_id) > 0) {
- #preštejemo komentarje uporabnikov na vprašanja
- # srv_data_text where spr_id = 0 AND vre_id IN (id-ji spremenljivk)
- $strqr = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).")";
- $sqlqr = sisplet_query($strqr);
- list($rowqr) = mysqli_fetch_row($sqlqr);
-
- #končani komentarji respondentov
- #text2 = 2 => končan
- #text2 = 3 => nerelevantno
- $strqrf = "SELECT count(*) FROM srv_data_text".$this->db_table." WHERE spr_id=0 AND vre_id IN (".implode(',',$spr_id).") AND text2 IN (2,3)";
- $sqlqrf = sisplet_query($strqrf);
- list($rowqrf) = mysqli_fetch_row($sqlqrf);
-
- # preštejemo
- if (count($threads) > 0) {
- # vsi komentarji na anketo
- $strta = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0";
- $sqlta = sisplet_query($strta);
- list($rowtqa) = mysqli_fetch_row($sqlta);
- # nerešeni komentarji: only_unresolved => ocena <= 1
- $strtu = "SELECT count(*) FROM post WHERE tid IN (".implode(',',$threads).") AND parent > 0 AND ocena IN (2,3) ";
- $sqltu = sisplet_query($strtu);
- list($rowtqu) = mysqli_fetch_row($sqltu);
- }
- }
-
- #vsi
- $all = (int)((int)$rowqr + (int)$rowtqa);
- # nerešeni
- $unresolved = $all - (int)((int)$rowqrf + (int)$rowtqu);
-
- if ($return)
- // '(<span class="lightRed">'.$unresolved.'</span>/'.$all.')';
- return $unresolved;
- else
- return $unresolved;
-
- }
-
- /**
- * izpise vprasanja, ki imajo komentarje in poleg tudi razprte komentarje
- *
- */
- function testiranje_komentarji () {
- global $lang;
- global $site_url;
- global $admin_type;
- global $global_user_id;
-
- $lang_admin = $lang;
-
- //$sa = new SurveyAdmin(1, $this->anketa);
- include_once('../../main/survey/app/global_function.php');
- new \App\Controllers\SurveyController(true);
- save('forceShowSpremenljivka', true);
-
- $f = new Forum;
- $c = 0;
-
- $lang = $lang_admin;
-
- $b = new Branching($this->anketa);
-
- $d = new Dostop();
-
- $rowi = SurveyInfo::getInstance()->getSurveyRow();
-
- echo '<div id="placeholder" class="komentarji">';
-
-
- echo '<div id="branching" class="branching_new expanded komentarji">';
-
- SurveySetting::getInstance()->Init($this->anketa);
- $question_resp_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_resp_comment_viewadminonly');
- $question_comment_viewadminonly = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewadminonly');
- $question_comment_viewauthor = SurveySetting::getInstance()->getSurveyMiscSetting('question_comment_viewauthor');
- $sortpostorder = SurveySetting::getInstance()->getSurveyMiscSetting('sortpostorder');
- $question_note_view = SurveySetting::getInstance()->getSurveyMiscSetting('question_note_view');
- $addfieldposition = SurveySetting::getInstance()->getSurveyMiscSetting('addfieldposition');
- $commentmarks = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks');
- $commentmarks_who = SurveySetting::getInstance()->getSurveyMiscSetting('commentmarks_who');
-
- $question_comment_viewadminonly = ($question_comment_viewadminonly == '') ? 4 : $question_comment_viewadminonly;
- $question_resp_comment_viewadminonly = ($question_resp_comment_viewadminonly == '') ? 4 : $question_resp_comment_viewadminonly;;
-
- $comment_count = $this->testiranje_komentarji_count();
-
-
- echo '<span id="comment_question_note">';
-
- echo $lang['srv_komentarji_imate'].' ';
- if($comment_count['question']['unresolved'] > 0) echo '<span class="red">';
- echo $this->string_format((int)$comment_count['question']['unresolved'], 'srv_cnt_komentarji');
- if($comment_count['question']['unresolved'] > 0) echo '</span>';
-
- echo ' '.$lang['srv_komentarji_odskupno'].' ';
- echo $this->string_format((int)$comment_count['question']['all'], 'srv_cnt_komentar_na_vprs');
-
- echo '</span>';
-
-
- echo ' <span class="tooltip clr spaceLeft">';
- echo '<a href="'.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.'" target="_blank" style="font-size:15px"><span class="faicon edit_square"></span> '.$lang['srv_survey_testdata'].'</a>';
- echo ' ('.SurveyInfo::getSurveyLink().'&preview=on&testdata=on'.$preview_options.') ';
- echo '<span class="expanded-tooltip bottom light" style="left: -20px;">';
- echo '<b>' . $lang['srv_survey_testdata2'] . ':</b> '.$lang['srv_testdata_text'].'';
- echo '<p>'.$lang['srv_preview_testdata_longtext'].'</p>';
- echo '<span class="arrow"></span>';
- echo '</span>'; // expanded-tooltip bottom
- echo '</span>'; // tooltip
-
-
- # VV: privzeto naj bodo samo nerešeni komentarji
- if (!isset($_GET['only_unresolved'])) {
- $_GET['only_unresolved'] = 1;
- }
-
-
- $sqlf1 = sisplet_query("SELECT p.id FROM post p WHERE p.tid='$rowi[thread]' AND p.ocena='5'");
- while ($rowf1 = mysqli_fetch_array($sqlf1)) {
- $s = sisplet_query("SELECT * FROM views WHERE pid='$rowf1[id]' AND uid='$global_user_id'");
- if (mysqli_num_rows($s) == 0)
- $show_survey_comment = 1;
- }
-
- echo '<span style="float:left; width:auto; margin-top:20px; display:inline-block;">';
-
- // vsa vprasanja
- echo '<label for="all_questions" style="margin-right:40px"><input type="checkbox" id="all_questions" onchange="window.location = \'index.php?anketa='.$this->anketa.'&a=komentarji'.(isset($_GET['only_unresolved'])?'&only_unresolved='.$_GET['only_unresolved']:'').'&all_questions=\'+$(\'#all_questions:checked\').val()" value="1" '.($_GET['all_questions']==1?'checked':'').' />';
- echo $lang['srv_all_questions'];
- echo '</label>';
-
- # samo nerešeni komentarji
- if ($commentmarks == 0) {
- echo '<label for="only_unresolved"><input type="checkbox" id="only_unresolved" onchange="window.location = \'index.php?anketa='.$this->anketa.'&a=komentarji'.(isset($_GET['all_questions'])?'&all_questions='.$_GET['all_questions']:'').'&only_unresolved=\'+$(\'#only_unresolved:checked\').val()" value="1" '.($_GET['only_unresolved']==1?'checked':'').' />';
- //echo $lang['srv_comments_unresolved'].' '.$this->testiranje_komentarji_komentarji_na_vprasanje();
- echo $lang['srv_comments_unresolved'];
- echo '</label>';
- } else {
- echo $lang['move_show'].': <select id="only_unresolved" name="" onchange="window.location = \'index.php?anketa='.$this->anketa.'&a=komentarji&only_unresolved=\'+$(\'#only_unresolved\').val(); " >
- <option value="0"'.($_GET['only_unresolved']==0?' selected="selected"':'').'>'.$lang['all2'].'</option>
- <option value="1"'.($_GET['only_unresolved']==1?' selected="selected"':'').'>'.$lang['srv_comments_unresolved'].'</option>
- <option value="2"'.($_GET['only_unresolved']==2?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
- <option value="3"'.($_GET['only_unresolved']==3?' selected="selected"':'').'>'.$lang['srv_todo'].'</option>
- <option value="4"'.($_GET['only_unresolved']==4?' selected="selected"':'').'>'.$lang['srv_done'].'</option>
- <option value="5"'.($_GET['only_unresolved']==5?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- }
- echo ' '.Help::display('srv_comments_only_unresolved').'</span>';
-
-
-
-
-
- // Nov nacin kjer se sprehodimo cez branching, ker imamo lahko tudi komentarje na ife in bloke
- Common::getInstance()->Init($this->anketa);
- $branching_array = Common::getBranchingOrder();
- if (count($branching_array) > 0) {
-
- $view = 1;
-
- echo '<span class="floatLeft" style="width:100% !important;">';
-
- $b = new Branching($this->anketa);
-
- foreach($branching_array AS $element){
-
- // Gre za if ali blok
- if($element['if_id'] > 0){
- $if_id = $element['if_id'];
-
- $sql1 = sisplet_query("SELECT * FROM srv_if WHERE id = '$if_id'");
- $row1 = mysqli_fetch_array($sql1);
-
- $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ;
- $tid = $row1['thread'];
-
- $only_unresolved = " ";
- $only_unresolved2 = " ";
- if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND ocena <= 1 ";
- if ($_GET['only_unresolved'] == 1) $only_unresolved2 = " AND text2 <= 1 ";
-
- if ($_GET['only_unresolved'] == 2) $only_unresolved = " AND ocena = 0 ";
- if ($_GET['only_unresolved'] == 2) $only_unresolved2 = " AND text2 = 0 ";
-
- if ($_GET['only_unresolved'] == 3) $only_unresolved = " AND ocena = 1 ";
- if ($_GET['only_unresolved'] == 3) $only_unresolved2 = " AND text2 = 1 ";
-
- if ($_GET['only_unresolved'] == 4) $only_unresolved = " AND ocena = 2 ";
- if ($_GET['only_unresolved'] == 4) $only_unresolved2 = " AND text2 = 2 ";
-
- if ($_GET['only_unresolved'] == 5) $only_unresolved = " AND ocena = 3 ";
- if ($_GET['only_unresolved'] == 5) $only_unresolved2 = " AND text2 = 3 ";
-
-
- $tema_vsebuje = substr($lang['srv_forum_intro'],0,10); // da ne prikazujemo 1. default sporocila
-
- if ($admin_type <= $question_comment_viewadminonly) { // vidi vse komentarje
- $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved ORDER BY time $orderby, id $orderby");
- } elseif ($question_comment_viewauthor==1) { // vidi samo svoje komentarje
- $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved AND uid='$global_user_id' ORDER BY time $orderby, id $orderby");
- } else { // ne vidi nobenih komentarjev
- $sqlt = sisplet_query("SELECT * FROM post WHERE 1=0");
- }
-
- if (($_GET['all_questions']=='1') OR (mysqli_num_rows($sqlt) > 0)) {
- $c++;
-
- echo '<div style="margin: 20px 0">';
-
- echo '<li id="branching_'.$if_id.'" class="spr">';
- echo '<div class="spremenljivka_content">';
-
- // Blok
- if($row1['tip'] == 1){
- echo '<div class="spremenljivka_settings" style="font-size:14px; padding:0 0 0 10px;">';
- echo '<span class="conditions_display"><strong class="clr_bl">BLOCK</strong> <span class="colorblock">('.$row1['number'].')</span>';
- echo '</div>';
- }
- // If
- else{
- echo '<div class="spremenljivka_settings" style="font-size:14px; padding:4px 0 0 10px;">';
- $b->conditions_display($if_id);
- echo '</div>';
- }
-
- echo '</div>';
- echo '</li>';
-
- echo '<div style="width:40%; margin: 0 5% 2% 1%; float: left">';
-
- if ($addfieldposition == 1) {
- echo '<div id="survey_comment_'.$if_id.'_'.'4'.'" style="display:none"></div>';
- echo '<p><a href="#" onclick="$(\'#comment_field_'.$if_id.'\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
- echo '<p id="comment_field_'.$if_id.'" style="display:none">';
- $ba = new BranchingAjax($this->anketa);
- $ba->add_comment_field($if_id, '1', '4', false);
- echo '</p>';
- }
-
- // komentarji na vprasanje
- if ($row1['thread'] > 0) {
-
- if (mysqli_num_rows($sqlt) > 0) {
-
- echo '<p class="red"><b>'.$lang['srv_admin_comment'].'</b>';
- //$rowss = mysqli_num_rows($sql);
- //if ($rowss > 0)
- echo '<img src="img_0/'.($sortpostorder==1?'up':'down').'.gif" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'" />';
- echo '</p>';
-
- $i = 0;
- while ($rowt = mysqli_fetch_array($sqlt)) {
- if ($_GET['only_unresolved'] == 1) {
- if ($rowt['ocena'] == 0) echo '<span style="color:black">';
- elseif ($rowt['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($rowt['ocena'] == 2) echo '<span style="color:#999999">';
- elseif ($rowt['ocena'] == 3) echo '<span style="color:#999999">';
- else echo '<span>';
- } else {
- if ($rowt['ocena'] == 0) echo '<span style="color:#990000">';
- elseif ($rowt['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($rowt['ocena'] == 2) echo '<span style="color:black">';
- elseif ($rowt['ocena'] == 3) echo '<span style="color:black">';
- else echo '<span>';
- }
-
- echo '<b>'.$f->user($rowt['uid']).'</b> ('.$f->datetime1($rowt['time']).'):';
-
- if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) {
-
- echo '<div style="float:right; text-align:right">';
-
- if ($commentmarks == 1) {
- echo ' <select name="ocena" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: this.value, id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});">
- <option value="0"'.($rowt['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
- <option value="1"'.($rowt['ocena']==1?' selected="selected"':'').'>'.$lang['srv_todo'].'</option>
- <option value="2"'.($rowt['ocena']==2?' selected="selected"':'').'>'.$lang['srv_done'].'</option>
- <option value="3"'.($rowt['ocena']==3?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- } else {
- echo '<input type="checkbox" name="ocena_'.$rowt['id'].'" id="ocena_'.$rowt['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (this.checked?\'2\':\'0\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});" value="2" '.($rowt['ocena'] >= 2?' checked':'').' /><label for="ocena_'.$rowt['id'].'">'.$lang['srv_done'].'</label>';
- }
- echo ' <br /><a href="javascript:comment_on_comment(\''.$rowt['id'].'\');">'.$lang['srv_comment_comment'].'</a>';
- echo '</div>';
- }
-
- echo '<br/>'.$rowt['vsebina'].'<span id="comment_on_comment_'.$rowt['id'].'"></span><hr>';
- echo '</span>';
- }
- }
- }
-
- if ($addfieldposition == '' || $addfieldposition == 0) {
- echo '<div id="survey_comment_'.$spr_id.'_'.'4'.'" style="display:none"></div>';
- echo '<p><a href="#" onclick="$(\'#comment_field_'.$spr_id.'\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
- echo '<p id="comment_field_'.$spr_id.'" style="display:none">';
- $ba = new BranchingAjax($this->anketa);
- $ba->add_comment_field($spr_id, '1', '4', false);
- echo '</p>';
- }
-
- echo '</div>';
-
- echo '<div class="clr"></div>';
- echo '</div>';
- }
- }
- // Gre za navadno vprasanje
- else{
- $spr_id = $element['spr_id'];
-
- $sql1 = sisplet_query("SELECT thread, note FROM srv_spremenljivka WHERE id = '$spr_id'");
- $row1 = mysqli_fetch_array($sql1);
-
- $orderby = $sortpostorder == 1 ? 'DESC' : 'ASC' ;
- $tid = $row1['thread'];
-
- $only_unresolved = " ";
- $only_unresolved2 = " ";
- if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND ocena <= 1 ";
- if ($_GET['only_unresolved'] == 1) $only_unresolved2 = " AND text2 <= 1 ";
-
- if ($_GET['only_unresolved'] == 2) $only_unresolved = " AND ocena = 0 ";
- if ($_GET['only_unresolved'] == 2) $only_unresolved2 = " AND text2 = 0 ";
-
- if ($_GET['only_unresolved'] == 3) $only_unresolved = " AND ocena = 1 ";
- if ($_GET['only_unresolved'] == 3) $only_unresolved2 = " AND text2 = 1 ";
-
- if ($_GET['only_unresolved'] == 4) $only_unresolved = " AND ocena = 2 ";
- if ($_GET['only_unresolved'] == 4) $only_unresolved2 = " AND text2 = 2 ";
-
- if ($_GET['only_unresolved'] == 5) $only_unresolved = " AND ocena = 3 ";
- if ($_GET['only_unresolved'] == 5) $only_unresolved2 = " AND text2 = 3 ";
-
-
- $tema_vsebuje = substr($lang['srv_forum_intro'],0,10); // da ne prikazujemo 1. default sporocila
-
- if ($admin_type <= $question_comment_viewadminonly) { // vidi vse komentarje
- $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved ORDER BY time $orderby, id $orderby");
- } elseif ($question_comment_viewauthor==1) { // vidi samo svoje komentarje
- $sqlt = sisplet_query("SELECT * FROM post WHERE vsebina NOT LIKE '%{$tema_vsebuje}%' AND tid='$tid' $only_unresolved AND uid='$global_user_id' ORDER BY time $orderby, id $orderby");
- } else { // ne vidi nobenih komentarjev
- $sqlt = sisplet_query("SELECT * FROM post WHERE 1=0");
- }
-
- $sql2 = sisplet_query("SELECT COUNT(*) AS count FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spr_id' $only_unresolved2");
- $row2 = mysqli_fetch_array($sql2);
-
-
- if ( ($_GET['all_questions']=='1') OR ( mysqli_num_rows($sqlt) > 0 || $row2['count'] > 0 || $row1['note'] != '' ) ) {
- $c++;
-
- echo '<div style="margin: 20px 0">';
-
- echo '<li id="branching_'.$spr_id.'" class="spr">';
- $b->vprasanje($spr_id);
- echo '</li>';
-
- if ($admin_type <= $question_note_view || $question_note_view == '') {
-
- if ($row1['note'] != '') {
- echo '<div style="float:left; width:100%; margin-left: 1%">';
- echo '<p class="red"><b><a href="#" class="gray" onclick="$(\'.note-'.$spr_id.', .pl, .mn\').toggle(); return false;"><span class="pl">+</span><span class="mn" style="display:none">-</span> '.$lang['srv_note'].'</a></b></p>';
- echo '<p class="note-'.$spr_id.' displayNone">'.nl2br($row1['note']).'</p>';
- echo '</div>';
- }
- }
-
- echo '<div style="width:40%; margin: 0 5% 2% 1%; float: left">';
-
- if ($addfieldposition == 1) {
- echo '<div id="survey_comment_'.$spr_id.'_'.'4'.'" style="display:none"></div>';
- echo '<p><a href="#" onclick="$(\'#comment_field_'.$spr_id.'\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
- echo '<p id="comment_field_'.$spr_id.'" style="display:none">';
- $ba = new BranchingAjax($this->anketa);
- $ba->add_comment_field($spr_id, '1', '4', false);
- echo '</p>';
- }
-
- // komentarji na vprasanje
- if ($row1['thread'] > 0) {
-
- if (mysqli_num_rows($sqlt) > 0) {
-
- echo '<p class="red"><b>'.$lang['srv_admin_comment'].'</b>';
- //$rowss = mysqli_num_rows($sql);
- //if ($rowss > 0)
- echo '<img src="img_0/'.($sortpostorder==1?'up':'down').'.gif" style="float:right" title="'.($sortpostorder==1?$lang['forum_desc']:$lang['forum_asc']).'" />';
- echo '</p>';
-
- $i = 0;
- while ($rowt = mysqli_fetch_array($sqlt)) {
- if ($_GET['only_unresolved'] == 1) {
- if ($rowt['ocena'] == 0) echo '<span style="color:black">';
- elseif ($rowt['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($rowt['ocena'] == 2) echo '<span style="color:#999999">';
- elseif ($rowt['ocena'] == 3) echo '<span style="color:#999999">';
- else echo '<span>';
- } else {
- if ($rowt['ocena'] == 0) echo '<span style="color:#990000">';
- elseif ($rowt['ocena'] == 1) echo '<span style="color:darkgreen">';
- elseif ($rowt['ocena'] == 2) echo '<span style="color:black">';
- elseif ($rowt['ocena'] == 3) echo '<span style="color:black">';
- else echo '<span>';
- }
-
- echo '<b>'.$f->user($rowt['uid']).'</b> ('.$f->datetime1($rowt['time']).'):';
-
- if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) {
-
- echo '<div style="float:right; text-align:right">';
-
- if ($commentmarks == 1) {
- echo ' <select name="ocena" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: this.value, id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});">
- <option value="0"'.($rowt['ocena']==0?' selected="selected"':'').'>'.$lang['srv_undecided'].'</option>
- <option value="1"'.($rowt['ocena']==1?' selected="selected"':'').'>'.$lang['srv_todo'].'</option>
- <option value="2"'.($rowt['ocena']==2?' selected="selected"':'').'>'.$lang['srv_done'].'</option>
- <option value="3"'.($rowt['ocena']==3?' selected="selected"':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- } else {
- echo '<input type="checkbox" name="ocena_'.$rowt['id'].'" id="ocena_'.$rowt['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'question_comment\', ocena: (this.checked?\'2\':\'0\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});" value="2" '.($rowt['ocena'] >= 2?' checked':'').' /><label for="ocena_'.$rowt['id'].'">'.$lang['srv_done'].'</label>';
- }
- echo ' <br /><a href="javascript:comment_on_comment(\''.$rowt['id'].'\');">'.$lang['srv_comment_comment'].'</a>';
- echo '</div>';
- }
-
- echo '<br/>'.$rowt['vsebina'].'<span id="comment_on_comment_'.$rowt['id'].'"></span><hr>';
- echo '</span>';
- }
- }
- }
-
- if ($addfieldposition == '' || $addfieldposition == 0) {
- echo '<div id="survey_comment_'.$spr_id.'_'.'4'.'" style="display:none"></div>';
- echo '<p><a href="#" onclick="$(\'#comment_field_'.$spr_id.'\').toggle(); return false;">'.$lang['srv_comments_add_comment'].'</a></p>';
- echo '<p id="comment_field_'.$spr_id.'" style="display:none">';
- $ba = new BranchingAjax($this->anketa);
- $ba->add_comment_field($spr_id, '1', '4', false);
- echo '</p>';
- }
-
- echo '</div>';
-
- // komentarji respondentov
- if ($row2['count'] > 0) {
-
- if ($admin_type <= $question_resp_comment_viewadminonly) {
- echo '<div style="width:40%; margin: 0 5% 0 1%; float: left">';
- echo '<p class="red"><b>'.$lang['srv_repondent_comment'].'</b></p>';
-
- if ($_GET['only_unresolved'] == 1) $only_unresolved = " AND d.text2 <= 1 "; else $only_unresolved = " ";
-
- $sqlt = sisplet_query("SELECT * FROM srv_data_text".$this->db_table." WHERE spr_id='0' AND vre_id='$spr_id' $only_unresolved2 ORDER BY id ASC");
- if (!$sqlt) echo mysqli_error($GLOBALS['connect_db']);
- while ($rowt = mysqli_fetch_array($sqlt)) {
-
- if ($rowt['text2'] == 0) echo '<span style="color:black">';
- elseif ($rowt['text2'] == 1) echo '<span style="color:darkgreen">';
- elseif ($rowt['text2'] == 2) echo '<span style="color:#999999">';
- elseif ($rowt['text2'] == 3) echo '<span style="color:#999999">';
- else echo '<span>';
-
-
- if ($admin_type <= 1 || $rowi['insert_uid']==$global_user_id || $commentmarks_who==0) {
- echo '<div style="float:right">';
- if ($commentmarks == 1) {
- echo ' <select name="ocena'.$rowt['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_comment\', text2: this.value, id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});">
- <option value="0"'.($rowt['text2']==0?' selected':'').'>'.$lang['srv_undecided'].'</option>
- <option value="1"'.($rowt['text2']==1?' selected':'').'>'.$lang['srv_todo'].'</option>
- <option value="2"'.($rowt['text2']==2?' selected':'').'>'.$lang['srv_done'].'</option>
- <option value="3"'.($rowt['text2']==3?' selected':'').'>'.$lang['srv_not_relevant'].'</option>
- </select>';
- } else {
- echo '<input type="checkbox" name="ocena_'.$rowt['id'].'" id="ocena_'.$rowt['id'].'" onchange="$.post(\'ajax.php?a=comment_ocena\', {type: \'respondent_comment\', text2: (this.checked?\'2\':\'0\'), id: \''.$rowt['id'].'\', anketa: \''.$rowi['id'].'\'}, function () {window.location.reload();});" value="2" '.($rowt['text2'] >= 2?' checked':'').' /><label for="ocena_'.$rowt['id'].'">'.$lang['srv_done'].'</label>';
- }
- echo ' </div>';
- }
-
- // Ce smo slucajno pobrisali testne vnose, nimamo casa vnosa komentarja
- $sqlTime = sisplet_query("SELECT time_edit FROM srv_user WHERE id='".$rowt['usr_id']."'");
- if(mysqli_num_rows($sqlTime) > 0){
-
- $rowTime = mysqli_fetch_array($sqlTime);
-
- if ( strpos($rowt['text'], '__DATE__') !== false ) {
- $rowt['text'] = str_replace('__DATE__', $f->datetime1($rowTime['time_edit']), $rowt['text']);
- echo ''.nl2br($rowt['text']).'<hr>';
- }
- else {
- echo ''.$f->datetime1($rowTime['time_edit']).':<br>';
- echo ''.nl2br($rowt['text']).'<hr>';
- }
- }
- else{
- if ( strpos($rowt['text'], '__DATE__') !== false ) {
- $rowt['text'] = str_replace('__DATE__', '', $rowt['text']);
- echo ''.nl2br($rowt['text']).'<hr>';
- }
- else {
- echo ''.nl2br($rowt['text']).'<hr>';
- }
- }
-
- echo '</span>';
-
- }
- echo '</div>';
- }
- }
-
- echo '<div class="clr"></div>';
- echo '</div>';
- }
- }
- }
-
- echo '</span>';
-
- if ($c == 0) {
- echo '<div style="margin-top: 60px;">';
- echo $lang['srv_no_comments_solved'].'<br/>';
- #echo '<a href="index.php?anketa='.$this->anketa.'&a=urejanje">'.$lang['srv_settings_komentarji'].'</a>';
- echo '</div>';
- }
- }
- else {
- echo '<div style="margin-top: 60px;">';
- echo $lang['srv_no_comments'].'<br/>';
- echo '</div>';
- }
-
- echo '</div>'; // branching
- echo '<div id="vprasanje_float_editing"></div>';
- echo '</div>'; // placeholder
- }
-
- /**
* odsteje dva datuma, $d1 - D2
*
*/
@@ -7138,7 +7298,7 @@ class SurveyAdminSettings { function testiranje_testnipodatki () {
global $lang;
- if ($_POST['stevilo_vnosov'] > 0) {
+ if (isset($_POST['stevilo_vnosov']) && $_POST['stevilo_vnosov'] > 0) {
// Nastavitev da vstavljamo samo veljavne vnose
$only_valid = isset($_POST['only_valid']) ? $_POST['only_valid'] : 0;
@@ -7220,7 +7380,7 @@ class SurveyAdminSettings { }
if ($s->checkSpremenljivka($row['id'], $isTestData=true)) {
- if ($vrednost > 0) {
+ if (isset($vrednost) && $vrednost > 0) {
$srv_data_vrednost .= "('$row[id]', '$vrednost', '$this->usr_id'),";
if ($row1['other'] == 1)
$srv_data_text .= "('$row[id]', '$vrednost', '".$this->randomString()."', '', '$this->usr_id'),";
@@ -7258,11 +7418,11 @@ class SurveyAdminSettings { $j++;
}
- if ($vrednost) {
+ if (isset($vrednost)) {
foreach ($vrednost AS $key => $val) {
if ($val > 0) {
$srv_data_vrednost .= "('$row[id]', '$val', '$this->usr_id'),";
- if ($row1['other'] == 1)
+ if (isset($row1['other']) && $row1['other'] == 1)
$srv_data_text .= "('$row[id]', '$val', '".$this->randomString()."', '', '$this->usr_id'),";
}
}
@@ -7388,56 +7548,8 @@ class SurveyAdminSettings { }
}
- //Lokacija
- elseif($row['tip'] == 26){
- //choose location
- $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$row[id]'", 'array');
-
- //so vrednosti, se pravi je choose
- if($sql1){
- foreach($sql1 as $row1){
- if ($s->checkSpremenljivka($row['id'], $isTestData=true)) {
- // Ce imamo samo veljavne imamo vedno vrednost
- if($only_valid == 1)
- $vrednost = $this->randomString();
- else
- $vrednost = rand(0,1)==0 ? $this->randomString() : '';
-
- $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '".
- ($vrednost != '' ? $vrednost : '-1')."', ''),";
- }
- else {
- $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),";
- }
- }
- }
- //niso vrednosti, se pravi je moja ali multi lokacija
- else{
- if ($s->checkSpremenljivka($row['id'], $isTestData=true)) {
-
- $make_input = ($only_valid == 1 ? true : rand(0,1)==0);
- if($make_input){
-
- $lat = floatval(mt_rand(454000, 466500)/10000);
- $lng = floatval(mt_rand(136000, 163900)/10000);
-
- // Ce imamo samo veljavne imamo vedno vrednost
- if($only_valid == 1)
- $vrednost = $this->randomString();
- else
- $vrednost = rand(0,1)==0 ? $this->randomString() : '';
-
- $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '".
- ($vrednost != '' ? $vrednost : '-1')."', ''),";
- }
- }
- else {
- $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),";
- }
- }
- }
- //Heatmap
- elseif($row['tip'] == 27){
+ //Lokacija
+ elseif($row['tip'] == 26){
//choose location
$sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$row[id]'", 'array');
@@ -7451,7 +7563,7 @@ class SurveyAdminSettings { else
$vrednost = rand(0,1)==0 ? $this->randomString() : '';
- $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '".
+ $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '".
($vrednost != '' ? $vrednost : '-1')."', ''),";
}
else {
@@ -7475,7 +7587,7 @@ class SurveyAdminSettings { else
$vrednost = rand(0,1)==0 ? $this->randomString() : '';
- $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '".
+ $srv_data_map .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '".
($vrednost != '' ? $vrednost : '-1')."', ''),";
}
}
@@ -7484,6 +7596,54 @@ class SurveyAdminSettings { }
}
}
+ //Heatmap
+ elseif($row['tip'] == 27){
+ //choose location
+ $sql1 = sisplet_query("SELECT id FROM srv_vrednost WHERE spr_id = '$row[id]'", 'array');
+
+ //so vrednosti, se pravi je choose
+ if($sql1){
+ foreach($sql1 as $row1){
+ if ($s->checkSpremenljivka($row['id'], $isTestData=true)) {
+ // Ce imamo samo veljavne imamo vedno vrednost
+ if($only_valid == 1)
+ $vrednost = $this->randomString();
+ else
+ $vrednost = rand(0,1)==0 ? $this->randomString() : '';
+
+ $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '', '', '', '".
+ ($vrednost != '' ? $vrednost : '-1')."', ''),";
+ }
+ else {
+ $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),";
+ }
+ }
+ }
+ //niso vrednosti, se pravi je moja ali multi lokacija
+ else{
+ if ($s->checkSpremenljivka($row['id'], $isTestData=true)) {
+
+ $make_input = ($only_valid == 1 ? true : rand(0,1)==0);
+ if($make_input){
+
+ $lat = floatval(mt_rand(454000, 466500)/10000);
+ $lng = floatval(mt_rand(136000, 163900)/10000);
+
+ // Ce imamo samo veljavne imamo vedno vrednost
+ if($only_valid == 1)
+ $vrednost = $this->randomString();
+ else
+ $vrednost = rand(0,1)==0 ? $this->randomString() : '';
+
+ $srv_data_heatmap .= "(" . $this->usr_id . ", '$row[id]', '$row1[id]', ". $this->anketa . ", '$lat', '$lng', '[N/A]', '".
+ ($vrednost != '' ? $vrednost : '-1')."', ''),";
+ }
+ }
+ else {
+ $srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),";
+ }
+ }
+ }
// multinumber
elseif ($row['tip'] == 20) {
@@ -7525,7 +7685,7 @@ class SurveyAdminSettings { if ($s->checkSpremenljivka($row['id'], $isTestData=true)) {
$vrednost = rand(0,1)==0 ? $this->randomString() : '';
- if ($vrednost != '')
+ if (isset($vrednost) && $vrednost != '')
$srv_data_text .= "('$row[id]', '', '$vrednost', '', '$this->usr_id'),";
} else {
$srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),";
@@ -7546,7 +7706,7 @@ class SurveyAdminSettings { else
$vrednost = rand(0,1)==0 ? $this->randomString() : '';
- if ($vrednost != '')
+ if (isset($vrednost) && $vrednost != '')
$srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '$this->usr_id'),";
}
@@ -7639,7 +7799,7 @@ class SurveyAdminSettings { else
$vrednost = rand(0,1)==0 ? $this->randomDate() : '';
- if ($vrednost != '')
+ if (isset($vrednost) && $vrednost != '')
$srv_data_text .= "('$row[id]', '', '$vrednost', '', '$this->usr_id'),";
} else {
@@ -7674,10 +7834,10 @@ class SurveyAdminSettings { while($row1 = mysqli_fetch_array($sql1)){
- if (count($array) > 0) {
+ if (isset($array) && count($array) > 0) {
$vrednost = array_pop($array);
- if ($vrednost != '')
+ if (isset($vrednost) && $vrednost != '')
$srv_data_rating .= "('$row[id]', '$row1[id]', '$this->usr_id', '$vrednost'),";
}
}
@@ -7711,11 +7871,8 @@ class SurveyAdminSettings { elseif(rand(0,1) == 0)
$vrednost = $this->randomNumber();
- if (isset( $vrednost )) {
-
- if ($vrednost != '')
- $srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '$this->usr_id'),";
- }
+ if (isset($vrednost) && $vrednost != '')
+ $srv_data_text .= "('$row[id]', '$row1[id]', '$vrednost', '', '$this->usr_id'),";
}
else
$srv_data_vrednost .= "('$row[id]', '-2', '$this->usr_id'),";
@@ -7931,9 +8088,9 @@ class SurveyAdminSettings { header("Location: index.php?anketa=$this->anketa&a=testiranje&m=testnipodatki");
- } elseif ($_GET['delete_testdata'] == 1 || $_GET['delete_autogen_testdata'] == 1) {
+ } elseif ((isset($_GET['delete_testdata']) && $_GET['delete_testdata'] == 1) || (isset($_GET['delete_autogen_testdata']) && $_GET['delete_autogen_testdata'] == 1)) {
- if($_GET['delete_autogen_testdata'] == 1)
+ if(isset($_GET['delete_autogen_testdata']) && $_GET['delete_autogen_testdata'] == 1)
sisplet_query("DELETE FROM srv_user WHERE ank_id='$this->anketa' AND testdata='2'");
else
sisplet_query("DELETE FROM srv_user WHERE ank_id='$this->anketa' AND (testdata='1' OR testdata='2')");
@@ -7950,25 +8107,52 @@ class SurveyAdminSettings { $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_user WHERE ank_id='$this->anketa' AND (testdata='1' OR testdata='2')");
$row = mysqli_fetch_array($sql);
$total_rows = $row['count'];
-
+
echo '<form name="" action="ajax.php?anketa='.$this->anketa.'&a=testiranje&m=testnipodatki" method="post" onsubmit="init_progressBar(true);">';
- echo '<p>';
- echo '<span class="spaceRight">'.$lang['srv_stevilo_vnosov'].': <input type="text" name="stevilo_vnosov" value="1" onkeyup="max_stevilo_vnosov();"> (max 1000) </span>';
+
+ echo '<fieldset><legend>'.$lang['srv_testiranje_vnosi'].'</legend>';
+ echo '<p class="bottom16">'.$lang['srv_testni_nagovor'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo $lang['srv_stevilo_vnosov'].':';
+ echo '<div class="max_wrap">';
+ echo '<input class="text large" type="text" name="stevilo_vnosov" value="1" onkeyup="max_stevilo_vnosov();">';
+ echo '<span class="gray">(max. 1000)</span>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
echo '<input type="hidden" name="only_valid" id="only_valid_0" value="0" />';
- echo '<span style="margin: 0 25px;"><label for="only_valid_1">'.$lang['srv_testni_samo_veljavni'].': <input type="checkbox" name="only_valid" id="only_valid_1" value="1"></label></span>';
- echo '<span class="spaceLeft"><input type="submit" name="" value="'.$lang['srv_dodaj_vnose'].'" /></span>';
- echo '</p>';
+ echo '<input type="checkbox" name="only_valid" id="only_valid_1" value="1">';
+ echo '<label for="only_valid_1">'.$lang['srv_testni_samo_veljavni'].'</label>';
+ echo '</div>';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" type="submit">'.$lang['srv_dodaj_vnose'].'</button>';
+ echo '</div>';
+
echo '</form>';
- echo '<p>'.$lang['srv_testni_nagovor'].'</p>';
-
- echo '<a href="#" onClick="delete_test_data();">'.$lang['srv_delete_testdata'].'</a> ('.$total_rows.')';
+ echo '<p class="bottom16">'.$lang['srv_testni_nakonec'].'</p>';
+
+ echo '<a class="noline" href="#" onClick="delete_test_data();"><span class="faicon trash empty link-right"></span>'.$lang['srv_delete_testdata'].'</a> ('.$total_rows.')';
+
if ($total_rows > 0) {
+
+ echo '<table class="table_header">';
+ echo '<tbody>';
+ echo '<tr>';
+ echo '<td> Labela </td>';
+ echo '<td> Veljavni odgovori (Grafični prikaz) </td>';
+ echo '</tr>';
+ echo '</tbody>';
+ echo '</table>';
-
+
$prevpage = 0;
-
+
+
$sql = sisplet_query("SELECT s.id, s.gru_id, s.tip, s.naslov, g.naslov AS pagename FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND s.visible='1' AND g.ank_id='$this->anketa' ORDER BY g.vrstni_red, s.vrstni_red");
while ($row = mysqli_fetch_array($sql)) {
@@ -7981,14 +8165,16 @@ class SurveyAdminSettings { echo '</table>';
echo '</fieldset>';
}
-
- echo '<fieldset><legend>'.$row['pagename'].'</legend>';
- echo '<table style="width:100%">';
+
+ echo '<fieldset class="page_num_fieldset">';
+ echo '<legend class="page_num">'.$row['pagename'].'</legend>';
+ // echo '<span class="dotted_line"> - </span>';
+ echo '<table class="avt_vnosi_table">';
$prevpage = $row['gru_id'];
}
- echo '<tr><td style="width:20%; text-align:left" title="'.strip_tags($row['naslov']).'">'.skrajsaj(strip_tags($row['naslov']),20).'</td>';
+ echo '<tr><td title="'.strip_tags($row['naslov']).'">'.skrajsaj(strip_tags($row['naslov']),50).'</td>';
// radio ali select, checkbox, textbox, textbox*, number, datum
if ( ($row['tip']==1 || $row['tip']==3 || $row['tip']==2 || $row['tip']==4 || $row['tip']==21 || $row['tip']==7 || $row['tip']==8) ) {
@@ -8056,9 +8242,11 @@ class SurveyAdminSettings { }
}
- echo '<td>';
- echo ' <div class="graph_lb" style="text-align: right; float: left; width: '.($p*0.7).'%"> </div>';
- echo ' <span style="display: block; margin: auto auto auto 5px; float: left">'.$p.'% ('.($total_rows-$rowc['count']).')</span>';
+ echo '<td class="graph_cell">';
+ echo '<div class="graph_cell">';
+ echo ' <div class="graph_full" style="width: '.($p*0.9).'%"></div>';
+ echo ' <span>'.$p.'% ('.($total_rows-$rowc['count']).')</span>';
+ echo '</div>';
echo '</td>';
echo '</tr>';
@@ -8068,8 +8256,8 @@ class SurveyAdminSettings { echo '</table>';
echo '</fieldset>';
-
- echo '<p>'.$lang['srv_testni_nakonec'].'</p>';
+
+ echo '</fieldset>';
}
}
}
@@ -8113,7 +8301,7 @@ class SurveyAdminSettings { function displayBtnMailtoPreview($row) {
global $lang;
echo '<div class="floatLeft"><div class="buttonwrapper">';
- echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="'.( ($row['active'] != 1) ? 'alert(\''.$lang['srv_anketa_noactive2'].'\'); ' : 'preview_mailto_email(); ').'return false;">';
+ echo '<a class="ovalbutton ovalbutton_orange" href="#" onclick="'.( ($row['active'] != 1) ? 'genericAlertPopup(\'srv_anketa_noactive2\'); ' : 'preview_mailto_email(); ').'return false;">';
echo '<span>';
//'<img src="icons/icons/accept.png" alt="" vartical-align="middle" />'
echo $lang['srv_mailto_preview'] . '</span></a></div></div>';
@@ -8132,33 +8320,46 @@ class SurveyAdminSettings { $_expire = explode('-',$row['expire']);
$expire = $_expire[2].'.'.$_expire[1].'.'.$_expire[0];
- echo '<fieldset><legend>'.$lang['srv_activate_duration_2'].' '.Help::display('srv_activity_quotas').'</legend>';
- echo '<p>';
- echo '<span class="duration_span">' . $lang['srv_activate_duration_manual_from'].'</span>';
- echo '<input id="startsManual1" type="text" name="durationStarts" value="' . $starts . '" disabled autocomplete="off"/>';
- echo '</p>';
+
+ // Preklop domene na oneclicksurvey.com - ne pustimo spremembe aktivnosti
+ if(DomainChange::check1kaDomainChange() && DomainChange::getInstance($global_user_id)->domainChangeLimits()){
+ return;
+ }
+
+ echo '<fieldset>';
+ echo '<legend>'.$lang['srv_activate_duration_2'].'</legend>';
+ echo '<div class="setting_holder" id="start">';
+ echo '<span class="setting_title">' . $lang['srv_activate_duration_manual_from'].'</span>';
+ echo '<div class="icon_holder">';
+ echo '<input id="startsManual1" type="text" class="large" readonly="true" name="durationStarts" value="' . $starts . '" autocomplete="off"/>';
+ echo '</div>';
+ echo '</div>';
- echo '<p>';
- echo '<span class="duration_span">' . $lang['srv_activate_duration_manual_to'].'</span>';
- echo '<input id="expireManual1" type="text" name="durationExpire" value="' . $expire . '" disabled autocomplete="off"/>';
- echo '</p>';
+ echo '<div class="setting_holder" id="expire">';
+ echo '<span class="setting_title">' . $lang['srv_activate_duration_manual_to'].'</span>';
+ echo '<div class="icon_holder">';
+ echo '<input id="expireManual1" type="text" class="large '.($row['expire'] == PERMANENT_DATE ? ' disabled' : '').'" readonly="true" name="durationExpire" value="' . $expire . '" autocomplete="off"/>';
+ echo '</div>';
+ echo '</div>';
- echo '<p>';
- echo '<span class="duration_span">' . $lang['srv_trajna_anketa'].'</span>';
+ echo '<div class="setting_holder">';
echo '<input id="expirePermanent" type="checkbox" name="expirePermanent" value="1"'.($row['expire'] == PERMANENT_DATE ? ' checked="checked"' : '').' autocomplete="off" onchange="setExpirePermanent();"/>';
- echo '</p>';
- echo '</fieldset>';
+ echo '<label for="expirePermanent">' . $lang['srv_trajna_anketa'].'</label>';
echo '</div>';
- #echo '<span class="floatRight"><div class="buttonwrapper"><a class="ovalbutton ovalbutton_orange" href="#" onclick="anketa_activate_save(\''.$this->anketa.'\',\''.$folders.'\'); return false;"><span>' . $lang['srv_zapri'] . '</span></a></div></span>';
+ echo '</fieldset>';
echo '
- <script type="text/javascript">
+ <script type="text/javascript">
$(document).ready(function () {
datepicker("#startsManual1");
- datepicker("#expireManual1");
- });
- </script>';
+ datepicker("#expireManual1");';
+
+ if($row['expire'] == PERMANENT_DATE)
+ echo '$("#expire").find(".ui-datepicker-trigger").addClass("disabled");';
+
+ echo ' });
+ </script>';
}
function DisplayNastavitveMaxGlasov() {
@@ -8171,73 +8372,54 @@ class SurveyAdminSettings { $row = SurveyInfo::getInstance()->getSurveyRow();
//Nastavitev max stevila glasov
- echo '<br />';
echo '<fieldset>';
echo '<legend>'.$lang['srv_vote_quotas'].' '.Help::display('srv_activity_quotas').'</legend>';
- echo '<p>';
- echo '<span class="duration_span" ><label>' . $lang['srv_vote_quotas_2'] . ':</label></span>';
- echo '<label for="vote_limit_0"><input type="radio" name="vote_limit" value="0" id="vote_limit_0"' . ($row['vote_limit'] == 0 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(0)" />' . $lang['no1'] . '</label>';
- echo '<label for="vote_limit_1"><input type="radio" name="vote_limit" value="1" id="vote_limit_1"' . ($row['vote_limit'] == 1 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(1)" />' . $lang['yes'] . '</label>';
- echo '<label for="vote_limit_2"><input type="radio" name="vote_limit" value="2" id="vote_limit_2"' . ($row['vote_limit'] == 2 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(2)" />' . $lang['srv_data_only_valid'] . ' (status 5, 6) '.Help::display('srv_activity_quotas_valid').'</label>';
-
- echo ' <span class="duration_span"><label for="anketa' . $row['id'] . '" >'.$lang['srv_vote_count'].': </span>';
- echo '<input type="text" id="vote_count" name="vote_count" ' . ($row['vote_limit'] == 0 ? ' disabled="disabled"' : '') . ' value="' . $row['vote_count'] . '" style="width:50px; margin-left: 5px;" maxlength="40" /></label>';
- echo '</p>';
+ echo '<div class="setting_holder '.($row['vote_limit'] == 0 ? 'bottom0' : '').'" id="vote_limit">';
- // Opozorilo, da je limit odgovorov presezen
- echo '<p class="vote_limit_warning" style="padding-left:10px; line-height:20px; '.($row['vote_limit'] == 0 ? ' display:none;' : '').'">';
- echo $lang['srv_survey_voteLimit_warning'].':<br />';
-
- $srv_survey_non_active_voteLimit = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active_voteLimit');
- if ($srv_survey_non_active_voteLimit == '') $srv_survey_non_active_voteLimit = $lang['srv_survey_non_active_voteLimit'];
- echo '<span class="italic spaceLeft">'.$srv_survey_non_active_voteLimit.'</span>';
-
- echo ' <a href="'.$site_url.'admin/survey/index.php?anketa='.$this->anketa.'&a=jezik">'.$lang['edit3'].'</a>';
- echo '</p>';
+ echo '<span class="setting_title">' . $lang['srv_vote_quotas_2'] . ':</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="vote_limit" value="0" id="vote_limit_0"' . ($row['vote_limit'] == 0 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(0)" />';
+ echo '<label for="vote_limit_0">' . $lang['srv_vote_quotas_val0'] . '</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="vote_limit" value="2" id="vote_limit_2"' . ($row['vote_limit'] == 2 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(2)" />';
+ echo '<label for="vote_limit_2">' . $lang['srv_vote_quotas_val2'] . ' '.Help::display('srv_activity_quotas_valid').'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="vote_limit" value="1" id="vote_limit_1"' . ($row['vote_limit'] == 1 ? ' checked="checked"' : '') . ' onClick="voteCountStatus(1)" />';
+ echo '<label for="vote_limit_1">' . $lang['srv_vote_quotas_val1'] . '</label>';
+ echo '</div>';
- echo '</fieldset>';
- }
-
- /**
- * Uporabnik (administrator, manager) lahko dodajata nove uporabnike in jim dodelita dostop
- */
- public function dodajNovegaUporabnika(){
- global $admin_type;
- global $lang;
- global $virtual_domain;
+ echo '</div>';
- // admini lahko dodajajo uporabnike, ki jih nato managirajo
- if($admin_type != 0)
- return '';
- echo '<div id="dodajanjeNovega">';
+ // Opozorilo, da je limit odgovorov presezen
+ echo '<div id="vote_limit_all_warning" class="bottom16 '.($row['vote_limit'] == 0 || $row['vote_limit'] == 2 ? 'displayNone' : '').'">';
+ echo ' <div class="setting_holder red">'.$lang['srv_vote_quotas_all_warning'].'</div>';
+ echo '</div>';
- echo '<form class="manager_add_user" name="admin_add_user" action="ajax.php?t=dostop&a=add_new_user" method="post">';
- echo '<h3><b>'.$lang['srv_users_add_new_title'].'</b></h3>';
+ // Opozorilo, da je limit odgovorov presezen
+ echo '<div id="vote_limit_warning" class="'.($row['vote_limit'] == 0 ? 'displayNone' : '').'">';
- echo '<p><label for="email">'.$lang['email'].':</label><input type="email" id="email" name="email"> '.(!empty($_GET['add']) && $_GET['error']=='email'?'<span class="red">'.$lang['srv_added_false'].'</span>':'').'</p>';
- echo '<p><label for="name">'.$lang['name'].':</label><input type="text" id="name" name="name"></p>';
- echo '<p><label for="surname">'.$lang['surname'].':</label><input type="text" id="surname" name="surname"></p>';
- echo '<p><label for="password">'.$lang['password'].':</label><input type="password" id="password" name="password"> '.(!empty($_GET['add']) && $_GET['error']=='pass'?'<span class="red">'.$lang['pass_doesnt_match'].'</span>':'').'</p>';
- echo '<p><label for="password2">'.$lang['again'].':</label><input type="password" id="password2" name="password2"></p>';
- echo '<p><label for="jezik">'.$lang['lang'].':</label>
- <select id="jezik" name="jezik">
- <option value="1" selected>'.$lang['srv_diagnostics_filter_lang_slo'].'</option>
- <option value="2">'.$lang['srv_diagnostics_filter_lang_ang'].'</option>
- </select>
- </p>';
-
- //echo '<p><button type="submit">'.$lang['add'].'</button></p>';
- echo '<p><div class="buttonwrapper floatLeft">';
- echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="document.admin_add_user.submit();">'.$lang['create'].'</a>';
- echo '</div></p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_vote_count'].':</span>';
+ echo '<input type="text" class="large" id="vote_count" name="vote_count" value="' . $row['vote_count'] . '"/></label>';
+ echo '</div>';
- echo '</form>';
+ echo '<p class="top16">'.$lang['srv_survey_voteLimit_warning'].':</p>';
+
+ $srv_survey_non_active_voteLimit = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_survey_non_active_voteLimit');
+ if ($srv_survey_non_active_voteLimit == '') $srv_survey_non_active_voteLimit = $lang['srv_survey_non_active_voteLimit'];
+ echo '<p><span class="italic">'.$srv_survey_non_active_voteLimit.' </span><a href="'.$site_url.'admin/survey/index.php?anketa='.$this->anketa.'&a=jezik"><span class="faicon edit"></span></a><p>';
+
+ echo '</div>';
- echo '</div>';
- }
+
+ echo '</fieldset>';
+ }
+
/**
* Uporabnik (administrator, manager) lahko dodajata nove uporabnike in jim dodelita dostop
@@ -8246,96 +8428,246 @@ class SurveyAdminSettings { global $admin_type;
global $lang;
global $global_user_id;
- global $virtual_domain;
- // managerji in admini lahko dodajajo uporabnike, ki jih nato managirajo
+ // managerji in admini lahko dodajajo uporabnike, ki jih nato managirajo
if( !($admin_type == 1 || $admin_type == 0) )
return '';
- // Na virtualkah imajo managerji omejitev st. dodeljenih uporabnikov - ZAENKRAT JE TO ONEMOGOCENO, KASNEJE SE LAHKO OMEJI NA PAKET
- if(false && $virtual_domain && $admin_type == 1){
+ $error = isset($_GET['error']) ? $_GET['error'] : '';
- // Limit st. dodeljenih uporabnikov
- $managed_accounts_limit = 5;
- // Prestejemo dodeljene uporabnike
- $sql = sisplet_query("SELECT u.email
- FROM srv_dostop_manage m, users u
- WHERE m.manager='".$global_user_id."' AND u.id=m.user AND u.email NOT LIKE ('D3LMD-%') AND u.email NOT LIKE ('UNSU8MD-%')
- ");
+ // MANAGER lahko samo doda novega uporabnika pod sebe
+ if($admin_type == 1){
- $managed_accounts_count = mysqli_num_rows($sql);
+ echo '<fieldset><legend>'.$lang['n_users_list_add'].'</legend>';
+ echo '<div class="setting_holder">';
+ echo ' <span class="setting_title">'.$lang['srv_users_add_new_type2'].'</span>';
+ echo '</div>';
- echo '<p class="bold" style="padding-left:0px;">';
- echo $lang['srv_users_add_assigned_max_1'].' <span class="red bold">'.$managed_accounts_limit.'</span> '.$lang['srv_users_add_assigned_max_2'];
- // Manager na virtualkah ima omejitev koliko uporabnikov lahko pregleduje
- if($managed_accounts_count >= $managed_accounts_limit){
- echo '<br /><br />';
- echo $lang['srv_users_add_assigned_max_reached'];
- echo '</p>';
-
- return;
- }
- elseif($managed_accounts_count > 0){
- echo '<br /><br />';
- echo $lang['srv_users_add_assigned_current'].' <span class="red bold">'.$managed_accounts_count.' '.$lang['of'].' '.$managed_accounts_limit.'</span>';
- }
+ // Na virtualkah imajo managerji omejitev st. dodeljenih uporabnikov - ZAENKRAT JE TO ONEMOGOCENO, KASNEJE SE LAHKO OMEJI NA PAKET
+ /*if(false && isVirtual() && $admin_type == 1){
+
+ // Limit st. dodeljenih uporabnikov
+ $managed_accounts_limit = 5;
+
+ // Prestejemo dodeljene uporabnike
+ $sql = sisplet_query("SELECT u.email
+ FROM srv_dostop_manage m, users u
+ WHERE m.manager='".$global_user_id."' AND u.id=m.user AND u.email NOT LIKE ('D3LMD-%') AND u.email NOT LIKE ('UNSU8MD-%')
+ ");
+
+ $managed_accounts_count = mysqli_num_rows($sql);
+
+
+ echo '<p class="bold bottom16">';
+ echo $lang['srv_users_add_assigned_max_1'].' <span class="red bold">'.$managed_accounts_limit.'</span> '.$lang['srv_users_add_assigned_max_2'].'</p>';
+
+ // Manager na virtualkah ima omejitev koliko uporabnikov lahko pregleduje
+ if($managed_accounts_count >= $managed_accounts_limit){
+ echo '<p>';
+ echo $lang['srv_users_add_assigned_max_reached'];
+ echo '</p>';
+
+ return;
+ }
+ elseif($managed_accounts_count > 0){
+ echo '<p>';
+ echo $lang['srv_users_add_assigned_current'].' <span class="red bold">'.$managed_accounts_count.' '.$lang['of'].' '.$managed_accounts_limit.'</span></p>';
+ }
+ }*/
+
+
+ // Dodajanje novih uporabnikov pod pregled - ustvari racun, doda uporabnika pod pregled in mu poslje mail
+ echo '<div id="add_user_option_2" class="add_user_option">';
+ echo '<form class="manager_add_user" name="manager_add_user" action="ajax.php?t=dostop&a=manager_add_user" method="post">';
+
+ echo '<div class="setting_holder horizontal">';
+ echo ' <label>'.$lang['name'].':</label>';
+ echo ' <input type="text" class="text large" id="name" name="name">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['surname'].':</label>';
+ echo ' <input type="text" class="text large" id="surname" name="surname">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['email'].':</label>';
+ echo ' <input type="email" class="text large" id="email" name="email"> '.(empty($_GET['add']) && $error=='email'?'<span class="red">'.$lang['srv_added_false'].'</span>':'');
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo ' <label>'.$lang['password'].':</label>';
+ echo ' <input type="password" class="text large" id="password" name="password"> '.(empty($_GET['add']) && $error=='pass'?'<span class="red">'.$lang['pass_doesnt_match'].'</span>':'');
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['password_confirm'].':</label>';
+ echo ' <input type="password" class="text large" id="password2" name="password2">';
+ echo '</div>';
- echo '</p>';
+ echo '<div class="button_holder top16 bottom0">';
+ echo ' <button class="medium blue" onClick="document.manager_add_user.submit();">'.$lang['create_add'].'</button>';
+ echo '</div>';
+
+ echo '</form>';
+ echo '</div>'; //new_user_option
+
+
+ // Managerji lahko dodajajo samo uporabnike z dolocenimi emaili (če jim domeno posebej nastavi admin)
+ // TODO: trenutno onemogočimo dodaja ostalih uporabnikov za managerje. Ko bo stvar vezana na domeno se jim bo omogočilo dodajanje samo domenskih
+ /*elseif(false && $admin_type == 1){
+
+ UserSetting :: getInstance()->Init($global_user_id);
+ $emails = UserSetting :: getInstance()->getUserSetting('manage_domain');
+
+ echo '<br><form class="manager_add_user" action="ajax.php?t=dostop&a=admin_add_user" method="post">';
+ echo '<h3><b>'.sprintf($lang['srv_manager_add_user3'], $emails).'<br />'.$lang['srv_manager_add_user4'].'</b></h3>';
+ echo '<p><input name="uemail" value="" style="width: 500px;" id="manager-email"><span id="manager-email-obvestilo"></span></p>';
+ echo '<p><button type="submit" id="manager-email-submit" style="display:none;">'.$lang['add'].'</button></p>';
+
+ echo '</form>';
+ }*/
+
+ echo '</fieldset>';
}
+ // ADMIN lahko tudi doda uporabnika brez pregleda in doda obstojecega pod pregled
+ else{
- echo '<div id="dodajanje">';
+ echo '<fieldset><legend>'.$lang['n_users_list_add'].'</legend>';
- // Dodajanje novih uporabnikov - ustvari racun, doda uporabnika pod pregled in mu poslje mail
- echo '<form class="manager_add_user" name="manager_add_user" action="ajax.php?t=dostop&a=manager_add_user" method="post">';
- echo '<h3><b>'.$lang['srv_users_add_assigned_title'].'</b></h3>';
- echo '<p><label for="email">'.$lang['email'].':</label><input type="email" id="email" name="email"> '.(empty($_GET['add']) && $_GET['error']=='email'?'<span class="red">'.$lang['srv_added_false'].'</span>':'').'</p>';
- echo '<p><label for="name">'.$lang['name'].':</label><input type="text" id="name" name="name"></p>';
- echo '<p><label for="surname">'.$lang['surname'].':</label><input type="text" id="surname" name="surname"></p>';
- echo '<p><label for="password">'.$lang['password'].':</label><input type="password" id="password" name="password"> '.(empty($_GET['add']) && $_GET['error']=='pass'?'<span class="red">'.$lang['pass_doesnt_match'].'</span>':'').'</p>';
- echo '<p><label for="password2">'.$lang['again'].':</label><input type="password" id="password2" name="password2"></p>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_users_add_new_type'].'</span>';
- echo '<p><div class="buttonwrapper floatLeft">';
- echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="document.manager_add_user.submit();">'.$lang['create_add'].'</a>';
- echo '</div></p>';
+ // Dodajanje novega uporabnika v sistem
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="user_add_type_1" name="user_add_type" value="1" checked="checked" onClick="toggleAddUser(this.value);">';
+ echo ' <label for="user_add_type_1">'. $lang['srv_users_add_new_type1'] .'</label> ';
+ echo '</div>';
- echo '</form>';
+ // Dodajanje novega uporabnika v sistem in pod svoj pregled
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="user_add_type_2" name="user_add_type" value="2" onClick="toggleAddUser(this.value);">';
+ echo ' <label for="user_add_type_2">'. $lang['srv_users_add_new_type2'] .'</label> ';
+ echo '</div>';
- // admini si lahko dodajajo ze obstojece uporabnike
- if ($admin_type == 0) {
+ // Dodajanje obstoječega uporabnika pod pregled
+ echo '<div class="setting_item">';
+ echo ' <input type="radio" id="user_add_type_3" name="user_add_type" value="3" onClick="toggleAddUser(this.value);">';
+ echo ' <label for="user_add_type_3">'. $lang['srv_users_add_new_type3'] .'</label> ';
+ echo '</div>';
+
+ echo '</div>';
- echo '<br /><br /><br />';
- echo '<form class="manager_add_user" name="admin_add_dostop" action="ajax.php?t=dostop&a=admin_add_user" method="post">';
+ // Dodajanje novih uporabnikov - ustvari racun in mu poslje mail
+ echo '<div id="add_user_option_1" class="add_user_option">';
+ echo '<form class="add_new_user" name="add_new_user" action="ajax.php?t=dostop&a=add_new_user" method="post">';
+
+ echo '<div class="setting_holder horizontal">';
+ echo ' <label>'.$lang['name'].':</label>';
+ echo ' <input type="text" class="text large" id="name" name="name">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['surname'].':</label>';
+ echo ' <input type="text" class="text large" id="surname" name="surname">';
+ echo '</div>';
- echo '<h3><b>'.$lang['srv_manager_add_user2'].'</b></h3>';
- echo '<p><select name="uid" class="js-obstojeci-uporabniki-admin-ajax" style="width: 500px;"></select></p>';
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['email'].':</label>';
+ echo ' <input type="email" class="text large" id="email" name="email"> '.(empty($_GET['add']) && $error=='email'?'<span class="red">'.$lang['srv_added_false'].'</span>':'');
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo ' <label>'.$lang['password'].':</label>';
+ echo ' <input type="password" class="text large" id="password" name="password"> '.(empty($_GET['add']) && $error=='pass'?'<span class="red">'.$lang['pass_doesnt_match'].'</span>':'');
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['password_confirm'].':</label>';
+ echo ' <input type="password" class="text large" id="password2" name="password2">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo ' <label>'.$lang['lang'].':</label>';
+ echo ' <input type="radio" id="jezik_1" name="jezik" value="1" '.($lang['id'] == '1' ? 'checked="checked"' : '').'><label for="jezik_1">'.$lang['srv_diagnostics_filter_lang_slo'].'</label>';
+ echo ' <input type="radio" id="jezik_2" name="jezik" value="2" '.($lang['id'] == '2' ? 'checked="checked"' : '').'><label for="jezik_2">'.$lang['srv_diagnostics_filter_lang_ang'].'</label>';
+ echo '</div>';
+
+ echo '<div class="button_holder top16 bottom0">';
+ echo ' <button class="medium blue" onClick="document.add_new_user.submit();">'.$lang['create'].'</button>';
+ echo '</div>';
+
+ echo '</form>';
+ echo '</div>';
+
+
+ // Dodajanje novih uporabnikov pod pregled - ustvari racun, doda uporabnika pod pregled in mu poslje mail
+ echo '<div id="add_user_option_2" class="add_user_option displayNone">';
+ echo '<form class="manager_add_user" name="manager_add_user" action="ajax.php?t=dostop&a=manager_add_user" method="post">';
- //echo '<p><button type="submit">'.$lang['add'].'</button></p>';
- echo '<p><div class="buttonwrapper floatLeft">';
- echo ' <a class="ovalbutton ovalbutton_orange" href="#" onclick="document.admin_add_dostop.submit();">'.$lang['add'].'</a>';
- echo '</div></p>';
+ echo '<div class="setting_holder horizontal">';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['name'].':</span>';
+ echo '<input type="text" class="text large" id="name" name="name">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['surname'].':</span>';
+ echo '<input type="text" class="text large" id="surname" name="surname">';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<p>'.$lang['email'].':</p>';
+ echo '<input type="email" class="text large" id="email" name="email"> '.(empty($_GET['add']) && $error=='email'?'<span class="red">'.$lang['srv_added_false'].'</span>':'');
+ echo '</div>';
+
+ echo '<div class="setting_holder horizontal">';
+ echo '<div class="setting_holder">';
+ echo '<p>'.$lang['password'].':</p>';
+ echo '<input type="password" class="text large" id="password" name="password"> '.(empty($_GET['add']) && $error=='pass'?'<span class="red">'.$lang['pass_doesnt_match'].'</span>':'');
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<p>'.$lang['password_confirm'].':</p>';
+ echo '<input type="password" class="text large" id="password2" name="password2">';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="button_holder top16 bottom0">';
+ echo ' <button class="medium blue" onClick="document.manager_add_user.submit();">'.$lang['create_add'].'</button>';
+ echo '</div>';
echo '</form>';
- }
- // Managerji lahko dodajajo samo uporabnike z dolocenimi emaili (če jim domeno posebej nastavi admin)
- // TODO: trenutno onemogočimo dodaja ostalih uporabnikov za managerje. Ko bo stvar vezana na domeno se jim bo omogočilo dodajanje samo domenskih
- /*elseif(false && $admin_type == 1){
+
+ echo '</div>';
+
- UserSetting :: getInstance()->Init($global_user_id);
- $emails = UserSetting :: getInstance()->getUserSetting('manage_domain');
+ // Dodajanje obstojecih uporabnikov pod pregled
+ echo '<div id="add_user_option_3" class="add_user_option displayNone">';
+
+ echo '<form class="manager_add_user" name="admin_add_dostop" action="ajax.php?t=dostop&a=admin_add_user" method="post">';
- echo '<br><form class="manager_add_user" action="ajax.php?t=dostop&a=admin_add_user" method="post">';
- echo '<h3><b>'.sprintf($lang['srv_manager_add_user3'], $emails).'<br />'.$lang['srv_manager_add_user4'].'</b></h3>';
- echo '<p><input name="uemail" value="" style="width: 500px;" id="manager-email"><span id="manager-email-obvestilo"></span></p>';
- echo '<p><button type="submit" id="manager-email-submit" style="display:none;">'.$lang['add'].'</button></p>';
+ echo '<div class="setting_holder">';
+ echo ' <p class="bottom4">'.$lang['srv_manager_add_user_label'].':</p>';
+ echo ' <select name="uid" class="js-obstojeci-uporabniki-admin-ajax drowpdown large" style="width: 460px;"></select>';
+ echo '</div>';
+
+ echo '<div class="button_holder top16 bottom0">';
+ echo ' <button class="medium blue" onCclick="document.admin_add_dostop.submit();">'.$lang['add'].'</button>';
+ echo '</div>';
echo '</form>';
- }*/
- echo '</div>';
+ echo '</div>';
+
+
+ echo '</fieldset>';
+ }
}
/**
@@ -8345,9 +8677,10 @@ class SurveyAdminSettings { global $lang;
global $admin_type;
- echo '<table id="all_users_list" class="dataTable">';
+ echo '<table id="all_users_list" class="usersTable">';
echo '<thead><tr>';
+ echo '<th>'.$lang['edit2'].'</th>';
echo '<th>' . $lang['srv_survey_list_users_name'] . '</th>';
echo '<th>' . $lang['srv_survey_list_users_email'] . '</th>';
echo '<th>' . $lang['admin_type'] . '</th>';
@@ -8360,22 +8693,9 @@ class SurveyAdminSettings { echo '<th>' . $lang['users_gdpr_title'] . '</th>';
echo '<th>' . $lang['srv_survey_list_users_registred'] . '</th>';
echo '<th>' . $lang['srv_survey_list_users_last_login'] . '</th>';
- echo '<th style="max-width: 70px;">'.$lang['edit2'].'</th>';
echo '</tr></thead>';
echo '</table>';
-
- // Dodajanje uporabnikov
- echo '<div class="add_user">';
-
- // Admin lahko doda novega uporabnika v sistem (brez pregleda)
- if($admin_type == '0'){
- echo '<fieldset class="new_user"><legend>'.$lang['srv_users_add_new'].'</legend>';
- $this->dodajNovegaUporabnika();
- echo '</fieldset>';
- }
-
- echo '</div>';
}
/**
@@ -8389,9 +8709,13 @@ class SurveyAdminSettings { $sqlU = sisplet_query("SELECT name, surname, email FROM users WHERE id='".$global_user_id."'");
$rowU = mysqli_fetch_array($sqlU);
+ //echo "Ime: ".$rowU['name'];
+
+ // PREGLED NAD UPORABNIKI - TABELA
+ echo '<div class="my_users_list_holder">';
- // Naslov
- echo '<h2 style="margin-bottom:30px;">';
+ // Naslov
+ /*echo '<h2 style="margin-bottom:30px;">';
if($admin_type == 0)
echo $lang['administrator'];
@@ -8404,15 +8728,15 @@ class SurveyAdminSettings { echo ' <a href="#" onclick="edit_user(\''.$global_user_id.'\'); return false;" title="Uredi"><i class="fa fa-pencil-alt link-moder"></i></a>';
- echo '</h2>';
+ echo '</h2>'; */
+ echo '<p class="bottom16 caps semi-bold">'.$lang['srv_users_assigned_title'].'</p>';
// Tabela
- echo '<fieldset style="max-width: 100% !important;"><legend>'.$lang['srv_users_assigned_title'].'</legend>';
- //echo '<h4 style="margin-bottom: 10px;">'.$lang['srv_users_assigned_title'].'</h4>';
- echo '<table id="my_users_list" class="dataTable">';
+ echo '<table id="my_users_list" class="usersTable">';
echo '<thead><tr>';
+ echo '<th>'.$lang['edit2'].'</th>';
echo '<th>' . $lang['srv_survey_list_users_name'] . '</th>';
echo '<th>' . $lang['srv_survey_list_users_email'] . '</th>';
echo '<th>' . $lang['admin_type'] . '</th>';
@@ -8423,20 +8747,9 @@ class SurveyAdminSettings { echo '<th>' . $lang['users_gdpr_title'] . '</th>';
echo '<th>' . $lang['srv_survey_list_users_registred'] . '</th>';
echo '<th>' . $lang['srv_survey_list_users_last_login'] . '</th>';
- echo '<th style="max-width: 70px;">'.$lang['edit2'].'</th>';
echo '</tr></thead>';
echo '</table>';
- echo '</fieldset>';
-
-
- // Dodajanje uporabnikov
- echo '<div class="add_user">';
-
- // Manager ali admin lahko doda novega uporabnika pod pregled
- echo '<fieldset class="assign_user"><legend>'.$lang['srv_users_add_assigned'].'</legend>';
- $this->dodeljeniUporabniki();
- echo '</fieldset>';
echo '</div>';
}
@@ -8447,7 +8760,7 @@ class SurveyAdminSettings { public function deletedUsersList(){
global $lang;
- echo '<table id="deleted_users_list" class="dataTable">';
+ echo '<table id="deleted_users_list" class="usersTable">';
echo '<thead><tr>';
echo '<th>'.$lang['srv_survey_list_users_name'].'</th>';
echo '<th>'.$lang['srv_survey_list_users_email'].'</th>';
@@ -8466,7 +8779,7 @@ class SurveyAdminSettings { public function unsignedUsersList(){
global $lang;
- echo '<table id="unsigned_users_list" class="dataTable">';
+ echo '<table id="unsigned_users_list" class="usersTable">';
echo '<thead><tr>';
echo '<th>'.$lang['srv_survey_list_users_name'].'</th>';
echo '<th>'.$lang['srv_survey_list_users_email'].'</th>';
@@ -8485,12 +8798,12 @@ class SurveyAdminSettings { echo '<table id="unconfirmed_mail_user_list" class="dataTable">';
echo '<thead><tr>';
+ echo '<th>'.$lang['edit2'].'</th>';
echo '<th>'.$lang['srv_survey_list_users_name'].'</th>';
echo '<th>'.$lang['srv_survey_list_users_email'].'</th>';
echo '<th>'.$lang['admin_type'].'</th>';
echo '<th>'.$lang['lang'].'</th>';
echo '<th>'.$lang['registered'].'</th>';
- echo '<th style="width: 90px;">'.$lang['edit2'].'</th>';
echo '</tr></thead>';
echo '</table>';
}
@@ -8568,14 +8881,17 @@ class SurveyAdminSettings { if ($_GET['a'] == 'uporabnost'){
- echo '<fieldset><legend>'.$lang['srv_uporabnost'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_uporabnost" name="uporabnost" value="1"'. (isset($modules['uporabnost']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'uporabnost\');" />';
- echo $lang['srv_vrsta_survey_type_4'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_4_3'].'</i>';
+ echo '<fieldset><legend>'.$lang['srv_uporabnost'].Help::display('srv_evalvacija_strani').'</legend>';
+
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_4_3'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="advanced_module_uporabnost" name="uporabnost" value="1"'. (isset($modules['uporabnost']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'uporabnost\');" />';
+ echo '<label for="advanced_module_uporabnost">'.$lang['srv_vrsta_survey_note_4_3a'] . '</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
if(isset($modules['uporabnost'])){
$this->uporabnost();
@@ -8685,13 +9001,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'kviz'){
echo '<fieldset><legend>'.$lang['srv_kviz'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_quiz" name="quiz" value="1" '. (isset($modules['quiz']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'quiz\');" />';
- echo $lang['srv_vrsta_survey_type_6'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_6_4'].'</i>';
+
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_6_4'].'</p>';
+ echo '<div class="setting_holder">';
+ echo ' <input type="checkbox" id="advanced_module_quiz" name="quiz" value="1" '. (isset($modules['quiz']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'quiz\');" />';
+ echo ' <label for="advanced_module_quiz">'.$lang['srv_vrsta_survey_note_6_4a'].'</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
if(isset($modules['quiz'])){
$sq = new SurveyQuiz($this->anketa);
@@ -8709,19 +9027,22 @@ class SurveyAdminSettings { echo '<fieldset><legend>'.$lang['srv_voting'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_voting" name="voting" value="1" '. (isset($modules['voting']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'voting\');" />';
- echo $lang['srv_vrsta_survey_type_18'] . '</label>';
- echo '<br><i>'.$lang['srv_voting_info'].'</i>';
+ echo '<p class="bottom16">'.$lang['srv_voting_info'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_voting_info_link'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_voting_info_warning'].'</p>';
// Opozorilo, da so vabila ze vklopljena in zato modula ni mogoce vklopiti
if(!isset($modules['voting']) && SurveyInfo::getInstance()->checkSurveyModule('email')){
- echo '<br><br><i class="red bold">'.$lang['srv_voting_info_error'].'</i><br>';
+ echo '<p class="bottom16"><i class="red bold">'.$lang['srv_voting_info_error'].'</i></p>';
}
+
+ echo '<div class="setting_holder '.$css_disabled.'">';
+ echo ' <input type="checkbox" id="advanced_module_voting" name="voting" value="1" '. (isset($modules['voting']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'voting\');" />';
+ echo ' <label for="advanced_module_voting">'.$lang['srv_voting_on'].'</label>';
+ echo '</div>';
echo '</fieldset>';
-
- echo '<br />';
-
+
echo '<div id="globalSettingsInner">';
if(isset($modules['voting'])){
$sv = new SurveyVoting($this->anketa);
@@ -8732,13 +9053,14 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'advanced_paradata'){
echo '<fieldset><legend>'.$lang['srv_advanced_paradata'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_advanced_paradata" name="advanced_paradata" value="1" '. (isset($modules['advanced_paradata']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'advanced_paradata\');" />';
- echo $lang['srv_vrsta_survey_type_16'] . '</label>';
- //echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_6_4'].'</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
+
+ echo '<div class="setting_holder '.$css_disabled.'">';
+ echo ' <input type="checkbox" id="advanced_module_advanced_paradata" name="advanced_paradata" value="1" '. (isset($modules['advanced_paradata']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'advanced_paradata\');" />';
+ echo ' <label for="advanced_module_advanced_paradata">'.$lang['srv_vrsta_survey_type_16_on'].'</label>';
+ echo '</div>';
+
+ echo '</fieldset>';
+
echo '<div id="globalSettingsInner">';
if(isset($modules['advanced_paradata'])){
$sap = new SurveyAdvancedParadata($this->anketa);
@@ -8746,6 +9068,24 @@ class SurveyAdminSettings { }
echo '</div>';
}
+ elseif ($_GET['a'] == 'advanced_timestamps'){
+
+ echo '<fieldset><legend>'.$lang['srv_advanced_timestamps'].'</legend>';
+
+ echo '<div class="setting_holder '.$css_disabled.'">';
+ echo ' <input type="checkbox" id="advanced_module_advanced_timestamps" name="advanced_timestamps" value="1" '. (isset($modules['advanced_timestamps']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'advanced_timestamps\');" />';
+ echo ' <label for="advanced_module_advanced_timestamps">'.$lang['srv_vrsta_survey_type_20_on'].'</label>';
+ echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner">';
+ if(isset($modules['advanced_timestamps'])){
+ $sat = new SurveyAdvancedTimestamps($this->anketa);
+ $sat->displaySettings();
+ }
+ echo '</div>';
+ }
elseif ($_GET['a'] == 'json_survey_export'){
echo '<fieldset><legend>'.$lang['srv_json_survey_export'].'</legend>';
@@ -8798,6 +9138,18 @@ class SurveyAdminSettings { echo '</div>';
}
elseif ($_GET['a'] == A_TELEPHONE){
+
+ echo '<div class="phone_settings_top" id="globalSettingsInner">';
+ if(isset($modules['phone'])){
+ $ST = new SurveyTelephone($this->anketa);
+ $ST->action($_GET['m']);
+ }
+ echo '</div>';
+
+ $hide_tel_fieldset = '';
+ if ($_GET['m'] == 'recipients_lists') {
+ $hide_tel_fieldset = 'displayNone';
+ }
// Ce je anketar ne vidi teh nastavitev
$isAnketar = Common::isUserAnketar($this->anketa, $global_user_id);
@@ -8809,46 +9161,46 @@ class SurveyAdminSettings { // Ce se nimamo nobene stevilke v bazi, pustimo da se lahko ugasne
if($rowT['cnt'] == 0){
- echo '<fieldset><legend>'.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_phone" name="phone" value="1" '. (isset($modules['phone']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'phone\');" />';
- echo $lang['srv_vrsta_survey_type_7'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_7_3'].'</i>';
+ echo '<fieldset class="'.$hide_tel_fieldset.'"><legend>'.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').'</legend>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="advanced_module_phone" name="phone" value="1" '. (isset($modules['phone']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'phone\');" />';
+ echo '<label for="advanced_module_phone" class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_type_7'] . '</label>';
+ echo '</div>';
+
+ echo '<p class="top16 '.$css_disabled.'">'.$lang['srv_vrsta_survey_note_7_3'].'</p>';
echo '</fieldset>';
}
- else{
+ /*else{
echo '<span class="blue" style="font-size:14px; font-weight:600;">'.$lang['srv_vrsta_survey_type_7'].'</span> '.Help::display('srv_telephone_help');
echo '<br />';
- }
+ }*/
}
else{
- echo '<fieldset><legend>'.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_phone" name="phone" value="1" '. (isset($modules['phone']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'phone\');" />';
- echo $lang['srv_vrsta_survey_type_7'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_7_3'].'</i>';
+ echo '<fieldset class="'.$hide_tel_fieldset.'"><legend>'.$lang['srv_vrsta_survey_type_7'].' '.Help::display('srv_telephone_help').'</legend>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="advanced_module_phone" name="phone" value="1" '. (isset($modules['phone']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'phone\');" />';
+ echo '<label for="advanced_module_phone" class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_type_7'] . '</label>';
+ echo '</div>';
+
+ echo '<p class="top16 '.$css_disabled.'">'.$lang['srv_vrsta_survey_note_7_3'].'</p>';
echo '</fieldset>';
}
-
- echo '<br />';
- }
-
- echo '<div id="globalSettingsInner">';
- if(isset($modules['phone'])){
- $ST = new SurveyTelephone($this->anketa);
- $ST->action($_GET['m']);
}
- echo '</div>';
}
elseif ($_GET['a'] == A_CHAT){
global $site_path;
echo '<fieldset><legend>'.$lang['srv_vrsta_survey_type_14'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_chat" name="chat" value="1" '. (isset($modules['chat']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'chat\');" />';
- echo $lang['srv_vrsta_survey_type_14'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_14_1'].'</i>';
+
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_14_1'].'</p>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="advanced_module_chat" name="chat" value="1" '. (isset($modules['chat']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'chat\');" />';
+ echo '<label for="advanced_module_chat">'.$lang['srv_vrsta_survey_note_14_1b'].'</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
if(isset($modules['chat'])){
$sc = new SurveyChat($this->anketa);
@@ -8860,13 +9212,15 @@ class SurveyAdminSettings { global $site_path;
echo '<fieldset><legend>'.$lang['srv_vrsta_survey_type_15'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_panel" name="panel" value="1" '. (isset($modules['panel']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'panel\');" />';
- echo $lang['srv_vrsta_survey_type_15'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_15_1'].'</i>';
+ echo '<p>'.$lang['srv_vrsta_survey_note_15_1'].'</p>';
+ echo '<p class="top16 bottom16">'.$lang['srv_vrsta_survey_note_15_1a'].'</p>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="advanced_module_panel" name="panel" value="1" '. (isset($modules['panel']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'panel\');" />';
+ echo '<label for="advanced_module_panel">'.$lang['srv_vrsta_survey_note_15_1b'].'</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
if(isset($modules['panel'])){
$sp = new SurveyPanel($this->anketa);
@@ -8874,6 +9228,26 @@ class SurveyAdminSettings { }
echo '</div>';
}
+ elseif ($_GET['a'] == A_EMAIL_ACCESS){
+ global $site_path;
+
+ echo '<fieldset><legend>'.$lang['srv_vrsta_survey_type_19'].'</legend>';
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_19_1'].'</p>';
+
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" id="advanced_module_email_access" name="email_access" value="1" '. (isset($modules['email_access']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'email_access\');" />';
+ echo '<label for="advanced_module_email_access">'.$lang['srv_vrsta_survey_note_19_2'].'</label>';
+ echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner">';
+ if(isset($modules['email_access'])){
+ $sea = new SurveyEmailAccess($this->anketa);
+ $sea->displaySettings();
+ }
+ echo '</div>';
+ }
elseif ($_GET['a'] == A_FIELDWORK){
global $site_path;
@@ -8892,7 +9266,7 @@ class SurveyAdminSettings { echo '</div>';
}
- elseif ($_GET['a'] == A_MAZA){
+ elseif ($_GET['a'] == A_MAZA){
global $site_path;
echo '<fieldset><legend>'.$lang['srv_maza'].'</legend>';
@@ -8905,14 +9279,14 @@ class SurveyAdminSettings { echo '<div id="globalSettingsInner">';
- if(isset($modules['maza'])){
- $MS = new MAZA($this->anketa);
- $MS ->display();
- }
+ if(isset($modules['maza'])){
+ $MS = new MAZA($this->anketa);
+ $MS ->display();
+ }
echo '</div>';
}
- elseif ($_GET['a'] == A_WPN){
+ elseif ($_GET['a'] == A_WPN){
global $site_path;
echo '<fieldset><legend>'.$lang['srv_wpn'].'</legend>';
@@ -8925,10 +9299,10 @@ class SurveyAdminSettings { echo '<div id="globalSettingsInner">';
- if(isset($modules['wpn'])){
- $MS = new WPN($this->anketa);
- $MS ->display();
- }
+ if(isset($modules['wpn'])){
+ $MS = new WPN($this->anketa);
+ $MS ->display();
+ }
echo '</div>';
}
@@ -8936,19 +9310,20 @@ class SurveyAdminSettings { if ($_GET['m'] == 'respondenti' || $_GET['m'] == "") {
echo '<fieldset><legend>'.$lang['srv_vrsta_survey_type_8'].'</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_social_network" name="social_network" value="1" '. (isset($modules['social_network']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'social_network\');" />';
- echo $lang['srv_vrsta_survey_type_8'] . '</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_8_3'].'</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
+
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_8_3'].'</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_social_network" name="social_network" value="1" '. (isset($modules['social_network']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'social_network\');" />';
+ echo '<label for="advanced_module_social_network">'.$lang['srv_vrsta_survey_note_8_3a'].'</label>';
+ echo '</div>';
+
echo '<div id="globalSettingsInner">';
- // urejanje respondentov
if(isset($modules['social_network'])){
$this->SN_Settings();
}
echo '</div>';
+
+ echo '</fieldset>';
}
}
elseif ($_GET['a'] == A_360){
@@ -8990,26 +9365,29 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli'){
echo '<fieldset><legend>Evoli</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_evoli" name="evoli" value="1" '. (isset($modules['evoli']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli\');" />';
- echo 'Evoli</label>';
- echo '<br/><i class="'.$css_disabled.'">Napredna poročila Evoli</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
- echo '<div id="globalSettingsInner">';
+
+ echo '<p class="bottom16">Napredna poročila Evoli</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_evoli" name="evoli" value="1" '. (isset($modules['evoli']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli\');" />';
+ echo '<label for="advanced_module_evoli">Evoli</label>';
echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner"></div>';
}
elseif ($_GET['a'] == 'evoli_teammeter'){
echo '<fieldset><legend>Evoli team meter</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_evoli_teammeter" name="evoli_teammeter" value="1" '. (isset($modules['evoli_teammeter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_teammeter\');" />';
- echo 'Evoli team meter</label>';
- echo '<br /><i class="'.$css_disabled.'">Napredna poročila Evoli team meter</i>';
+
+ echo '<p class="bottom16">Napredna poročila Evoli team meter</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_evoli_teammeter" name="evoli_teammeter" value="1" '. (isset($modules['evoli_teammeter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_teammeter\');" />';
+ echo '<label for="advanced_module_evoli_teammeter">Evoli team meter</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
// urejanje respondentov
if(isset($modules['evoli_teammeter'])){
@@ -9021,13 +9399,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_quality_climate'){
echo '<fieldset><legend>Evoli quality climate</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_evoli_quality_climate" name="evoli_quality_climate" value="1" '. (isset($modules['evoli_quality_climate']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_quality_climate\');" />';
- echo 'Evoli quality climate</label>';
- echo '<br /><i class="'.$css_disabled.'">Napredna poročila Evoli quality climate</i>';
+
+ echo '<p class="bottom16">Napredna poročila Evoli quality climate</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_evoli_quality_climate" name="evoli_quality_climate" value="1" '. (isset($modules['evoli_quality_climate']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_quality_climate\');" />';
+ echo '<label for="advanced_module_evoli_quality_climate">Evoli quality climate</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
// urejanje respondentov
if(isset($modules['evoli_quality_climate'])){
@@ -9039,13 +9419,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_teamship_meter'){
echo '<fieldset><legend>Evoli teamship meter</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_evoli_teamship_meter" name="evoli_teamship_meter" value="1" '. (isset($modules['evoli_teamship_meter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_teamship_meter\');" />';
- echo 'Evoli teamship meter</label>';
- echo '<br /><i class="'.$css_disabled.'">Napredna poročila Evoli teamship meter</i>';
+
+ echo '<p class="bottom16">Napredna poročila Evoli teamship meter</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_evoli_teamship_meter" name="evoli_evoli_teamship_meter" value="1" '. (isset($modules['evoli_teamship_meter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_teamship_meter\');" />';
+ echo '<label for="advanced_module_evoli_teamship_meter">Evoli teamship meter</label>';
+ echo '</div>';
+
echo '</fieldset>';
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
// urejanje respondentov
if(isset($modules['evoli_teamship_meter'])){
@@ -9057,13 +9439,15 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_organizational_employeeship_meter'){
echo '<fieldset><legend>Evoli organizational employeeship meter</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_evoli_organizational_employeeship_meter" name="evoli_organizational_employeeship_meter" value="1" '. (isset($modules['evoli_organizational_employeeship_meter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_organizational_employeeship_meter\');" />';
- echo 'Evoli organizational employeeship meter</label>';
- echo '<br /><i class="'.$css_disabled.'">Napredna poročila Evoli organizational employeeship meter</i>';
+
+ echo '<p class="bottom16">Napredna poročila Evoli organizational employeeship meter</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_evoli_organizational_employeeship_meter" name="evoli_evoli_organizational_employeeship_meter" value="1" '. (isset($modules['evoli_organizational_employeeship_meter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_organizational_employeeship_meter\');" />';
+ echo '<label for="advanced_module_evoli_organizational_employeeship_meter">Evoli organizational employeeship meter</label>';
+ echo '</div>';
+
echo '</fieldset>';
-
- echo '<br />';
-
+
echo '<div id="globalSettingsInner">';
// urejanje respondentov
if(isset($modules['evoli_organizational_employeeship_meter'])){
@@ -9075,53 +9459,58 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'evoli_employmeter'){
echo '<fieldset><legend>Evoli employ meter</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_evoli_employmeter" name="evoli_employmeter" value="1" '. (isset($modules['evoli_employmeter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_employmeter\');" />';
- echo 'Evoli employeeship meter</label>';
- echo '<br /><i class="'.$css_disabled.'">Napredna poročila Evoli employeeship meter</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
- echo '<div id="globalSettingsInner">';
+
+ echo '<p class="bottom16">Napredna poročila Evoli employeeship meter</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_evoli_employmeter" name="evoli_evoli_employmeter" value="1" '. (isset($modules['evoli_employmeter']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'evoli_employmeter\');" />';
+ echo '<label for="advanced_module_evoli_employmeter">Evoli employeeship meter</label>';
echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner"></div>';
}
elseif ($_GET['a'] == 'mfdps'){
echo '<fieldset><legend>MFDPŠ</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_mfdps" name="mfdps" value="1" '. (isset($modules['mfdps']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'mfdps\');" />';
- echo 'MFDPŠ</label>';
- echo '<br/><i class="'.$css_disabled.'">Napredni izvozi MFDPŠ</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
- echo '<div id="globalSettingsInner">';
+
+ echo '<p class="bottom16">Napredni izvozi MFDPŠ</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_mfdps" name="mfdps" value="1" '. (isset($modules['mfdps']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'mfdps\');" />';
+ echo '<label for="advanced_module_mfdps">MFDPŠ</label>';
echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner"></div>';
}
elseif ($_GET['a'] == 'borza'){
echo '<fieldset><legend>Borza</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_borza" name="borza" value="1" '. (isset($modules['borza']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'borza\');" />';
- echo 'Borza</label>';
- echo '<br/><i class="'.$css_disabled.'">Napredni izvozi Borza</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
- echo '<div id="globalSettingsInner">';
+
+ echo '<p class="bottom16">Napredni izvozi Borza</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_borza" name="borza" value="1" '. (isset($modules['borza']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'borza\');" />';
+ echo '<label for="advanced_module_borza">Borza</label>';
echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner"></div>';
}
elseif ($_GET['a'] == 'mju'){
echo '<fieldset><legend>MJU</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_mju" name="mju" value="1" '. (isset($modules['mju']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'mju\');" />';
- echo 'MJU</label>';
- echo '<br/><i class="'.$css_disabled.'">Napredni izvozi MJU</i>';
-
+
+ echo '<p class="bottom16">Napredni izvozi MJU</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_mju" name="mju" value="1" '. (isset($modules['mju']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'mju\');" />';
+ echo '<label for="advanced_module_mju">MJU</label>';
+ echo '</div>';
+
echo '</fieldset>';
+
- echo '<br />';
-
echo '<div id="globalSettingsInner">';
if(isset($modules['mju'])){
$sme = new SurveyMJUEnote($this->anketa);
@@ -9132,15 +9521,16 @@ class SurveyAdminSettings { elseif ($_GET['a'] == 'excell_matrix'){
echo '<fieldset><legend>Excelleration matrix</legend>';
- echo '<label class="strong'.$css_disabled.'"><input type="checkbox" id="advanced_module_excell_matrix" name="excell_matrix" value="1" '. (isset($modules['excell_matrix']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'excell_matrix\');" />';
- echo 'Excelleration matrix</label>';
- echo '<br/><i class="'.$css_disabled.'">'.$lang['srv_vrsta_survey_note_16_1'].'</i>';
- echo '</fieldset>';
-
- echo '<br />';
-
- echo '<div id="globalSettingsInner">';
+
+ echo '<p class="bottom16">'.$lang['srv_vrsta_survey_note_16_1'].'</p>';
+ echo '<div class="setting_holder bottom0">';
+ echo '<input type="checkbox" id="advanced_module_excell_matrix" name="excell_matrix" value="1" '. (isset($modules['excell_matrix']) ? ' checked="checked"' : '').$disabled.' onChange="toggleAdvancedModule(\'excell_matrix\');" />';
+ echo '<label for="advanced_module_excell_matrix">Excelleration matrix</label>';
echo '</div>';
+
+ echo '</fieldset>';
+
+ echo '<div id="globalSettingsInner"></div>';
}
}
@@ -9168,7 +9558,10 @@ class SurveyAdminSettings { }
function globalUserSettings () {
- global $lang, $global_user_id, $admin_type;
+ global $lang, $global_user_id, $admin_type, $site_url;
+
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
# polovimo nastavitve uporabnika
UserSetting::getInstance()->Init($global_user_id);
@@ -9210,117 +9603,157 @@ class SurveyAdminSettings { $sql = sisplet_query("SELECT lang FROM users WHERE id = '$global_user_id'");
$row = mysqli_fetch_array($sql);
$lang_admin = $row['lang'];
- echo '<span class="nastavitveSpan6">'.$lang['lang'] . ':</span><select name="language">';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="language">'.$lang['lang'] . ':</label><select class="dropdown large" name="language" id="language">';
echo '<option value="1"'.($lang_admin == 1?' selected':'').'>Slovenščina</option>';
echo '<option value="2"'.($lang_admin == 2?' selected':'').'>English</option>';
echo '</select>';
-
- echo '<br />';
-
- // Napredni vmesnik (star design za moje ankete)
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_settings_language_shortcut'].':</span>';
- echo '<input name="showLanguageShortcut" type="hidden" value="0">';
- echo '<input name="showLanguageShortcut" type="checkbox" value="1" '.($showLanguageShortcut == 1?' checked="checked"':'').'></label>';
+ echo '</div>';
- echo '<br />';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_settings_interfaceshow'] . ':</span>';
- // Prikaži ikono za jezik v navigacijski vrstici ankete, desno zgoraj
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_lock_survey_when_activate'].' </span>';
- echo '<input name="lockSurvey" type="hidden" value="0">';
- echo '<input name="lockSurvey" type="checkbox" value="1" '.($lockSurvey == 1?' checked="checked"':'').'></label>';
+ // Prikaži ikono za jezik v navigacijski vrstici ankete, desno zgoraj - TE NASTAVITVE NE UPOSTEVAMO VEC
+ /*echo '<div class="setting_item">';
+ echo '<input name="showLanguageShortcut" type="hidden" value="0">';
+ echo '<input id="showLanguageShortcut" name="showLanguageShortcut" type="checkbox" value="1" '.($showLanguageShortcut == 1?' checked="checked"':'').'>';
+ echo '<label for="showLanguageShortcut">'.$lang['srv_settings_language_shortcut'].'</label>';
+ echo '</div>';*/
- echo '<br />';
-
// Opcija enklik ustvarjanja ankete (v mojih anketah)
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_settings_oneClickCreate'].':</span>';
+ echo '<div class="setting_item">';
echo '<input name="oneclickCreateMySurveys" type="hidden" value="0">';
- echo '<input name="oneclickCreateMySurveys" type="checkbox" value="1" '.($oneclickCreateMySurveys == 1?' checked="checked"':'').'></label>';
-
- echo '<br />';
+ echo '<input id="oneclickCreateMySurveys" name="oneclickCreateMySurveys" type="checkbox" value="1" '.($oneclickCreateMySurveys == 1?' checked="checked"':'').'>';
+ echo '<label for="oneclickCreateMySurveys">'.$lang['srv_settings_oneClickCreate'].Help::display('srv_nastavitve_enklik').'</label>';
+ echo '</div>';
- // Možnost prikaza SA ikone pri vseh anketah
+ // Možnost prikaza SA ikone pri vseh anketah
if($admin_type < 3) {
$showSAicon = UserSetting::getInstance()->getUserSetting('showSAicon');
- echo '<label><span class="nastavitveSpan6">' . $lang['srv_settings_showSAicon'] . ':</span>';
- echo '<input name="showSAicon" type="hidden" value="0">';
- echo '<input name="showSAicon" type="checkbox" value="1" ' . ($showSAicon == 1 ? ' checked="checked"' : '') . '></label>';
+ echo '<div class="setting_item">';
+ echo '<input name="showSAicon" type="hidden" value="0">';
+ echo '<input id="showSAicon" name="showSAicon" type="checkbox" value="1" ' . ($showSAicon == 1 ? ' checked="checked"' : '') . '>';
+ echo '<label for="showSAicon">' . $lang['srv_settings_showSAicon'] .'</label>';
+ echo '</div>';
}
+
+ echo '</div>';
echo '</fieldset>';
echo '<fieldset><legend>'.$lang['srv_survey_settings'].'</legend>';
-
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_settings_oncreation'] . ':</span>';
+
// Aktivna anketa ob aktivaciji - TO PUSTIMO SAMO ADMINOM ZARADI GDPR OPOZORILA OB AKTIVACIJI
if($admin_type == '0'){
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_settings_autoActiveSurvey'].': </span>';
+ echo '<div class="setting_item">';
echo '<input name="autoActiveSurvey" type="hidden" value="0">';
- echo '<input name="autoActiveSurvey" type="checkbox" value="1" '.($autoActiveSurvey == 1?' checked="checked"':'').'></label>';
-
- echo '<br />';
+ echo '<input id="autoActiveSurvey" name="autoActiveSurvey" type="checkbox" value="1" '.($autoActiveSurvey == 1?' checked="checked"':'').'>';
+ echo '<label for="autoActiveSurvey">'.$lang['srv_settings_autoActiveSurvey'].'</label>';
+ echo '</div>';
}
// Komentarji aktivirani ob kreaciji ankete
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_settings_activeComments'].': </span>';
+ echo '<div class="setting_item">';
echo '<input name="activeComments" type="hidden" value="0">';
- echo '<input name="activeComments" type="checkbox" value="1" '.($activeComments == 1?' checked="checked"':'').'></label>';
+ echo '<input id="activeComments" name="activeComments" type="checkbox" value="1" '.($activeComments == 1?' checked="checked"':'').'>';
+ echo '<label for="activeComments">'.$lang['srv_settings_activeComments'].'</label>';
+ echo '</div>';
- echo '<br /><br />';
-
// Uvod ob aktivaciji prikazan
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_create_show_intro'].': </span>';
+ echo '<div class="setting_item">';
echo '<input name="showIntro" type="hidden" value="0">';
- echo '<input name="showIntro" type="checkbox" value="1" '.($showIntro == 1?' checked="checked"':'').'></label>';
+ echo '<input id="showIntro" name="showIntro" type="checkbox" value="1" '.($showIntro == 1?' checked="checked"':'').'>';
+ echo '<label for="showIntro">'.$lang['srv_create_show_intro'].'</label>';
+ echo '</div>';
- echo '<br />';
-
// Zakljucek ob aktivaciji prikazan
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_create_show_concl'].': </span>';
+ echo '<div class="setting_item">';
echo '<input name="showConcl" type="hidden" value="0">';
- echo '<input name="showConcl" type="checkbox" value="1" '.($showConcl == 1?' checked="checked"':'').'></label>';
-
- echo '<br />';
-
+ echo '<input id="showConcl" name="showConcl" type="checkbox" value="1" '.($showConcl == 1?' checked="checked"':'').'>';
+ echo '<label for="showConcl">'.$lang['srv_create_show_concl'].'</label>';
+ echo '</div>';
+
// Ime ob aktivaciji prikazano za respondente
- echo '<label><span class="nastavitveSpan6">'.$lang['srv_create_show_title'].': </span>';
+ echo '<div class="setting_item">';
echo '<input name="showSurveyTitle" type="hidden" value="0">';
- echo '<input name="showSurveyTitle" type="checkbox" value="1" '.($showSurveyTitle == 1?' checked="checked"':'').'></label>';
+ echo '<input id="showSurveyTitle" name="showSurveyTitle" type="checkbox" value="1" '.($showSurveyTitle == 1?' checked="checked"':'').'>';
+ echo '<label for="showSurveyTitle">'.$lang['srv_create_show_title'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_settings_onactivation'] . ':</span>';
+
+ // Zaklep urejanja ob aktivaciji
+ echo '<div class="setting_item">';
+ echo '<input name="lockSurvey" type="hidden" value="0">';
+ echo '<input name="lockSurvey" id="lockSurvey" type="checkbox" value="1" '.($lockSurvey == 1?' checked="checked"':'').'>';
+ echo '<label for="lockSurvey">'.$lang['srv_lock_survey_when_activate'].Help::display('srv_nastavitve_zakleni').'</label>';
+ echo '</div>';
+
+ echo '</div>';
echo '</fieldset>';
echo '</form>';
+ // save gumb
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo '<button class="medium blue" onclick="document.settingsanketa.submit();">'.$lang['edit1337'].'</button>';
+ echo '</div>';
+
+ // div za prikaz uspešnosti shranjevanja
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
+ echo '<div id="success_save"></div>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
+ }
+
// API avtentikacija
- echo '<fieldset><legend>'.$lang['srv_api'].'</legend>';
-
- echo '<span class="nastavitveSpan6">'.$lang['srv_api_auth'].': </span>';
- echo '<a href="#" onClick="generate_API_key(); return false;">'.$lang['srv_api_auth2'].'</a>';
- echo '<br /><br />';
+ echo '<fieldset><legend>'.$lang['srv_api'].Help::display('srv_nastavitve_API').'</legend>';
+
+ echo '<p class="bottom16">'.$lang['srv_api_auth'].':</p>';
+
+ echo '<div class="button_holder bottom16">';
+ echo '<button type="button" class="medium white-black" onClick="generate_API_key(); return false;">'.$lang['srv_api_auth2'].'</button>';
+ echo '</div>';
echo $lang['additional_info_api'];
echo '</fieldset>';
+
+
+ // Izvoz vseh anket v paket
+ echo '<fieldset class="top32"><legend>'.$lang['srv_archive_surveys'].Help::display('archive_surveys').'</legend>';
+
+ echo '<p class="bottom16">'.$lang['srv_archive_surveys_text1'].'</p>';
+ echo '<p class="bottom16">'.$lang['srv_archive_surveys_text2'].'</p>';
+ echo '<p class="bottom32 italic">'.$lang['srv_archive_surveys_text3'].'</p>';
+
+ echo '<div class="button_holder bottom0">';
+ echo ' <button type="button" class="medium white-black" onClick="archive_surveys_display_export(); return false;">'.$lang['srv_archive_surveys_export'].'</button>';
+ echo ' <button type="button" class="medium white-black" onClick="archive_surveys_display_import(); return false;">'.$lang['srv_archive_surveys_import'].'</button>';
+ echo '</div>';
+ echo '</fieldset>';
- // save gumb
- echo ' <div class="buttonwrapper floatLeft spaceLeft"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="document.settingsanketa.submit();"><span>'.$lang['edit1337'] . '</span></a></div>';
-
- echo '<span class="clr"></span>';
-
- // div za prikaz uspešnosti shranjevanja
- if ($_GET['s'] == '1') {
- echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
- }
-
+
echo '</div>';
}
function globalUserMyProfile () {
- global $lang, $global_user_id, $admin_type, $site_domain, $site_url, $app_settings, $aai_instalacija;
+ global $lang, $global_user_id, $admin_type, $site_domain, $site_url;
+
+ $preklici_url = ltrim(str_replace("&s=1","",$_SERVER['REQUEST_URI']),"/");
+ $preklici_url = "'". $site_url . $preklici_url . "'";
// podatki prijavljenega uporabnika
$sql = sisplet_query("SELECT id, name, surname, email, type, gdpr_agree, last_login FROM users WHERE id = '$global_user_id'");
@@ -9332,26 +9765,34 @@ class SurveyAdminSettings { echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n\r";
echo ' <input type="hidden" name="submited" value="1" />' . "\n\r";
- echo ' <fieldset><legend>'.$lang['edit_data'].'</legend>';
-
- echo '<div class="data"><span class="setting_title">'.$lang['logged_in_as'].': </span><span class="bold">'.$row['name'].' '.$row['surname'].'</span></div>';
+ echo '<fieldset><legend>'.$lang['edit_data'].'</legend>';
+
+ //Prijavljeni kot, status, zadnja prijava, aktivni paket
+ echo '<div id="user_info_segment" class="bottom0">';
+
if($row['type'] == '0')
$type = $lang['admin_admin'];
elseif($row['type'] == '1')
$type = $lang['admin_manager'];
else
$type = $lang['admin_narocnik'];
- echo '<div class="data"><span class="setting_title">'.$lang['your_status'].': </span><span class="bold">'.$type.'</span></div>';
-
- // Zadnja prijava
- echo '<div class="data"><span class="setting_title">'.$lang['srv_last_login'].': </span><span class="bold">'.date('j.n.Y', strtotime($row['last_login'])).' '.$lang['ob'].' '.date('H:i', strtotime($row['last_login'])).'</span></div>';
-
-
- // Trenutni paket funkcionalnosti
- if($app_settings['commercial_packages']){
- echo '<br>';
-
+ echo '<div class="user_info text">';
+ echo '<div class="setting_holder">'.$lang['logged_in_as']. ':</div>';
+ echo '<div class="setting_holder">'.$lang['your_status']. ':</div>';
+ echo '<div class="setting_holder">'.$lang['srv_last_login'].':</div>';
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true)
+ echo '<div class="setting_holder">'.$lang['srv_access_package'].':</div>';
+ echo '</div>';
+
+ echo '<div class="user_info data bold">';
+ echo '<div class="setting_holder">'.$row['name'].' '.$row['surname'].'</div>';
+ echo '<div class="setting_holder">'.$type.'</div>';
+ echo '<div class="setting_holder">'.date('j.n.Y', strtotime($row['last_login'])).' '.$lang['ob'].' '.date('H:i', strtotime($row['last_login'])).'</div>';
+
+ // Trenutni paket funkcionalnosti
+ if(AppSettings::getInstance()->getSetting('app_settings-commercial_packages') === true){
+
$sqlA = sisplet_query("SELECT ua.time_activate, ua.time_expire, uap.id AS package_id, uap.name AS package_name
FROM user_access ua, user_access_paket uap
WHERE ua.usr_id='$global_user_id' AND uap.id=ua.package_id
@@ -9359,88 +9800,116 @@ class SurveyAdminSettings { $drupal_url = ($lang['id'] == '2') ? $site_url.'d/en/' : $site_url.'d/';
+
+
// Ni nobenega paketa
- if(mysqli_num_rows($sqlA) == 0){
- $package_string = '1ka ('.$lang['srv_access_package_free'].') - <a href="'.$drupal_url.'cenik/zasebni-paketi">'.$lang['srv_narocila_buy'].'</a>';
+ if(mysqli_num_rows($sqlA) == 0){
+ $package_string = $lang['paket_opis_1ka'].' ('.$lang['srv_access_package_free'].')</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.''.$lang['srv_narocila_buyurl'].'\';">'.$lang['srv_narocila_buy'].'</button>';
}
else{
$rowA = mysqli_fetch_array($sqlA);
+ $userAccess = UserAccess::getInstance($global_user_id);
+ $package_name = $userAccess->getPackageName($rowA['package_id']);
// Ce ima paket 2 ali 3
- if($rowA['package_id'] == '2' || $rowA['package_id'] == '3'){
+ if($rowA['package_id'] == '2' || $rowA['package_id'] == '3'){
// Ce je paket ze potekel
- if(strtotime($rowA['time_expire']) < time()){
+ if(strtotime($rowA['time_expire']) < time()){
- $package_string = '<span class="red bold">';
- $package_string .= $rowA['package_name'];
+ $package_string = '<span>';
+ $package_string .= $package_name;
$package_string .= ' ('.$lang['srv_access_package_expire'].' '.date("d.m.Y", strtotime($rowA['time_expire'])).')';
$package_string .= '</span>';
-
- $package_string .= ' - <a href="'.$drupal_url.'izvedi-nakup/'.$rowA['package_id'].'/podatki/">'.$lang['srv_narocila_extend'].'</a>';
+
+ $package_string .= '</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.'izvedi-nakup/'.$rowA['package_id'].'/podatki/\';">'.$lang['srv_narocila_extend'].'</button>';
}
else{
- $package_string = $rowA['package_name'];
+ $package_string = $package_name;
$package_string .= ' ('.$lang['srv_access_package_valid'].' '.date("d.m.Y", strtotime($rowA['time_expire'])).')';
- $package_string .= ' - <a href="'.$drupal_url.'izvedi-nakup/'.$rowA['package_id'].'/podatki/">'.$lang['srv_narocila_extend'].'</a>';
-
- $package_string .= '<br /><a href="'.$site_url.'admin/survey/index.php?a=narocila" style="line-height:24px;">'.$lang['srv_access_package_all'].'</a>';
+ $package_string .= '</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.'izvedi-nakup/'.$rowA['package_id'].'/podatki/\';">'.$lang['srv_narocila_extend'].'</button>';
}
}
else{
- $package_string = $rowA['package_name'];
+ $package_string = $package_name;
$package_string .= ' ('.$lang['srv_access_package_free'].')';
- $package_string .= ' - <a href="'.$drupal_url.'cenik/zasebni-paketi">'.$lang['srv_narocila_buy'].'</a>';
+ $package_string .= '</div><div class="setting_holder"><button class="medium yellow" type="button" onClick="window.location.href=\''.$drupal_url.''.$lang['srv_narocila_buyurl'].'\';">'.$lang['srv_narocila_buy'].'</button>';
}
}
-
- echo '<div class="data"><span class="setting_title">'.$lang['srv_access_package'].': </span><span class="bold">'.$package_string.'</span></div>';
+ echo '<div class="setting_holder">'.$package_string.'</div>';
}
-
- echo '<br />';
+ echo '</div>';
+
+ echo '</div>';
// AAI nima moznosti spreminjanja imena, priimka, emaila, gesla...
- if($aai_instalacija){
+ if(isAAI()){
echo '<span class="italic">'.$lang['srv_profil_aai_warning'].'</span>';
}
else{
- echo ' <div class="setting"><span class="setting_title">'.$lang['name'].':</span>';
- echo ' <input class="text " name="ime" placeholder="Ime" value="'.$row['name'].'" type="text"></div>';
-
- echo ' <div class="setting"><span class="setting_title">'.$lang['surname'].' :</span>';
- echo ' <input class="text " name="priimek" placeholder="Priimek" value="'.$row['surname'].'" type="text"></div>';
- echo ' <div class="setting"><span class="setting_title">'.$lang['email'].' : <span class="faicon add icon-blue pointer" id="klik-dodaj-email" deluminate_imagetype="png"></span></span>';
- echo ' <input class="text" disabled="disabled" value="'.$row['email'].'" type="text">';
- echo ' <input name="email2" value="'.$row['email'].'" type="hidden">';
- echo ' <span style="margin:0 6.5px"> </span>';
-
- $alternativni_emaili = User::getInstance()->allEmails('brez primarnega');
-
- echo '<label for="active-master" '.(empty($alternativni_emaili) ? 'class="hidden"' : '').'><input class="text" name="active_email" value="master" id="active-master" type="radio" '.(User::getInstance()->primaryEmail() == $row['email'] ? 'checked="checked"' : '').'> '.$lang['login_email_subscription'].'</label>';
- if(!empty($alternativni_emaili)){
- foreach($alternativni_emaili as $email) {
- echo '<br/><span style="width:130px; float:left;"> </span>';
- echo '<input class="text" disabled="disabled" value="'.$email->email.'" type="text">';
- echo '<span style="margin: 0 5px 10px;" onclick="izbrisiAlternativniEmail(\''.$email->id.'\')"><i class="fa fa-times link-sv-moder"></i></span>';
- echo '<input class="text" value="'.($email->id).'" name="active_email" type="radio" '.($email->active == 1 ? 'checked="checked"' : '').'> <label for="active-master">'.$lang['login_email_subscription'].'</label>';
- }
+ echo '<p class="bottom16">'.$lang['srv_profil_settings_text'].'</p>';
+
+ echo '<div class="setting_horizontal_wrapper">';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="ime">'.$lang['name'].':</label>';
+ echo '<input class="large" id="ime" name="ime" placeholder="Ime" value="'.$row['name'].'" type="text">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="priimek">'.$lang['surname'].':</label>';
+ echo '<input class="large" id="priimek" name="priimek" placeholder="Priimek" value="'.$row['surname'].'" type="text">';
+ echo '</div>';
+
+ echo '</div>';
+
+ $alternativni_emaili = User::getInstance()->allEmails('brez primarnega');
+
+ echo '<div class="setting_holder">';
+ echo '<label>'.$lang['email'].':</label>';
+ echo '<div class="icon_holder">';
+ echo '<input class="large disabled" value="'.$row['email'].'" type="text" name="email_main">';
+ if(!empty($alternativni_emaili))
+ echo '<input name="active_email" value="master" id="active-master" type="radio" '.(User::getInstance()->primaryEmail() == $row['email'] ? 'checked="checked"' : '').'><label for="active-master">'.$lang['login_email_subscription'].'</label>';
+ echo '</div>';
+ echo '</div>';
+
+ //Alternativni maili
+ if(!empty($alternativni_emaili)){
+ foreach($alternativni_emaili as $email) {
+ echo '<div class="setting_holder">';
+ echo '<label>'.$lang['altemail'].':</label>';
+ echo '<div class="icon_holder">';
+ echo '<input class="large disabled" value="'.$email->email.'" name="email_alter'.($email->id).'" type="text">';
+ echo '<div class="blue pointer altmail" onclick="izbrisiAlternativniEmail(\''.$email->id.'\', \''.$email->email.'\')"><span class="faicon trash empty"></span></div>';
+ echo '<input value="'.($email->id).'" id="altemail'.($email->id).'" name="active_email" type="radio" '.($email->active == 1 ? 'checked="checked"' : '').'> <label for="altemail'.($email->id).'">'.$lang['login_email_subscription'].'</label>';
+ echo '</div>';
+ echo '</div>';
}
- echo '</div><br />';
-
- echo '<div class="dodaj-alternativni-email" style="display: none;">';
- echo '<div class="vnos">';
- echo '<span class="setting_title">'.$lang['login_alternative_emails'].' :</span>';
- echo '<input class="text" id="alternativni-email" value="" type="text">';
- echo '<span style="margin:0 8px"> </span>';
- echo '<a href="#" onclick="dodajAlternativniEmail()">'.$lang['srv_inv_btn_add_recipients_add'].'</a>';
- echo '</div>';
- echo '<br><div id="alternativno-obvestilo" style="font-style: italic;"></div>';
- echo '<br />';
- echo '</div>';
+ }
+
+ echo '<div class="setting_holder">';
+ echo '<div class="blue pointer" id="klik-dodaj-email"><span class="faicon add"></span>'.$lang['srv_profil_settings_addemail'].'</div>';
+ echo '</div>';
+
+ echo '<div class="setting_holder dodaj-alternativni-email" style="display: none;">';
+ echo '<div class="setting_item">';
+ echo '<label for="alternativni-email">'.$lang['login_alternative_emails'].':</label>';
+ echo '<div class="vnos button_holder inline bottom0">';
+ echo '<input class="large" id="alternativni-email" value="" type="text">';
+ echo '<button type="button" class="medium blue" onclick="dodajAlternativniEmail()">'.$lang['srv_inv_btn_add_recipients_add'].'</button>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div class="setting_item">';
+ echo '<div id="alternativno-obvestilo" class="italic"></div>';
+ echo '</div>';
+
+ echo '</div>';
// Ce je vklopljen modul gorenje, preverimo ce ima se default geslo in izpisemo opozorilo
if (Common::checkModule('gorenje')){
@@ -9448,25 +9917,44 @@ class SurveyAdminSettings { echo '<p class="red bold">'.$lang['gorenje_password_warning'].'</p>';
}
- // Obveščanje
- echo ' <div class="setting"><span class="setting_title">'.$lang['password'].':</span>';
- echo ' <input class="text" name="geslo" placeholder="'.$lang['password'].'" id="p1" value="PRIMERZELODOLGEGAGESLA" onclick="document.getElementById(\'p1\').value=\'\';" type="password"></div>';
-
- echo ' <div class="setting"><span class="setting_title">'.$lang['again'].':</span>';
- echo ' <input class="text" name="geslo2" placeholder="'.$lang['password'].'" id="p2" value="PRIMERZELODOLGEGAGESLA" onclick="document.getElementById(\'p2\').value=\'\';" type="password"></div>';
+ // Geslo
+
+ echo '<div class="setting_horizontal_wrapper">';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="p1">'.$lang['password'].':</label>';
+ echo '<input class="large" name="geslo" placeholder="'.$lang['password'].'" id="p1" value="PRIMERZELODOLGEGAGESLA" onclick="document.getElementById(\'p1\').value=\'\';" type="password">';
+ echo '</div>';
+
+ echo '<div class="setting_holder">';
+ echo '<label for="p2">'.$lang['password_confirm'].':</label>';
+ echo '<input class="large" name="geslo2" placeholder="'.$lang['password'].'" id="p2" value="PRIMERZELODOLGEGAGESLA" onclick="document.getElementById(\'p2\').value=\'\';" type="password">';
+ echo '</div>';
+
+ echo '</div>';
// Prejemanje obvestil
- $red_border = (isset($_GET['unsubscribe']) && $_GET['unsubscribe'] == '1') ? ' border:2px red solid; padding: 5px 10px;' : '';
- echo ' <div class="setting" style="height:auto; float:left; clear:both; margin: 15px 0; '.$red_border.'"><span class="setting_title">'.$lang['srv_gdpr_user_options'].': '.Help::display('srv_gdpr_user_options').'</span>';
- echo ' <label for="gdpr-agree-yes"><input type="radio" name="gdpr_agree" id="gdpr-agree-yes" value="1" '.($row['gdpr_agree'] == 1 ? 'checked="checked"' : null).'/>'.$lang['yes'].'</label>';
- echo ' <label for="gdpr-agree-no"><input type="radio" name="gdpr_agree" id="gdpr-agree-no" value="0" '.($row['gdpr_agree'] == 0 ? 'checked="checked"' : null).'/>'.$lang['no1'].'</label></div>';
+
+ echo '<div class="setting_holder">';
+ echo '<span class="setting_title">'.$lang['srv_gdpr_user_options'].' '.Help::display('srv_gdpr_user_options').'</span>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="gdpr_agree" id="gdpr-agree-yes" value="1" '.($row['gdpr_agree'] == 1 ? 'checked="checked"' : null).'/>';
+ echo '<label for="gdpr-agree-yes">'.$lang['yes'].'</label>';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="gdpr_agree" id="gdpr-agree-no" value="0" '.($row['gdpr_agree'] == 0 ? 'checked="checked"' : null).'/>';
+ echo '<label for="gdpr-agree-no">'.$lang['no1'].'</label>';
+ echo '</div>';
+
+ echo '</div>';
// Google 2 FA
$user_option = User::option($global_user_id, 'google-2fa-secret');
$user_option_validate = User::option($global_user_id, 'google-2fa-validation');
- echo ' <div class="setting" style="clear: both;"><span class="setting_title">'.$lang['google_2fa'].': '.Help::display('srv_google_2fa_options').'</span>';
- echo ' <label for="google-2fa"><input type="checkbox" name="google-2fa" id="google-2fa" value="1" '.(! empty($user_option) ? 'checked="checked"' : '').' onclick="prikaziGoogle2faKodo()"/>'.$lang['yes'].'</label>';
- echo ' </div>';
+ echo '<div class="setting_holder">';
+ echo '<input type="checkbox" name="google-2fa" id="google-2fa" value="1" '.(! empty($user_option) ? 'checked="checked"' : '').' onclick="prikaziGoogle2faKodo()"/>';
+ echo '<label for="google-2fa">'.$lang['google_2fa'].' '.Help::display('srv_google_2fa_options').'</label>';
+ echo '</div>';
if (empty($user_option)) {
$google2fa = new \Sonata\GoogleAuthenticator\GoogleAuthenticator();
@@ -9479,56 +9967,89 @@ class SurveyAdminSettings { echo '<div>'.$lang['google_2fa_admin_enabled'].'<b>'.$googleSecret.'</b></div>';
echo '<div style="padding-top: 10px;">'.$lang['google_2fa_admin_enabled_2'].'</div>';
echo '<input type="hidden" name="google-2fa-secret" value="'.$googleSecret.'">';
- echo '<div><img style="border: 0; padding:10px" src="'.$googleLink.'"/></div>';
- echo '<div>Ko boste shranili nastavitve, bo nastavitev obveljala.</div>';
+ echo '<div><img class="twoFAQRcode" src="'.$googleLink.'"/></div>';
+ echo '<div>'.$lang['google_2fa_admin_save_note'].'</div>';
echo '</div>';
- } elseif (! empty($user_option) && $user_option_validate == 'NOT') {
- echo '<div class="google-2fa-validate">';
- echo '<div style="padding:5px;">'.$lang['google_2fa_admin_validate'].'</div>';
- echo '<div style="display: block; clear: both;padding: 10px;"><input type="text" name="google-2fa-validate"></div>';
- echo '<div class="buttonwrapper floatLeft spaceLeft"><a href="#" class="ovalbutton btn_savesettings" onclick="ponastaviGoogle2fa()">'.$lang['google_2fa_admin_test_code_reset'].'</a></div>';
- echo '<div class="buttonwrapper floatLeft spaceLeft"><a href="#" class="ovalbutton btn_savesettings" onclick="aktivirajGoogle2fa()">'.$lang['google_2fa_admin_test_code'].'</a></div>';
-
- echo '<div id="google-2fa-bvestilo" style="font-style: italic;">'.$lang['google_2fa_user_error_code'].'</div>';
+ }
+ elseif (! empty($user_option) && $user_option_validate == 'NOT') {
+ echo '<div class="google-2fa-validate setting_holder">';
+
+ echo '<div>'.$lang['google_2fa_admin_validate'].'</div>';
+ echo '<div><input type="text" class="medium bottom8" name="google-2fa-validate"></div>';
+
+ echo '<div class="bottom8">';
+ echo ' <button type="button" class="small white-blue right8" onclick="ponastaviGoogle2fa()">'.$lang['google_2fa_admin_test_code_reset'].'</a></button>';
+ echo ' <button type="button" class="small blue" onclick="aktivirajGoogle2fa()">'.$lang['google_2fa_admin_test_code'].'</a></button>';
+ echo '</div>';
+
+ echo '<div id="google-2fa-bvestilo" style="font-style: italic; display: none;">'.$lang['google_2fa_user_error_code'].'</div>';
+
echo '</div>';
- } else {
- echo '<div class="google-2fa-deactivate" id="2fa-display" style="display: none;">';
- echo '<div style="padding:5px;">'.$lang['google_2fa_admin_deactivate'].'</div>';
- echo '<div style="display: block; clear: both;padding: 10px;"><input type="text" name="google-2fa-deactivate"></div>';
- echo '<div class="buttonwrapper floatLeft spaceLeft"><a href="#" class="ovalbutton btn_savesettings" onclick="deaktivirajGoogle2fa()">'.$lang['google_2fa_admin_deactivat_code'].'</a></div>';
- echo '<div id="google-2fa-bvestilo" style="font-style: italic;">'.$lang['google_2fa_user_error_code'].'</div>';
+ }
+ else {
+ echo '<div class="google-2fa-deactivate setting_holder" id="2fa-display" style="display: none;">';
+
+ echo '<div>'.$lang['google_2fa_admin_deactivate'].'</div>';
+ echo '<div><input type="text" class="medium bottom8" name="google-2fa-deactivate"></div>';
+
+ echo '<div class="bottom8">';
+ echo ' <button type="button" class="small blue" onclick="deaktivirajGoogle2fa()">'.$lang['google_2fa_admin_deactivat_code'].'</a></button>';
echo '</div>';
+
+ echo '<div id="google-2fa-bvestilo" style="font-style: italic; display: none;">'.$lang['google_2fa_user_error_code'].'</div>';
+
+ echo '</div>';
}
+
+ echo '<div class="button_holder below">';
+ echo ' <button type="button" class="medium red" onClick="izbrisi1kaRacun();">'.$lang['delete_account'].'</button>';
+ echo '</div>';
}
- echo ' </fieldset>';
-
- echo ' </form>';
-
+ echo '</fieldset>';
// Save gumb - ce ni AAI
- if(!$aai_instalacija){
-
- echo ' <div class="buttonwrapper floatLeft spaceLeft"><a class="ovalbutton ovalbutton_gray" href="#" onclick="izbrisi1kaRacun();"><span>'.$lang['delete_account'] . '</span></a></div>';
- echo ' <div class="buttonwrapper floatLeft spaceLeft"><a class="ovalbutton ovalbutton_orange btn_savesettings" href="#" onclick="save1kaRacunSettings();"><span>'.$lang['edit1337'] . '</span></a></div>';
+ if(!isAAI()){
- echo '<span class="clr"></span>';
+ echo '<div class="button_holder">';
+ echo ' <button type="button" class="medium white-blue" onClick="window.location='.$preklici_url.';return false;">'.$lang['edit1338'].'</button>';
+ echo ' <button class="medium blue" onclick="save1kaRacunSettings();">'.$lang['edit1337'].'</button>';
+ echo '</div>';
// div za prikaz uspešnosti shranjevanja
- if ($_GET['s'] == '1') {
+ if (isset($_GET['s']) && $_GET['s'] == '1') {
echo '<div id="success_save"></div>';
- echo '<script type="text/javascript">$(document).ready(function() {show_success_save();});</script>';
+ echo '<script type="text/javascript">$(document).ready(function() {actionNotePopup(\'success_save\', \'success\');});</script>';
}
-
- echo '<br /><br />';
}
+
+ echo '</form>';
+
+ echo '</div>';
+ }
+
+ function globalUserChangeArchive () {
+ global $lang, $global_user_id, $admin_type, $site_domain, $site_url;
+
+ // podatki prijavljenega uporabnika
+ $sql = sisplet_query("SELECT id, name, surname, email, type, gdpr_agree, last_login FROM users WHERE id = '$global_user_id'");
+ $row = mysqli_fetch_array($sql);
+
+ echo '<div id="anketa_edit">';
+
+ echo ' <form name="settingsanketa" id="form_profile_user_settings" action="ajax.php?a=editanketasettings&m=global_user_ChangeArchive" method="post" autocomplete="off">' . "\n\r";
+ echo ' <input type="hidden" name="location" value="' . $_GET['a'] . '" />' . "\n\r";
+ echo ' <input type="hidden" name="submited" value="1" />' . "\n\r";
// Tabela aktivnosti (prijav)
echo '<fieldset><legend>'.$lang['srv_login_tracking_title'].'</legend>';
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
+
echo '<table class="login_tracking">';
- echo '<tr><th>IP</th><th>'.$lang['srv_login_tracking_date'].'</th><th>'.$lang['srv_login_tracking_time'].'</th></tr>';
+ echo '<tr><th>IP</th><th>'.$lang['srv_login_tracking_date'].'</th></tr>';
$result = sisplet_query ("SELECT IP, kdaj FROM user_login_tracker WHERE uid='".$global_user_id."' ORDER BY kdaj desc");
if (mysqli_num_rows($result) == 0) {
@@ -9537,21 +10058,23 @@ class SurveyAdminSettings { else {
$count = 0;
while ($row = mysqli_fetch_array ($result)) {
- echo '<tr '.($count >= 5 ? ' class="hide"' : '').'>';
+ echo '<tr '.($count >= 5 ? ' class="displayNone"' : '').($count == 4 ? ' class="show_as_last_row"' : '').'>';
echo '<td>'.$row['IP'].'</td>';
- echo '<td>'.date('j.n.Y', strtotime($row['kdaj'])).'</td>';
- echo '<td>'.date('H:i', strtotime($row['kdaj'])).'</td>';
+ echo '<td>'.date('j.n.Y', strtotime($row['kdaj'])).' '.date('H:i:s', strtotime($row['kdaj'])).'</td>';
echo '</tr>';
$count++;
}
}
echo '</table>';
+
+ echo '</div>';
+ echo '</div>';
- if(mysqli_num_rows($result) > 25){
- echo '<span class="login_tracking_more bold" onClick="$(\'table.login_tracking tr\').removeClass(\'hide\'); $(\'.login_tracking_more\').hide();">'.$lang['srv_invitation_nonActivated_more'].'</span>';
- echo '<br /><br />';
- }
+ //Gumb za izpis vseh prijav v tabeli - update v 2. fazi @TG
+ /**if(mysqli_num_rows($result) > 25){
+ echo '<span class="login_tracking_more bold" onClick="$(\'table.login_tracking tr\').removeClass(\'displayNone\'); $(\'.login_tracking_more\').addClass(\'displayNone\');">'.$lang['srv_invitation_nonActivated_more'].'</span>';
+ }**/
echo '</fieldset>';
@@ -9586,15 +10109,16 @@ class SurveyAdminSettings { $lockSurvey = (int)UserSetting::getInstance()->getUserSetting('lockSurvey');
if ($admin_type == '0' || $admin_type == '1') {
- echo '<p>';
- echo '<label><input type="checkbox" onclick="changeSurveyLock(this)" '.($lockSurvey == 1 ? ' checked="checekd"' : '').'>';
- echo $lang['srv_survey_lock_note'];
- echo '</label>';
- echo '</p>';
+ echo '<div class="setting_holder">';
+ echo ' <input type="checkbox" id="change_survey_lock" onclick="changeSurveyLock(this)" '.($lockSurvey == 1 ? ' checked="checekd"' : '').'>';
+ echo ' <label for="change_survey_lock">';
+ echo $lang['srv_survey_lock_note'];
+ echo ' </label>';
+ echo '</div>';
}
if ((int)$lockSurvey > 0) {
- echo '<p class="small">'.$lang['srv_unlock_popup'].'</p>';
+ echo '<p class="top16">'.$lang['srv_unlock_popup'].'</p>';
}
}
@@ -9608,23 +10132,29 @@ class SurveyAdminSettings { $msg = null;
$email_msg = $lang['srv_mail_test_smtp_test_success'];
$email_subject = $lang['srv_mail_test_smtp_test'];
+
+ $mailMode = $_REQUEST['SMTPMailMode'];
$MA = new MailAdapter($this->anketa);
-
$settings = $MA->getSettingsFromRequest($_REQUEST);
- $mailMode = $_REQUEST['SMTPMailMode'];
+ $SmailMode = $mailMode === 1 ? 'google' : 'smtp';
+ $settings_saved = $MA->getSettings($SmailMode);
-
- if (isset ($_COOKIE['uid'])) {
+ if ($mailMode == 1 || $mailMode == 2){
+ $email = $settings['SMTPFrom'];
+ }
+ else if (isset ($_COOKIE['uid'])) {
$email = base64_decode ($_COOKIE['uid']);
}
else {
$error = true;
$msg = $lang['srv_mail_test_smtp_mail_detect_error'];
}
-
- if (validEmail($email)){
+ $settings['SMTPPassword'] = empty($_REQUEST['SMTPPassword']) ? $settings_saved['SMTPPassword'] : $_REQUEST['SMTPPassword'];
+
+ if (validEmail($email)){
+
// preverimo password - ne sme bit prazen
if (($mailMode == 1 || $mailMode == 2) && empty($settings['SMTPPassword'])){ # password
$error = true;
@@ -9647,8 +10177,13 @@ class SurveyAdminSettings { $error = true;
$msg = $lang['srv_mail_test_smtp_not_possible'];
}
- }
+ }
+
+ echo '<div id="divSurveySmtp">';
+ echo '<h2>'.$lang['srv_mail_test_smtp'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onClick="popupClose(); return false;">✕</a></div>';
+
// če imamo napake jo izpišemo
if ($error == true){
echo $lang['srv_mail_test_smtp_error'].': '. $msg;
@@ -9656,23 +10191,17 @@ class SurveyAdminSettings { else{
echo $lang['srv_mail_test_smtp_sent'].': '.$email;
}
-
+
#vsebino shranimo v buffer
$content = ob_get_clean();
+
+ echo $content;
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" onClick="popupClose(); return false;">'.$lang['srv_zapri'].'</button>';
+ echo '</div>';
- $popUp = new PopUp();
- #$popUp->setId('divSurveySmtp');
- $popUp->setHeaderText($lang['srv_mail_test_smtp']);
-
- #dodamo vsebino
- $popUp->setContent($content);
-
- # dodamo gumb Prekliči
- $button = new PopUpCancelButton();
- $button->setCaption($lang['srv_zapri'])->setTitle($lang['srv_zapri']);
- $popUp->addButton($button);
-
- echo $popUp;
+ echo '</div>';
}
}
?>
\ No newline at end of file |