diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /admin/survey/classes/class.SurveyTelephone.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to 'admin/survey/classes/class.SurveyTelephone.php')
-rw-r--r-- | admin/survey/classes/class.SurveyTelephone.php | 685 |
1 files changed, 383 insertions, 302 deletions
diff --git a/admin/survey/classes/class.SurveyTelephone.php b/admin/survey/classes/class.SurveyTelephone.php index 390544e..3be12b4 100644 --- a/admin/survey/classes/class.SurveyTelephone.php +++ b/admin/survey/classes/class.SurveyTelephone.php @@ -205,9 +205,18 @@ class SurveyTelephone { $date_to = '';
if(isset($_GET['date_to']))
$date_to = strtotime($_GET['date_to']);
+
+ echo '<div class="set_horizontal">';
+
+ echo $lang['s_from'].':';
+ echo '<input type="text" class="text small" name="tel_dash_dateFrom" id="tel_dash_dateFrom" value="'.($date_from == '' ? $date_from : date('d.m.Y', $date_from)).'">';
+ echo $lang['s_to'].':';
+ echo '<input type="text" class="text small" name="tel_dash_dateTo" id="tel_dash_dateTo" value="'.($date_to == '' ? $date_to : date('d.m.Y', $date_to)).'">';
+
+ echo '<a href="'.$site_url.'/admin/survey/index.php?anketa='.$this->sid.'&a='.A_TELEPHONE.'&m=dashboard">'.$lang['srv_telephone_dashboard_legend_datum'].'</a>';
+
+ echo '</div>';
- echo '<span class="spaceRight">'.$lang['s_from'].': <input type="text" name="tel_dash_dateFrom" id="tel_dash_dateFrom" value="'.($date_from == '' ? $date_from : date('d.m.Y', $date_from)).'" style="width:70px" ></span>';
- echo '<span class="spaceLeft spaceRight">'.$lang['s_to'].': <input type="text" name="tel_dash_dateTo" id="tel_dash_dateTo" value="'.($date_to == '' ? $date_to : date('d.m.Y', $date_to)).'" style="width:70px" ></span>';
echo '<script type="text/javascript">';
echo '$(document).ready(function() {' .
' $("#tel_dash_dateFrom, #tel_dash_dateTo").datepicker({
@@ -225,11 +234,11 @@ class SurveyTelephone { });' .
'});';
echo '</script>';
- echo '<span class="spaceLeft"><a href="'.$site_url.'/admin/survey/index.php?anketa='.$this->sid.'&a='.A_TELEPHONE.'&m=dashboard">'.$lang['srv_clear'].'</a></span>';
echo '</div>';
-
+
+ $statusi_all = 0;
while ($row = mysqli_fetch_assoc($qry)) {
$date = strtotime($row['insert_time']);
@@ -238,8 +247,15 @@ class SurveyTelephone { if( ($date == null && $date_from == null && $date_to == null)
|| ($date != null && ($date_from == null || $date >= $date_from) && ($date_to == null || $date <= $date_to)) ){
- $statusi[$row['schstatus']] ++;
- $statusi_anketar[$row['usrid']] ++;
+ if(isset($statusi[$row['schstatus']]))
+ $statusi[$row['schstatus']] ++;
+ else
+ $statusi[$row['schstatus']] = 1;
+
+ if(isset($statusi[$row['schstatus']]))
+ $statusi_anketar[$row['usrid']] ++;
+ else
+ $statusi_anketar[$row['usrid']] = 1;
if($row['schstatus'] != '')
$contacted++;
@@ -254,21 +270,28 @@ class SurveyTelephone { echo '<div class="inv_filedset_inline_div">';
echo '<p>';
echo '<table class="inv_dashboard_table">';
+
echo '<tr>';
- echo '<th>'.$lang['srv_telephone_dashboard_all_respondents'].'</th>';
- echo '<th>'.(int)$statusi_all.'</th>';
- echo '<th>-</th>';
- echo '<th>100%</th>';
+ echo '<th>'.$lang['srv_statistic_metric'].'</th>';
+ echo '<th>'.$lang['srv_statistic_answer_state_frequency'].'</th>';
+ echo '<th>'.$lang['srv_statistic_answer_state_percent'].'</th>';
+ echo '</tr>';
+
+
+ echo '<tr class="semi-bold">';
+ echo '<td>'.$lang['srv_telephone_dashboard_all_respondents'].'</td>';
+ echo '<td>'.(int)$statusi_all.'</td>';
+ echo '<td>100%</td>';
echo '</tr>';
# poslano enotam
- echo '<tr>';
- echo '<th>'.$lang['srv_telephone_dashboard_all_contacted'].'</th>';
- echo '<th>'.(int)$contacted .'</th>';
- echo '<th>'.((int)$contacted > 0 ? '100%' : '0%').'</th>';
- echo '<th>'.Common::formatNumber(( (int)$contacted > 0 ? (int)$contacted*100/(int)$statusi_all : 0),0,'','%').'</th>';
+ echo '<tr class="semi-bold">';
+ echo '<td>'.$lang['srv_telephone_dashboard_all_contacted'].'</td>';
+ echo '<td>'.(int)$contacted .'</td>';
+ //echo '<td>'.((int)$contacted > 0 ? '100%' : '0%').'</td>';
+ echo '<td>'.Common::formatNumber(( (int)$contacted > 0 ? (int)$contacted*100/(int)$statusi_all : 0),0,'','%').'</td>';
echo '</tr>';
foreach (array('R','Z','N','T','P','A','U','D') AS $st) {
- if ((int)$statusi[$st] > 0) {
+ if (isset($statusi[$st]) && (int)$statusi[$st] > 0) {
if ($st == 'U') {
$css=' class="red"';
} else {
@@ -277,7 +300,7 @@ class SurveyTelephone { echo '<tr>';
echo '<td>'.$lang['srv_telephone_status_'.$st].'</td>';
echo '<td'.$css.'>'.(int)$statusi[$st].'</td>';
- echo '<td'.$css.'>'.Common::formatNumber(((int)$statusi[$st] > 0 ? (int)$statusi[$st]*100/(int)$contacted : 0),0,'','%').'</td>';
+ //echo '<td'.$css.'>'.Common::formatNumber(((int)$statusi[$st] > 0 ? (int)$statusi[$st]*100/(int)$contacted : 0),0,'','%').'</td>';
echo '<td'.$css.'>'.Common::formatNumber(((int)$statusi[$st] > 0 ? (int)$statusi[$st]*100/(int)$statusi_all : 0),0,'','%').'</td>';
echo '</tr>';
}
@@ -410,22 +433,20 @@ class SurveyTelephone { echo '<td class="">'.Common::formatNumberSimple(((int)$recipients_by_status['contacted'] > 0 ? (int)$recipients_by_status['finished']*100/(int)$recipients_by_status['contacted'] : 0),0,'%').'</td>';
echo '</tr>';
echo '</table>';
- echo '<br>';
echo '</div>';
echo '</fieldset>';
}
// Sumarni pregled po anketarjih
- echo '<br/>';
- echo '<fieldset class="inv_fieldset"><legend>'.$lang['srv_telephone_dashboard_legend_anketar'].'</legend>';
+ echo '<fieldset class="inv_fieldset"><legend>'.$lang['srv_telephone_dashboard_legend_anketar'].Help::display('srv_telefon_anketarji').':</legend>';
echo '<div class="inv_filedset_inline_div">';
echo '<table class="inv_dashboard_table">';
-
+
echo '<tr>';
- echo '<th>'.$lang['srv_telephone_dashboard_all_contacted'].'</th>';
- echo '<th>'.(int)$contacted .'</th>';
- echo '<th>'.((int)$contacted > 0 ? '100%' : '0%').'</th>';
+ echo '<th>'.$lang['srv_telephone_call_anketar'].'</th>';
+ echo '<th>'.$lang['srv_statistic_answer_state_frequency'].'</th>';
+ echo '<th>'.$lang['srv_statistic_answer_state_percent'].'</th>';
echo '</tr>';
# Loop cez vse anketarje
@@ -434,18 +455,23 @@ class SurveyTelephone { foreach($all_users as $user){
echo '<tr>';
echo '<td>'.$user['name'].' '.$user['surname'].' <span class="gray">('.$user['email'].')</span></td>';
- echo '<td>'.(int)$statusi_anketar[$user['id']].'</td>';
- echo '<td>'.Common::formatNumberSimple(((int)$statusi_anketar[$user['id']] > 0 ? (int)$statusi_anketar[$user['id']]*100/(int)$recipients_by_status['contacted'] : 0),0,'%').'</td>';
+ echo '<td>'.(isset($statusi_anketar[$user['id']]) ? (int)$statusi_anketar[$user['id']] : '').'</td>';
+ echo '<td>'.Common::formatNumberSimple((isset($statusi_anketar[$user['id']]) && (int)$statusi_anketar[$user['id']] > 0 ? (int)$statusi_anketar[$user['id']]*100/(int)$recipients_by_status['contacted'] : 0),0,'%').'</td>';
echo '</tr>';
}
+ echo '<tr class="semi-bold">';
+ echo '<td>'.$lang['srv_telephone_dashboard_all_contacted'].'</td>';
+ echo '<td>'.(int)$contacted .'</td>';
+ echo '<td>'.((int)$contacted > 0 ? '100%' : '0%').'</td>';
+ echo '</tr>';
+
echo '</table>';
- echo '<br>';
echo '</div>';
echo '</fieldset>';
} else {
- echo '<p>'.$lang['srv_telephone_no_respondents'].'</p>';
+ echo '<p class="bottom32">'.$lang['srv_telephone_no_respondents'].'</p>';
}
}
@@ -516,7 +542,6 @@ class SurveyTelephone { function addRecipientsView( $fields = array(), $recipients_list=null) {
#prikažemo vmesnik za dodajanje respondentov
global $lang;
- echo '<h2>'.$lang['srv_inv_add_recipients_heading'].'</h2>';
echo '<div id="inv_import">';
$this->displayAddRecipientsView($fields, $recipients_list);
@@ -560,12 +585,12 @@ class SurveyTelephone { # profili respondentov
echo '<div id="inv_recipients_profiles_holder">';
- echo '<span>'.$lang['srv_inv_recipient_select_list'].'</span><br/>';
+ echo '<p>'.$lang['srv_inv_recipient_select_list'].'</p>';
$this->listRecipientsProfiles();
echo '</div>'; # id=inv_recipients_profiles_holder
- echo '<div id="inv_import_list_container">';
+ echo '<fieldset id="inv_import_list_container"><legend>'.$lang['srv_inv_recipiens_from'].'</legend>';
$sqlSysMapping = sisplet_query("SELECT * FROM srv_invitations_mapping WHERE sid = '$this->sid'");
if (mysqli_num_rows($sqlSysMapping) > 0) {
@@ -573,23 +598,20 @@ class SurveyTelephone { list($sysUserToAdd) = mysqli_fetch_row($sysUserToAddQuery);
}
- echo '<span><input name="inv_import_type" id="inv_import_type2" type="radio" value="2" checked="checked" autocomplete="off"><label for="inv_import_type2">'.$lang['srv_inv_recipiens_from_list'].'</label></span>';
- /*echo '<span><input name="inv_import_type" id="inv_import_type2" type="radio" value="2" onclick="inv_change_import_type();"'.($import_type == 2 ? ' checked="checked"' : '').' autocomplete="off"><label for="inv_import_type2">'.$lang['srv_inv_recipiens_from_list'].'</label></span>';
+ /*echo '<span><input name="inv_import_type" id="inv_import_type2" type="radio" value="2" checked="checked" autocomplete="off"><label for="inv_import_type2">'.$lang['srv_inv_recipiens_from_list'].'</label></span>';
+ echo '<span><input name="inv_import_type" id="inv_import_type2" type="radio" value="2" onclick="inv_change_import_type();"'.($import_type == 2 ? ' checked="checked"' : '').' autocomplete="off"><label for="inv_import_type2">'.$lang['srv_inv_recipiens_from_list'].'</label></span>';
echo '<span><input name="inv_import_type" id="inv_import_type1" type="radio" value="1" onclick="inv_change_import_type();"'.($import_type == 1 ? ' checked="checked"' : '').' autocomplete="off"><label for="inv_import_type1">'.$lang['srv_inv_recipiens_from_file'].'</label></span>';
echo '<span><input name="inv_import_type" id="inv_import_type3" type="radio" value="3" onclick="inv_change_import_type();"'.($import_type == 3 ? ' checked="checked"' : '').' autocomplete="off"><label for="inv_import_type3">'.$lang['srv_inv_recipiens_from_system']
.($sysUserToAdd > 0 ? ' ('.$sysUserToAdd.')' : '').'</label></span>';
echo Help::display('inv_recipiens_from_system');*/
- echo '<br class="clr"/>';
- echo '<br class="clr"/>';
if ($import_type == 3) {
#$this->displayFromSystemVariables();
$this->createSystemVariablesMapping();
} else {
# sporočilo za personalizirana e-vabila in respondente iz baze
- echo '<span class="inv_note">'.$lang['srv_inv_recipiens_field_note'].'</span>';
- echo '<br >';
+ echo '<p>'.$lang['srv_inv_recipiens_field_note'].'</p>';
echo '<div id="inv_field_container">';
echo '<ul class="connectedSortable">';
$field_lang = array();
@@ -603,9 +625,10 @@ class SurveyTelephone { $label_for = ' for="'.$field.'_chk"';
echo '<li id="'.$field.'"'.$css.'>';
- echo '<input id="'.$field.'_chk" type="checkbox" class="inv_checkbox' . $hidden_checkbox . '"'.($is_selected == true ? ' checked="checked"' : '').'>';
+ echo '<input id="'.$field.'_chk" type="checkbox" class="inv_checkbox"'.($is_selected == true ? ' checked="checked"' : '').'>';
echo '<label'.$label_for.'>'.$lang['srv_'.$field].'</label>';
echo '</li>';
+
if ($is_selected == 1) {
$field_lang[] = $lang['srv_'.$field];
}
@@ -613,32 +636,25 @@ class SurveyTelephone { }
echo '</ul>';
echo '</div>';
- echo '<br class="clr" />';
- echo '<script type="text/javascript">';
- echo "$('ul.connectedSortable').sortable({update : function () { refreshFieldsList(); }, forcePlaceholderSize: 'true',tolerance: 'pointer',placeholder: 'inv_field_placeholder',});";
- echo '</script>';
+ echo '<script type="text/javascript">initTelephoneConnectedSortable();</script>';
# iz seznama
echo '<div id="inv_import_list"'.($import_type != 1 ? '' : ' class="hidden"').'>' ;
- echo '<span class="inv_note">'.$lang['srv_inv_recipiens_email_note'];
- echo '<br class="clr" /><span class="inv_sample" >';
- echo $lang['srv_inv_recipiens_sample'].' </span><span class="inv_sample">';
- echo $lang['srv_telephone_add_sample'];
- echo '</span>';
- echo '<br class="clr" />';
- echo '</span>';
- echo '<br class="clr" />'.$lang['srv_inv_recipiens_fields'].' <span id="inv_field_list" class="inv_type_0">';
+ echo '<p>'.$lang['srv_inv_recipiens_email_note'].'</p>';
+ echo '<p class="top16">'.$lang['srv_inv_recipiens_sample2'].'</p>';
+ echo '<p class="top16 gray italic">'.$lang['srv_telephone_add_sample'].'</p>';
+
+ echo '<p class="top16">'.$lang['srv_inv_recipiens_fields'].' <span id="inv_field_list" class="bold inv_type_0">';
echo implode(',',$field_lang);
echo '</span>';
- echo '<br class="clr" /><textarea id="inv_recipients_list" cols="50" rows="9" name="inv_recipients_list">';
+
+ echo '<textarea id="inv_recipients_list" name="inv_recipients_list">';
if (is_array($recipients_list) && count($recipients_list) > 0 ) {
echo implode("\n",$recipients_list);
}
echo '</textarea>';
- echo '<br class="clr"/>';
#podatki o profilu
- echo '<br class="clr"/>';
$ppid = isset($_POST['pid']) ? (int)$_POST['pid'] : -1;
echo '<span class="floatLeft">';
@@ -668,20 +684,21 @@ class SurveyTelephone { }
echo '</span>';
- # če že imamo prejemnike v bazi ponudimo gumb naprej
- echo '<span class="buttonwrapper floatRight spaceLeft" ><a class="ovalbutton ovalbutton_orange" href="#" onclick="phn_add_recipients(); return false;"><span>'.$lang['srv_telephone_add'].'</span></a></span>';
- # če je začasen avtor, ne ponudimo shrani
- if ((int)$ppid != 0) {
- echo '<span class="buttonwrapper floatRight spaceLeft" ><a class="ovalbutton ovalbutton_gray" href="#" onclick="phnSaveProfile(); return false;"><span>'.$lang['srv_telephone_save'].'</span></a></span>';
- }
- echo '<span class="buttonwrapper floatRight spaceLeft" ><a class="ovalbutton ovalbutton_gray" href="#" onclick="phnGetNewProfileName(); return false;"><span>'.$lang['srv_telephone_save_new'].'</span></a></span>';
-
echo '</div>'; # id=inv_import_list
}
- echo '</div>'; # id=inv_import_list_container
+ echo '<div class="button_holder">';
+ # če je začasen avtor, ne ponudimo shrani
+ if ((int)$ppid != 0) {
+ echo '<button class="medium white-blue" onclick="phnSaveProfile(); return false;">'.$lang['srv_telephone_save'].'</button>';
+ }
+ echo '<button class="medium white-blue" onclick="phnGetNewProfileName(); return false;">'.$lang['srv_telephone_save_new'].'</button>';
+ # če že imamo prejemnike v bazi ponudimo gumb naprej
+ echo '<button class="medium blue" onclick="phn_add_recipients(); return false;">'.$lang['srv_telephone_add'].'</button>';
+ echo '</div>';
- echo '<br class="clr"/>';
+ echo '</fieldset>'; # id=inv_import_list_container
+ echo '</div>'; # id=inv_import
}
function listRecipientsProfiles() {
@@ -721,7 +738,6 @@ class SurveyTelephone { }
echo '</ol>';
echo '</div>';
- echo '<br class="clr" />';
if ((int)$ppid > 0) {
# polovimo še ostale porfile
$sql_string = "SELECT pid FROM srv_invitations_recipients_profiles WHERE pid='".(int)$ppid."' AND from_survey ='".$this->sid."' ";
@@ -731,11 +747,8 @@ class SurveyTelephone { # če je iz iste ankete, potem lahko urejamo
echo '<a href="#" onclick="phnDeleteProfile();" title="'.$lang['srv_inv_recipients_delete_profile'].'">'.$lang['srv_inv_recipients_delete_profile'].'</a><br/>';
echo '<a href="#" onclick="phnEditProfile();" title="'.$lang['srv_inv_recipients_edit_profile'].'">'.$lang['srv_inv_recipients_edit_profile'].'</a><br/>';
- echo '<br class="clr"/>';
}
}
-
- echo '<br class="clr" />';
}
function displayNavigation() {
@@ -750,7 +763,7 @@ class SurveyTelephone { if (!isset($_POST['noNavi']) || (isset($_POST['noNavi']) && $_POST['noNavi'] != 'true')) {
$_sub_action = $_GET['m'];
- $active_step[] = array(1=>'',2=>'',3=>'',4=>'',5=>'',6=>'',7=>'');
+ $active_step = array('1'=>'', '2'=>'', '3'=>'', '4'=>'', '5'=>'', '6'=>'', '7'=>'');
switch ($_sub_action) {
case 'phn_status':
@@ -788,73 +801,72 @@ class SurveyTelephone { $spaceChar = ' ';
- echo '<div class="phn_step_nav'.$active_step[1].'">';
- echo '<div class="phn_step">';
- echo '<a href="'.$this->addUrl('dashboard').'">';
- echo '<span class="label">'.$lang['srv_telephone_navi_dashboard'].'</span>';
- echo '</a>';
- echo '</div>';
- echo '</div>';
-
if ($this->telephoneSprId) {
#space
- echo '<div class="phn_space"> </div>';
- $class_yellow = ' yellow';
- echo '<div class="phn_step_nav yellow">';
+ echo '<div class="phn_step_nav">';
#navigacija
- echo '<div class="phn_step'.$class_yellow.$active_step[2].'">';
- echo '<a href="'.$this->addUrl('recipients_lists').'">';
- echo '<span class="circle">1</span>';
- echo '<span class="label">'.$lang['srv_telephone_navi_add'].'</span>';
- echo '</a>';
+ echo '<div class="phn_step menu'.$active_step['2'].'" onClick="window.location.href=\''.$this->addUrl('recipients_lists').'\';return false;">';
+ echo '<div class="square">1</div>';
+ echo '<div class="label">'.$lang['srv_telephone_navi_add'].'</div>';
echo '</div>';
-
- echo '<div class="phn_step_space'.$class_yellow.'">'.$spaceChar.'</div>';
- echo '<div class="phn_step'.$class_yellow.$active_step[3].'">';
- echo '<a href="'.$this->addUrl('view_recipients').'">';
- echo '<span class="circle">2</span>';
- echo '<span class="label">'.$lang['srv_telephone_navi_view'].'</span>';
- if ($disabled == false) {
- echo '</a>';
- }
- echo '</div>';
+ echo '<div class="inv_space"></div>';
+
- echo '<div class="phn_step_space'.$class_yellow.$css_disabled.'">'.$spaceChar.'</div>';
+ echo '<div class="phn_step menu'.$active_step['3'].'" onClick="window.location.href=\''.$this->addUrl('view_recipients').'\';return false;">';
+ echo '<div class="square">2</div>';
+ echo '<div class="label">'.$lang['srv_telephone_navi_view'].'</div>';
+ echo '</div>';
+
+ echo '<div class="inv_space"></div>';
+
- echo '<div class="phn_step'.$class_yellow.$css_disabled.$active_step[4].'">';
- echo '<a href="'.$this->addUrl('start_call').'">';
- echo '<span class="circle">3</span>';
- echo '<span class="label" >'.$lang['srv_telephone_navi_start_call'].'</span>';
- echo '</a>';
+ echo '<div class="phn_step menu'.$active_step['4'].'" onClick="window.location.href=\''.$this->addUrl('start_call').'\';return false;">';
+ echo '<div class="square">3</div>';
+ echo '<div class="label" >'.$lang['srv_telephone_navi_start_call'].'</div>';
echo '</div>';
+
echo '</div>';
#space
- echo '<div class="phn_space"> </div>';
+
+ echo '<div id="tel_settings_holder">';
// Cakalni seznam
- echo '<div class="phn_step_nav'.$active_step[6].'" style="margin-right:20px; width:90px;">';
- echo '<div class="phn_step">';
+ echo '<div class="phn_step_nav'.$active_step['6'].'">';
+ echo '<div class="phn_step settings">';
echo '<a href="'.$this->addUrl('calling_list').'">';
+ echo '<span class="faicon fa-address-book"></span>';
echo '<span class="label">'.$lang['srv_telephone_navi_waiting_list'].'</span>';
echo '</a>';
echo '</div>';
echo '</div>';
}
+ else {
+ echo '<div id="tel_settings_holder">';
+ }
// Nastavitve
- echo '<div class="phn_step_nav'.$active_step[5].'">';
- echo '<div class="phn_step">';
+ echo '<div class="phn_step_nav'.$active_step['5'].'">';
+ echo '<div class="phn_step settings">';
echo '<a href="'.$this->addUrl('settings').'">';
+ echo '<span class="faicon fa-cog"></span>';
echo '<span class="label">'.$lang['srv_telephone_navi_settings'].'</span>';
echo '</a>';
echo '</div>';
echo '</div>';
- echo '<br class="clr" />';
- echo '<br class="clr" />';
+ echo '<div class="phn_step_nav'.$active_step['1'].'">';
+ echo '<div class="phn_step settings">';
+ echo '<a href="'.$this->addUrl('dashboard').'">';
+ echo '<span class="faicon fa-chart-line"></span>';
+ echo '<span class="label">'.$lang['srv_telephone_navi_dashboard'].'</span>';
+ echo '</a>';
+ echo '</div>';
+ echo '</div>';
+
+ echo '</div>';
}
}
}
@@ -867,9 +879,8 @@ class SurveyTelephone { // Najprej cakalna vrsta (stevilke ki se bodo prikazale kasneje)
$this->waitingList();
- echo '<br /><br />';
-
// Se vrsta stevilk ki se trenutno klicejo
+ echo '<div id="tel_line_wrap">';
echo '<h2>'.$lang['srv_telephone_navi_calling_list'].'</h2>';
// Dobimo seznam vseh ki se niso bili klicani
@@ -910,7 +921,7 @@ class SurveyTelephone { $sql_row = mysqli_fetch_assoc($sql_query_filterd_all);
foreach ($default_fields AS $key => $value) {
# če polje še ni dodano in če ni prazno, ga dodamo
- if ($fields[$key] == 0 && isset($sql_row[$key]) && trim($sql_row[$key]) != '') {
+ if ((!isset($fields[$key]) || $fields[$key] == 0) && isset($sql_row[$key]) && trim($sql_row[$key]) != '') {
$fields[$key] = 1;
$sql_select_fields[] = 'i.'.$key;
}
@@ -957,30 +968,35 @@ class SurveyTelephone { // Stevilo stevilk v vrsti
echo '<div id="srv_invitation_note">'.$lang['srv_telephone_calling_list_count'].': '.count($toCall).'</div>';
-
- echo '<br class="clr"/>';
+ echo '</div>';
// Izrisemo tabelo
- echo '<div style="display:inline-block;">';
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
echo '<table id="tbl_recipients_list" class="phone">';
// Header tabele
echo '<tr>';
- echo '<th class="tbl_icon"> </th>';
+ echo '<th class="tbl_icon"></th>';
foreach ($fields AS $fkey =>$field) {
if ($field == 1) {
if ($fkey == 'sent' || $fkey == 'responded' || $fkey == 'unsubscribed'){
#echo '<th class="anl_ac tbl_icon_'.$fkey.' inv_'.$fkey.'_1" title="'.$lang['srv_inv_recipients_'.$fkey].'"> </th>';
echo '<th class="anl_ac tbl_icon_'.$fkey.'" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].'</th>';
- } else if ($fkey == 'ps_icon' ) {
- echo '<th class="anl_ac tbl_icon" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].'</th>';
- } else if ($fkey == 'date_inserted' || $fkey == 'schedule_call_time' ) {
+ }
+ else if ($fkey == 'ps_icon' ) {
+ echo '<th class="anl_ac tbl_icon"></th>';
+ }
+ else if ($fkey == 'date_inserted' || $fkey == 'schedule_call_time' ) {
echo '<th class="anl_ac tbl_date" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].'</th>';
- } else if ($fkey == 'schstatus' ) {
+ }
+ else if ($fkey == 'schstatus' ) {
echo '<th class="anl_ac" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].'</th>';
- } else if ($fkey == 'last_status' ) {
+ }
+ else if ($fkey == 'last_status' ) {
echo '<th class="anl_ac" title="'.$lang['srv_inv_recipients_last_status'].'">'.$lang['srv_inv_recipients_last_status'].'</th>';
- } else {
+ }
+ else {
echo '<th title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].'</th>';
}
}
@@ -1033,7 +1049,7 @@ class SurveyTelephone { break;
}
# če je odjavljen damo isto ikonco za zaklepanje
- if ((int)$row_users['unsubscribed'] == 1) {
+ if (isset($row_users['unsubscribed']) && (int)$row_users['unsubscribed'] == 1) {
$icon = ' phn_ico_status_key';
}
@@ -1045,7 +1061,7 @@ class SurveyTelephone { case 'ps_icon':
echo '<td class="anl_ac'.$icon.'" onclick="phnGoToUser(\''.$sql_row['id'].'\')">';
- echo ' ';
+ echo '<span class="faicon blue phone pointer"></span>';
echo '</td>';
break;
case 'last_status':
@@ -1075,11 +1091,7 @@ class SurveyTelephone { case 'email':
echo '<td>';
echo '<span class="as_link" onclick="showRecipientTracking(\''.$sql_row['id'].'\'); return false;">';
- if ($filter != '') {
- echo $this->hightlight($sql_row[$fkey],$filter);
- } else {
- echo $sql_row[$fkey];
- }
+ echo $sql_row[$fkey];
echo '</span>';
echo '</td>';
break;
@@ -1098,12 +1110,7 @@ class SurveyTelephone { break;
default:
echo '<td class="tbl_inv_left">';
- if ($filter != '') {
- echo $this->hightlight($sql_row[$fkey],$filter);
- } else {
- echo $sql_row[$fkey];
- }
-
+ echo $sql_row[$fkey];
echo '</td>';
break;
}
@@ -1117,12 +1124,12 @@ class SurveyTelephone { echo '</table>';
echo '</div>';
+ echo '</div>';
}
else {
- echo $lang['srv_telephone_calling_list_empty'].'<br class="clr">';
+ echo $lang['srv_telephone_calling_list_empty'];
}
-
- echo '<br /><br /><br />';
+ echo '</div>';
}
// Seznam stevilk ki so v vrsti za klicanje
@@ -1130,6 +1137,7 @@ class SurveyTelephone { global $lang;
global $site_url;
+ echo '<div id="tel_line_wrap0">';
echo '<h2>'.$lang['srv_telephone_navi_waiting_list'].'</h2>';
@@ -1218,11 +1226,12 @@ class SurveyTelephone { // Stevilo stevilk v vrsti
echo '<div id="srv_invitation_note">'.$lang['srv_telephone_waiting_list_count'].': '.count($toCall).'</div>';
+ echo '</div>';
- echo '<br class="clr"/>';
// Izrisemo tabelo
- echo '<div style="display:inline-block;">';
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
echo '<table id="tbl_recipients_list" class="phone">';
// Header tabele
@@ -1306,7 +1315,7 @@ class SurveyTelephone { case 'ps_icon':
echo '<td class="anl_ac'.$icon.'" onclick="phnGoToUser(\''.$sql_row['id'].'\')">';
- echo ' ';
+ echo '<span class="blue faicon phone pointer"></span>';
echo '</td>';
break;
case 'last_status':
@@ -1336,11 +1345,7 @@ class SurveyTelephone { case 'email':
echo '<td>';
echo '<span class="as_link" onclick="showRecipientTracking(\''.$sql_row['id'].'\'); return false;">';
- if ($filter != '') {
- echo $this->hightlight($sql_row[$fkey],$filter);
- } else {
- echo $sql_row[$fkey];
- }
+ echo $sql_row[$fkey];
echo '</span>';
echo '</td>';
break;
@@ -1359,12 +1364,7 @@ class SurveyTelephone { break;
default:
echo '<td class="tbl_inv_left">';
- if ($filter != '') {
- echo $this->hightlight($sql_row[$fkey],$filter);
- } else {
- echo $sql_row[$fkey];
- }
-
+ echo $sql_row[$fkey];
echo '</td>';
break;
}
@@ -1378,10 +1378,12 @@ class SurveyTelephone { echo '</table>';
echo '</div>';
+ echo '</div>';
}
else {
- echo $lang['srv_telephone_waiting_list_empty'].'<br class="clr">';
+ echo $lang['srv_telephone_waiting_list_empty'];
}
+ echo '</div>';
}
@@ -1404,13 +1406,15 @@ class SurveyTelephone { global $lang, $site_url;
#preglej prejemnike
- #echo '<h2>'.$lang['srv_inv_heading_step2'].$lang['srv_inv_edit_recipients_heading'].'</h2>';
echo '<h2>'.$lang['srv_inv_edit_recipients_heading'].'</h2>';
- #polovimo prejemnike ki ne želijo prejemati obvestil
# nastavimo filter
session_start();
- $filter = $_SESSION['inv_filter']['value'];
+
+ $filter = isset($_SESSION['inv_filter']['value']) ? $_SESSION['inv_filter']['value'] : '';
+ $mysql_filter = '';
+ $mysql_filter2 = '';
+
if ($filter != '') {
$mysql_filter = " AND ("
. "i.email LIKE '%".$filter."%'"
@@ -1478,7 +1482,7 @@ class SurveyTelephone { while ($sql_row = mysqli_fetch_assoc($sql_query_filterd_all)) {
foreach ($default_fields AS $key => $value) {
# če polje še ni dodano in če ni prazno, ga dodamo
- if ($fields[$key] == 0 && isset($sql_row[$key]) && trim($sql_row[$key]) != '') {
+ if ((!isset($fields[$key]) || $fields[$key] == 0) && isset($sql_row[$key]) && trim($sql_row[$key]) != '') {
$fields[$key] = 1;
$sql_select_fields[] = 'i.'.$key;
}
@@ -1541,39 +1545,28 @@ class SurveyTelephone { $lists = array();
$lists['-1'] = array('name'=>$lang['srv_invitation_new_templist']);
$lists['0'] = array('name'=>$lang['srv_invitation_new_templist_author']);
- if (count($lids) > 0 ) {
+ if (is_countable($lids) && count($lids) > 0) {
$sql_string_lists = "SELECT name, pid from srv_invitations_recipients_profiles WHERE pid IN(".implode(',',$lids).") ";
$sql_query_lists = sisplet_query($sql_string_lists);
while ($row_lists = mysqli_fetch_assoc($sql_query_lists)) {
$lists[$row_lists['pid']] = array('name'=>$row_lists['name']);
}
}
- if (count($msgs) > 0) {
- echo '<span class="inv_msg_note">';
- foreach($msgs as $msg) {
- echo '* '.$msg.'<br />';
- }
- echo '</span>';
- }
- if (count($errors) > 0) {
- echo '<span class="inv_error_note">';
- foreach($errors as $error) {
- echo '* '.$error.'<br />';
- }
- echo '</span>';
- }
- if ($count_all > 0 ) {
+
+ if ($count_all > 0) {
+
+ echo '<div id="filter_wrap">';
// dodamo filtriranje
echo '<div id="inv_rec_filter">';
- echo '<label>'.$lang['srv_invitation_recipients_filter'].'</label> <input id="tel_rec_filter_value" type="text" onchange="tel_filter_recipients(); return false;" value="'.$_SESSION['inv_filter']['value'].'">';
+ echo $lang['srv_invitation_recipients_filter'];
+ echo '<input id="tel_rec_filter_value" type="text" class="text large" value="'.(isset($_SESSION['inv_filter']['value']) ? $_SESSION['inv_filter']['value'] : '').'" onChange="tel_filter_recipients(); return false;">';
echo '</div>';
echo '<form id="frm_inv_rec_export" name="resp_uploader" method="post" autocomplete="off">';
echo '<input type="hidden" name="anketa" id="anketa" value="'.$this->sid.'">';
echo '<input type="hidden" name="noNavi" id="noNavi" value="true">';
- //echo '<br class="clr"/>';
echo '<div id="srv_invitation_note" style="padding-top:8px;">';
if ($filter != '') {
@@ -1585,21 +1578,22 @@ class SurveyTelephone { if ($count_all > 0 && mysqli_num_rows($sql_query_filterd) != $count_all )
echo $lang['srv_invitation_num_respondents_filtred'].(int)mysqli_num_rows($sql_query_filterd);
else
- echo $lang['srv_invitation_num_respondents'].(int)$this->count_all;
+ echo $lang['srv_invitation_num_respondents'].(int)$count_all;
}
echo '</div>';
-
- echo '<br class="clr"/>';
+ echo '</div>';
if (mysqli_num_rows($sql_query_filterd) > 0 && $count_all > 0) {
$this->displayPagination($filtred_all);
- echo '<div style="display:inline-block;">';
+ echo '<div>';
+ echo '<div class="table-horizontal-scroll-wrapper1">';
+ echo '<div class="table-horizontal-scroll-wrapper2">';
echo '<table id="tbl_recipients_list" class="phone">';
echo '<tr>';
# checkbox
- echo '<th class="tbl_icon" colspan="3" > </th>';
+ echo '<th></th>';
/*
* # uredi
echo '<th class="tbl_liks"> </th>';
@@ -1614,7 +1608,7 @@ class SurveyTelephone { #echo '<th class="anl_ac tbl_icon_'.$fkey.' inv_'.$fkey.'_1" title="'.$lang['srv_inv_recipients_'.$fkey].'"> </th>';
echo '<th'.$this->addSortField($fkey).' class="anl_ac tbl_icon_'.$fkey.'" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].$this->addSortIcon($fkey).'</th>';
} else if ($fkey == 'ps_icon' ) {
- echo '<th'.$this->addSortField($fkey).' class="anl_ac tbl_icon" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].$this->addSortIcon($fkey).'</th>';
+ //echo '<th'.$this->addSortField($fkey).' class="anl_ac tbl_icon" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].$this->addSortIcon($fkey).'</th>';
} else if ($fkey == 'date_inserted' || $fkey == 'schedule_call_time' ) {
echo '<th'.$this->addSortField($fkey).' class="anl_ac tbl_date pointer" title="'.$lang['srv_telephone_respondents_'.$fkey].'">'.$lang['srv_telephone_respondents_'.$fkey].$this->addSortIcon($fkey).'</th>';
} else if ($fkey == 'schstatus' ) {
@@ -1647,28 +1641,28 @@ class SurveyTelephone { ;
break;
}
+
# če je odjavljen damo isto ikonco za zaklepanje
- if ((int)$row_users['unsubscribed'] == 1) {
+ if (isset($row_users['unsubscribed']) && (int)$row_users['unsubscribed'] == 1) {
$icon = ' phn_ico_status_key';
}
echo '<tr>';
# checkbox
- echo '<td><input type="checkbox" name="inv_rids[]" value="'.$sql_row['id'].'"></td>';
+ echo '<td><div class="icons"><input type="checkbox" id="'.$sql_row['id'].'" name="inv_rids[]" value="'.$sql_row['id'].'"><label for="'.$sql_row['id'].'" class="empty"></label>';
#izbriši
- echo '<td class="tbl_inv_left"><span class="faicon delete_circle icon-orange_link" onclick="deleteRecipient_confirm(\''.$sql_row['id'].'\'); return false;" title="'.$lang['srv_inv_list_profiles_delete'].'"></span></td>';
+ echo '<span class="faicon trash empty blue" onclick="deleteRecipient_confirm(\''.$sql_row['id'].'\'); return false;" title="'.$lang['srv_inv_list_profiles_delete'].'"></span>';
#uredi
- echo '<td class="tbl_inv_left"><span class="faicon quick_edit edit smaller icon-as_link" onclick="editRecipient(\''.$sql_row['id'].'\'); return false;" title="'.$lang['srv_inv_list_profiles_edit'].'"></span></td>';
+ echo '<span class="faicon edit blue" onclick="editRecipient(\''.$sql_row['id'].'\'); return false;" title="'.$lang['srv_inv_list_profiles_edit'].'"></span>';
foreach ($fields AS $fkey =>$field) {
if ($field == 1) {
switch ($fkey) {
case 'ps_icon':
- echo '<td class="anl_ac'.$icon.'" onclick="phnGoToUser(\''.$sql_row['id'].'\')">';
- echo ' ';
- echo '</td>';
+ echo '<span class="faicon blue phone" onclick="phnGoToUser(\''.$sql_row['id'].'\')"></span>';
+ echo '</div></td>';
break;
case 'last_status':
echo '<td title="'.$lang['srv_userstatus_'.$sql_row[$fkey]].'">';
@@ -1741,24 +1735,29 @@ class SurveyTelephone { @ob_flush();
}
echo '</table>';
+ echo '</div>';
+ echo '</div>';
echo '<div id="inv_bottom_edit">';
- echo '<span class="faicon arrow_up"></span> ';
- echo '<span id="inv_switch_on"><a href="javascript:inv_selectAll(true);">'.$lang['srv_select_all'].'</a></span>';
- echo '<span id="inv_switch_off" style="display:none;"><a href="javascript:inv_selectAll(false);">'.$lang['srv_deselect_all'].'</a></span>';
- echo ' <a href="#" onClick="inv_recipients_form_action(\'delete\');"><span class="faicon delete_circle icon-orange" title="'.$lang['srv_invitation_recipients_delete_selected'].'"/></span> '.$lang['srv_invitation_recipients_delete_selected'].'</a>';
- echo ' <a href="#" onClick="inv_recipients_form_action(\'export\');"><span class="sprites xls delete" style="height:14px; width:16px;" title="'.$lang['srv_invitation_recipients_export_selected'].'"/></span> '.$lang['srv_invitation_recipients_export_selected'].'</a>';
+ /*echo '<a href="javascript:inv_selectAll(true);"><span class="faicon arrow_up blue"></span> ';
+ echo '<span id="inv_switch_on">'.$lang['srv_select_all'].'</a></span>';
+ echo '<span id="inv_switch_off" style="display:none;"><a href="javascript:inv_selectAll(false);">'.$lang['srv_deselect_all'].'</a></span>';*/
+ echo '<a href="#" onClick="inv_recipients_form_action(\'delete\');"><span class="faicon trash empty blue" title="'.$lang['srv_invitation_recipients_delete_selected'].'"/></span> '.$lang['srv_invitation_recipients_delete_selected'].'</a>';
+ echo '<a href="#" onClick="inv_recipients_form_action(\'export\');"><span class="faicon xls" title="'.$lang['srv_invitation_recipients_export_selected'].'"/></span> '.$lang['srv_invitation_recipients_export_selected'].'</a>';
echo '</div>';
echo '</div>';
} else {
- echo $lang['srv_inv_list_no_recipients_filtred'].'<br class="clr">';
+ echo $lang['srv_inv_list_no_recipients_filtred'];
}
echo '</form>';
} else {
- echo $lang['srv_inv_list_no_recipients'].'<br class="clr">';
+ echo $lang['srv_inv_list_no_recipients'];
}
-
- echo '<br /><br />';
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="window.location.href=\''.$this->addUrl('recipients_lists').'\';return false;">'.$lang['back'].'</button>';
+ echo '<button class="medium blue" onClick="window.location.href=\''.$this->addUrl('start_call').'\';return false;">'.$lang['next1'].'</button>';
+ echo '</div>';
}
@@ -1770,23 +1769,27 @@ class SurveyTelephone { #preverimo koliko številk imamo na voljo
$numbersAvailable = $this->getAllNumbers();
+
+ echo '<fieldset><legend>'.$lang['srv_telephone_call_start'].'</legend>';
# preverimo aktivnost ankete
if ($this->surveySettings['active'] != 1) {
- echo $lang['srv_inv_error9'];
+ echo '<p class="bottom16">'.$lang['srv_inv_error9'].'</p>';
if ($this->isAnketar == true) {
return;
}
}
if (count($numbersAvailable) > 0 ) {
- echo '<h2>'.$lang['srv_telephone_call_available'];
+ echo '<p class="bottom16">'.$lang['srv_telephone_call_available'];
echo ' '.count($numbersAvailable);
- echo '</h2>';
- echo '<h2><a href="index.php?anketa='.$this->sid.'&a='.A_TELEPHONE.'&m=call">'.$lang['srv_call_start'].'</a></h2>';
+ echo '</p>';
+ echo '<button class="medium blue" onClick="window.location.href=\'index.php?anketa='.$this->sid.'&a='.A_TELEPHONE.'&m=call\'; return false;">'.$lang['srv_call_start'].'</button>';
} else {
$this->getNextTimeCall();
}
+
+ echo '</fieldset>';
}
/**
@@ -1798,7 +1801,7 @@ class SurveyTelephone { $schedule = false;
// stevilka je izbrana - klicana
- if ($_GET['usr_id'] != '' && (int)$_GET['usr_id'] > 0) {
+ if (isset($_GET['usr_id']) && $_GET['usr_id'] != '' && (int)$_GET['usr_id'] > 0) {
$usr_id = (int)$_GET['usr_id'];
// zbrisemo cookie za izpolnjevanje -- da ne dobi od prejsnjega, ce je nehu nekje vmes
@@ -1816,12 +1819,12 @@ class SurveyTelephone { #uporabnik ni izbran določimo izberemo ga naklučno oziroma če smo dogovorjeni
$row = $this->get_next_number();
$usr_id = $row['usr_id'];
- $schedule = (int)$row['schedule'] == 1 ? true : false;
+ $schedule = isset($row['schedule']) && (int)$row['schedule'] == 1 ? true : false;
}
if ((int)$usr_id > 0) {
# preverimo ali je uporabnik že začel klicat
- $openedSurvey = ($_GET['usr_id'] != '' && (int)$_GET['usr_id'] > 0) ? true : false;
+ $openedSurvey = (isset($_GET['usr_id']) && $_GET['usr_id'] != '' && (int)$_GET['usr_id'] > 0) ? true : false;
$this->userCallToShow($usr_id,$openedSurvey,$schedule);
// Po novem ze ob prikazu stevilke zaklenemo respondenta (da ga ne moreta 2 anketarja hkrati poklicati preden odpreta anketo)
@@ -1837,30 +1840,52 @@ class SurveyTelephone { function settings() {
global $lang, $site_url;
- echo '<fieldset><legend>'.$lang['settings'].'</legend>';
+ echo '<fieldset id="tel_setting"><legend>'.$lang['settings'].'</legend>';
echo '<form id="phn_settings" method="post">';
- echo '<p>'.$lang['srv_call_settings_z'].' <input type="text" name="status_z" value="'.$this->status_z.'" style="width:20px" /> '.$lang['srv_call_settings_min'].'</p>';
- echo '<p>'.$lang['srv_call_settings_n'].' <input type="text" name="status_n" value="'.$this->status_n.'" style="width:20px" /> '.$lang['srv_call_settings_min'].'</p>';
- echo '<p>'.$lang['srv_call_settings_d'].' <input type="text" name="status_d" value="'.$this->status_d.'" style="width:20px" /> '.$lang['srv_call_settings_min'].'</p>';
- echo '<p>'.$lang['srv_call_settings_max'].' <input type="text" name="max_calls" value="'.$this->max_calls.'" style="width:20px" /> '.$lang['srv_call_settings_calls'].'</p>';
+
+ echo '<div class="set_horizontal">';
+ echo $lang['srv_call_settings_z'];
+ echo '<input type="text" class="text medium" name="status_z" value="'.$this->status_z.'"/>';
+ echo $lang['srv_call_settings_min'];
+ echo '</div>';
+ echo '<div class="set_horizontal">';
+ echo $lang['srv_call_settings_n'];
+ echo '<input type="text" class="text medium" name="status_n" value="'.$this->status_n.'"/>';
+ echo $lang['srv_call_settings_min'];
+ echo '</div>';
+ echo '<div class="set_horizontal">';
+ echo $lang['srv_call_settings_d'];
+ echo '<input type="text" class="text medium" name="status_d" value="'.$this->status_d.'"/>';
+ echo $lang['srv_call_settings_min'];
+ echo '</div>';
+ echo '<div class="set_horizontal">';
+ echo $lang['srv_call_settings_max'];
+ echo '<input type="text" class="text medium" name="max_calls" value="'.$this->max_calls.'"/>';
+ echo $lang['srv_call_settings_min'];
+ echo '</div>';
// Vrstni red klicanja
- echo '<p>';
- echo $lang['srv_call_settings_call_order'].': <select name="call_order">';
+ echo '<div class="setting_holder">';
+ echo $lang['srv_call_settings_call_order'].':';
+ echo '<select name="call_order" class="dropdown medium">';
echo '<option value="0" '.($this->call_order==0 ? ' selected="selected"' : '').'>'.$lang['srv_call_settings_call_order_0'].'</option>';
echo '<option value="1" '.($this->call_order==1 ? ' selected="selected"' : '').'>'.$lang['srv_call_settings_call_order_1'].'</option>';
echo '<option value="2" '.($this->call_order==2 ? ' selected="selected"' : '').'>'.$lang['srv_call_settings_call_order_2'].'</option>';
echo '<option value="3" '.($this->call_order==3 ? ' selected="selected"' : '').'>'.$lang['srv_call_settings_call_order_3'].'</option>';
echo '</select>';
- echo '</p>';
-
+ echo '</div>';
+
#$str = "SELECT sd.uid, u.name, u.surname, u.email FROM srv_dostop AS sd LEFT JOIN users AS u ON sd.uid = u.id WHERE sd.ank_id ='$this->sid' AND FIND_IN_SET('phone',sd.dostop )>0";
#polovimo vse userje ki imajo dostop
- echo '<p>';
- echo $lang['srv_telephone_settings_access_list'];
+
+
+ echo '<div class="setting_holder">';
+ echo '<p class="setting_title">';
+ echo $lang['srv_telephone_settings_access_list'];
printf ($lang['srv_telephone_settings_access_list_link'],$site_url . 'admin/survey/index.php?anketa='.$this->sid.'&a='.A_DOSTOP);
- echo '<table style="margin-left:20px;"><tr><th>Anketar</th><th class="anl_al">Ime, priimek, email</th></tr>';
+ echo '</p>';
+
$str = "SELECT sd.uid,FIND_IN_SET('phone',sd.dostop ) AS anketar, u.name, u.surname, u.email FROM srv_dostop AS sd LEFT JOIN users AS u ON sd.uid = u.id WHERE sd.ank_id ='$this->sid'";
$qry = sisplet_query($str);
while ($sql_row = mysqli_fetch_assoc($qry)) {
@@ -1874,24 +1899,23 @@ class SurveyTelephone { if (trim($sql_row['email'])) {
$avtor[] = iconv("iso-8859-2", "utf-8",'<span class="gray">('.trim ($sql_row['email']).')</span>');
}
-
- echo '<tr><td>';
- echo '<input name="dostop['.$sql_row['uid'].']" type="checkbox"'.($sql_row['anketar']>0?' checked="checked"':'').'>';
- echo '</td><td>';
- if ( count($avtor) > 0 ) {
- echo implode(', ',$avtor);
+
+ if ( count($avtor) > 0 ) {
+ $label = implode(', ',$avtor);
}
- echo '</td></tr>';
+
+ echo '<div class="setting_item">';
+ echo '<input name="dostop['.$sql_row['uid'].']" id="dostop['.$sql_row['uid'].']" type="checkbox"'.($sql_row['anketar']>0?' checked="checked"':'').'>';
+ echo '<label for="dostop['.$sql_row['uid'].']">'.$label.'</label>';
+ echo '</div>';
}
- echo '</table>';
- echo '</p>';
- echo '<span class="buttonwrapper floatLeft"><a class="ovalbutton ovalbutton_orange" href="#" onclick="phn_settings_save(); return false;">'.$lang['srv_telephone_settings_save'].'</a></span>';
+ echo '</div>';
echo '</form>';
- echo '<br /><br />';
echo '</fieldset>';
-
- echo '<div id="success_save" style="display:none;">'.$lang['srv_success_save'].'</div>';
+ echo '<div class="button_holder">';
+ echo '<button class="medium blue" onclick="phn_settings_save(); return false;">'.$lang['srv_telephone_settings_save'].'</button>';
+ echo '</div>';
}
function settingsSave() {
@@ -1944,43 +1968,58 @@ class SurveyTelephone { function addSortField($field){
- $type = 'ASC';
session_start();
- if ($_SESSION['phn_rec_sort_field'] == $field) {
- if ($_SESSION['phn_rec_sort_type'] == 'DESC') {
+
+ $type = 'ASC';
+
+ if (isset($_SESSION['phn_rec_sort_field']) && $_SESSION['phn_rec_sort_field'] == $field) {
+ if (isset($_SESSION['phn_rec_sort_type']) && $_SESSION['phn_rec_sort_type'] == 'DESC') {
$type = 'ASC';
- } else {
+ }
+ else {
$type = 'DESC';
}
- } else {
+ }
+ else {
$type = 'ASC';
}
+
return ' onclick="phn_set_sort_field(\''.$field.'\',\''.$type.'\');" ';
}
+
function addSortIcon($field){
+
session_start();
- if ($_SESSION['phn_rec_sort_field'] == $field) {
- if ($_SESSION['phn_rec_sort_type'] == 'DESC') {
+
+ if (isset($_SESSION['phn_rec_sort_field']) && $_SESSION['phn_rec_sort_field'] == $field) {
+ if (isset($_SESSION['phn_rec_sort_type']) && $_SESSION['phn_rec_sort_type'] == 'DESC') {
return ' <span class="faicon sort_descending icon-blue"></span>';
-
- } else {
+ }
+ else {
return ' <span class="faicon sort_ascending icon-blue"></span>';
}
}
+
return;
}
+
function setSortField() {
session_start();
+
if (isset($_POST['field']) && trim($_POST['field']) != '') {
$_SESSION['phn_rec_sort_field'] = trim($_POST['field']);
- } else {
+ }
+ else {
$_SESSION['phn_rec_sort_field'] = 'date_inserted';
}
+
if (isset($_POST['type']) && trim($_POST['type']) != '') {
$_SESSION['phn_rec_sort_type'] = trim($_POST['type']);
- } else {
+ }
+ else {
$_SESSION['phn_rec_sort_type'] = 'ASC';
}
+
session_commit();
}
@@ -2533,7 +2572,7 @@ class SurveyTelephone { $recipent_array = array();
$i = 0;
foreach ($fields AS $field) {
- $recipent_array[$field] = $line_array[$i];
+ $recipent_array[$field] = isset($line_array[$i]) ? $line_array[$i] : '';
$i++;
}
@@ -2911,10 +2950,8 @@ class SurveyTelephone { echo '<br/><br/>';
echo $lang['srv_inv_recipient_list_comment'];
echo '<textarea id="rec_profile_comment" tabindex="3" rows="2" ></textarea>';
- echo '<br class="clr" /><br class="clr" />';
echo '<span class="buttonwrapper floatLeft spaceRight" title="'.$lang['srv_cancel'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;" ><span>'.$lang['srv_cancel'].'</span></a></span>';
echo '<span class="buttonwrapper floatRight spaceRight" title="'.$lang['save'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="phnSaveNewProfile(); return false;"><span>'.$lang['save'].'</span></a></span>';
- echo '<br class="clr" />';
echo '</div>'; # id="inv_view_arch_recipients"
echo '<script type="text/javascript">';
echo "$('#rec_profile_name').focus();";
@@ -3050,10 +3087,8 @@ class SurveyTelephone { echo '<input type="hidden" id="rec_profile_pid" value="'.$pid.'" >';
- echo '<br class="clr" /><br class="clr" />';
echo '<span class="buttonwrapper floatLeft spaceRight" title="'.$lang['srv_cancel'].'"><a class="ovalbutton ovalbutton_gray" href="#" onclick="$(\'#fade\').fadeOut(\'slow\');$(\'#fullscreen\').fadeOut(\'slow\').html(\'\');return false;" ><span>'.$lang['srv_cancel'].'</span></a></span>';
echo '<span class="buttonwrapper floatRight spaceRight" title="'.$lang['save'].'"><a class="ovalbutton ovalbutton_orange" href="#" onclick="phnUpdateProfile(); return false;"><span>'.$lang['save'].'</span></a></span>';
- echo '<br class="clr" />';
echo '</div>'; # id="inv_view_arch_recipients"
}
@@ -3106,6 +3141,8 @@ class SurveyTelephone { $sql1 = sisplet_query("SELECT * FROM srv_invitations_recipients WHERE id = '$usr_id' AND deleted='0'");
$row1 = mysqli_fetch_array($sql1);
+
+ echo '<fieldset><legend>'.$lang['srv_telephone_call_start'].'</legend>';
echo '<table id="phn_call_table">';
# echo '<table style="width:100%" border="1">';
@@ -3115,14 +3152,24 @@ class SurveyTelephone { <th style="width:34%">'.$lang['srv_telephone_table_comments'].'</th>
</tr>';
- echo '<tr><td valign="top">';
+ echo '<tr><td>';
$canCall = true;
$userStatus = array();
$last_status = '';
$sql2 = sisplet_query("SELECT DATE_FORMAT(insert_time, '%d.%m.%Y %H:%i:%s'), status FROM srv_telephone_history WHERE rec_id='$usr_id' ORDER BY insert_time ASC");
if (mysqli_num_rows($sql2) > 0 ) {
while (list($insert_time, $status) = mysqli_fetch_array($sql2)) {
- echo '<p>'.$insert_time.' - <strong>'.$lang['srv_telephone_status_'.$status].'</strong></p>';
+ echo '<div class="pregled_klicev">';
+ echo '<div id="top">';
+ echo '<div id="datum">';
+ echo $insert_time;
+ echo '</div>';
+ echo '<div id="status">';
+ echo $lang['srv_telephone_status_'.$status.'2'];
+ echo '</div>';
+ echo '</div>';
+ echo '<div id="comment">';
+ echo '</div>';
if ($status == 'U' || $status == 'R') {
# preverimo ali lahko uporabnika še kontaktiramo
$canCall = false;
@@ -3133,28 +3180,32 @@ class SurveyTelephone { } else {
echo $lang['srv_telephone_status_'];
}
+
echo '</td>';
- echo '<td valign="top">';
+ echo '<td>';
if ($canCall == true) {
if ($openedSurvey) {
# zaprli smo aktivno anketo, prikažemo naslednji korak oz. izbiro zaključne akcije
- echo '<h2 class="red">'.$lang['srv_telephone_calling_number_end'].'</h2>';
- echo '<h2 class="red">'.$row1['phone'].'</h2>';
+ echo '<p class="bottom16">'.$lang['srv_telephone_calling_number_end'].$row1['phone'].'</p>';
} else {
- echo '<h2 class="red">'.$lang['srv_telephone_calling_number'].($schedule == true ? $lang['srv_telephone_call_was_schedule']:'').'</h2>';
- echo '<h2 class="red">'.$row1['phone'].'</h2>';
+ echo '<p class="bottom16">'.$lang['srv_telephone_calling_number'].($schedule == true ? $lang['srv_telephone_call_was_schedule']:' ').$row1['phone'].'</p>';
}
-
+
+ echo '<p class="bottom16 semi-bold caps">'.$lang['srv_telephone_calling_number_info'].'</p>';
+
if($row1['firstname'] != '')
- echo '<h2>'.$lang['name'].': '.$row1['firstname'].'</h2>';
+ echo '<p>'.$lang['name'].': '.$row1['firstname'].'<p>';
if($row1['lastname'] != '')
- echo '<h2>'.$lang['surname'].': '.$row1['lastname'].'</h2>';
+ echo '<p>'.$lang['surname'].': '.$row1['lastname'].'</p>';
if($row1['email'] != '')
- echo '<h2>'.$lang['email'].': '.$row1['email'].'</h2>';
+ echo '<p>'.$lang['email'].': '.$row1['email'].'</p>';
if($row1['custom'] != '')
- echo '<h2>Custom: '.$row1['custom'].'</h2>';
+ echo '<p>Custom: '.$row1['custom'].'</p>';
+
+ if($row1['firstname'] != '' || $row1['lastname'] != '' || $row1['email'] != '' || $row1['custom'] != '')
+ echo '<p class="bottom16"></p>';
}
else {
# onemogočimo ponovno klicanje uporabnika ker je zaključena ali je zavrnil
@@ -3189,43 +3240,40 @@ class SurveyTelephone { $intro = $lang['srv_intro'];
}
- echo '<p>'.$lang['srv_telephone_call_introduction'];
+ echo '<p class="semi-bold caps bottom16">'.$lang['srv_telephone_call_introduction'].'</p>';
echo '<div class="phn_user_intro">';
echo $intro;
echo '</div>';
- echo '</p>';
- echo '<br/>';
echo '</td>';
- echo '<td valign="top">';
-
+ echo '<td>';
if ($canCall == true) {
- if ($openedSurvey) {
+ /*if ($openedSurvey) {
# zaprli smo aktivno anketo, prikažemo naslednji korak oz. izbiro zaključne akcije
echo '<p class="red strong">'.$lang['srv_telephone_calling_step_action'].'</p>';
} else {
echo '<p class="red strong">'.$lang['srv_telephone_calling_next_step'].'</p>';
- }
+ }*/
- echo '<div style="padding-left: 20px;">';
+ echo '<div>';
if ($openedSurvey) {
# uporqabnik je odprl anketo
- echo '<p><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=U">'.$lang['srv_call_successful2'].'</a></p>';
+ echo '<p class="bottom8"><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=U">'.$lang['srv_call_successful2'].'</a></p>';
} else {
# uporabnik še ni odprl ankete
- echo '<p><span class="as_link" onclick="phnStartSurvey(\''.$usr_id.'\');">'.$lang['srv_call_open_startCall'].$lang['srv_call_open'].'</span></p>';
+ echo '<button class="small blue" onclick="phnStartSurvey(\''.$usr_id.'\');">'.$lang['srv_call_open'].'</button>';
}
if ($openedSurvey) {
} else {
# če smo na userju, potem smo ga dobili, zato ne more bit nedosegljiv ali zaseden
- echo '<p><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=Z">'.$lang['srv_call_zaseden'].'</a></p>';
- echo '<p><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=N">'.$lang['srv_call_ga_ni'].'</a></p>';
+ echo '<p class="bottom8"><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=Z">'.$lang['srv_call_zaseden'].'</a></p>';
+ echo '<p class="bottom8"><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=N">'.$lang['srv_call_ga_ni'].'</a></p>';
}
- echo '<p><a href="#" onclick="phnShowPopupAddMarker(\''.$usr_id.'\',\'T\'); return false;">'.$lang['srv_call_zmenjen'].'</a></p>';
- echo '<p><a href="#" onclick="phnShowPopupAddMarker(\''.$usr_id.'\',\'P\'); return false;">'.$lang['srv_call_prekinjen'].'</a></p>';
+ echo '<p class="bottom8"><a href="#" onclick="phnShowPopupAddMarker(\''.$usr_id.'\',\'T\'); return false;">'.$lang['srv_call_zmenjen'].'</a></p>';
+ echo '<p class="bottom8"><a href="#" onclick="phnShowPopupAddMarker(\''.$usr_id.'\',\'P\'); return false;">'.$lang['srv_call_prekinjen'].'</a></p>';
echo '<p><a href="ajax.php?anketa='.$this->sid.'&t='.A_TELEPHONE.'&m=addmark&usr_id='.$usr_id.'&status=D">'.$lang['srv_call_prelozen'].'</a></p>';
# preverimo koliko številk še imamo razen trenutno izbrane
@@ -3236,18 +3284,16 @@ class SurveyTelephone { if ($allUsers > 0) {
// Dovolimo izbrati novo stevilko samo v primeru ko imamo nakljucno sortiranje
if($this->call_order == 0)
- echo '<p><br /><a href="'.$this->addUrl('clear_current').'">'.$lang['srv_telephone_call_action_cancel_nextNumber'].' ('.count($toCall).')</a></p>';
+ echo '<p class="top16 bottom16"><a href="'.$this->addUrl('clear_current').'">'.$lang['srv_telephone_call_action_cancel_nextNumber'].' ('.count($toCall).')</a></p>';
}
# na voljo je samo ta številka, ne moremo ponudit druge
else {
- echo '<p><br /><a href="'.$this->addUrl('start_call').'">'.$lang['srv_telephone_call_action_cancel_preview'].' ('.count($toCall).')</a></p>';
+ echo '<p class="top16 bottom16"><a href="'.$this->addUrl('start_call').'">'.$lang['srv_telephone_call_action_cancel_preview'].' ('.count($toCall).')</a></p>';
}
// Razveljavimo zadnji status (undo)
if($last_status == 'A')
- echo '<p><a href="#" onClick="phnUndoStatus(\''.$usr_id.'\')">'.$lang['srv_telephone_call_action_undo_status'].' (»'.$last_status.'«)</a></p>';
-
- echo '<div id="telephone_popup" />';
+ echo '<p class="bottom16"><a href="#" onClick="phnUndoStatus(\''.$usr_id.'\')">'.$lang['srv_telephone_call_action_undo_status'].' (»'.$last_status.'«)</a></p>';
echo '</div>';
} else {
@@ -3276,38 +3322,56 @@ class SurveyTelephone { // Razveljavimo zadnji status (undo)
echo '<p><a href="#" onClick="phnUndoStatus(\''.$usr_id.'\')">'.$lang['srv_telephone_call_action_undo_status'].' (»'.$last_status.'«)</a></p>';
}
+
+ $qry_comment = sisplet_query("SELECT comment from srv_telephone_comment WHERE rec_id = '$usr_id'");
+ if(mysqli_num_rows($qry_comment) > 0){
+ $row_comment = mysqli_fetch_assoc($qry_comment);
+
+ echo $lang['srv_telephone_call_comment'];
+
+ echo '<div id="phn_user_comment" class="editable" onblur="phnSetUserComment(this,\''.$usr_id.'\');return false;" contentEditable="true">';
+ echo $row_comment['comment'];
+ echo '</div>';
+ }
+
+
# spodnje akcije
# če je anketar ne prikazujemo nextAction
if ($this->isAnketar == false) {
- echo '<div style="border-top:1px solid gray;">';
- echo '<p>';
+
session_start();
$nextAction = 1;
if (isset($_SESSION['phnNextAction'][$this->sid]) && (int)$_SESSION['phnNextAction'][$this->sid]==0) {
$nextAction = 0;
}
- echo '<label><input type="radio" name="phnNextAction" id="phn_exit" value="0"'.($nextAction == 0?' checked="checked"':'').' onchange="phnNextActionChange(this); return false;">';
+
+ /*echo '<div class="button_holder">';
+ echo '<button class="small white-blue" onclick="phnNextActionChange(0);">'.$lang['srv_telephone_call_action_cancel'].'</button>';
+ echo '<button class="small blue" onclick="phnNextActionChange(1);">'.$lang['srv_telephone_call_action_nextNumber'].'</button>';
+ echo '</div>';*/
+
+ echo '<div class="setting_holder">';
+
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="phnNextAction" id="phn_exit" value="0"'.($nextAction == 0?' checked="checked"':'').' ; return false;"><label for="phn_exit">';
echo $lang['srv_telephone_call_action_cancel'].'</label>';
- echo '<label><input type="radio" name="phnNextAction" id="phn_next" value="1"'.($nextAction == 1?' checked="checked"':'').' onchange="phnNextActionChange(this); return false;">';
+ echo '</div>';
+ echo '<div class="setting_item">';
+ echo '<input type="radio" name="phnNextAction" id="phn_next" value="1"'.($nextAction == 1?' checked="checked"':'').' onchange="phnNextActionChange(this); return false;"><label for="phn_next">';
echo $lang['srv_telephone_call_action_nextNumber'].'</label>';
- echo '</p>';
echo '</div>';
+
+ echo '</div>';
+
+
+
}
-
- $str_comment = "SELECT comment from srv_telephone_comment WHERE rec_id = '$usr_id'";
- $qry_comment = sisplet_query($str_comment);
- $row_comment = mysqli_fetch_assoc($qry_comment);
- echo '<p>';
- echo $lang['srv_telephone_call_comment'];
- echo '<div id="phn_user_comment" class="editable" onblur="phnSetUserComment(this,\''.$usr_id.'\');return false;" contentEditable="true">';
- echo $row_comment['comment'];
- echo '</div>';
- echo '</p>';
echo '</td></tr>';
echo '</table>';
+ echo '</fieldset>';
}
@@ -3316,9 +3380,10 @@ class SurveyTelephone { */
function displayPagination($all_records) {
global $lang,$site_url;
+
#trenutna stran
$page = isset($_GET['page']) ? $_GET['page'] : '1';
- $current = is_numeric($_GET['page']) && (int)$_GET['page'] > 0 ? $page : '1';
+ $current = (is_numeric($page) && (int)$page > 0) ? $page : '1';
$all = ceil($all_records / REC_ON_PAGE);
@@ -3398,11 +3463,12 @@ class SurveyTelephone { function startSurvey() {
# nastavimo marker na A
# in vrnemo dva urlja, enega za reload strani, drugega pa odpiranje ankete
- global $lang,$site_url, $global_user_id;
+ global $lang, $site_url, $global_user_id;
$return = array('error'=>'1', 'msg'=>'Napaka','reloadUrl'=>'','surveyUrl'=>'');
if ((int)$_POST['usr_id'] > 0) {
+
$usr_id = (int)$_POST['usr_id'];
# nastavimo url za nastavitev statusa in reload strani
@@ -3423,7 +3489,7 @@ class SurveyTelephone { $user_data = mysqli_fetch_assoc($chk_query);
# sestavimo še url za odpiranje izpolnjevanja ankete
- $return['surveyUrl'] = $site_url.'a/'.Common::encryptAnketaID($this->sid).'&survey-'.$this->sid.'&code='.$user_data['pass'];
+ $return['surveyUrl'] = $site_url.'a/'.SurveyInfo::getInstance()->getSurveyHash().'&survey-'.$this->sid.'&code='.$user_data['pass'];
$return['error'] = '';
}
else {
@@ -3472,7 +3538,7 @@ class SurveyTelephone { sisplet_query($strInsert);
# vstavimo v srv_data_text
- $db_table = (SurveyInfo::getInstance()->getSurveyColumn('db_table') == 1) ? '_active' : '';
+ $db_table = SurveyInfo::getInstance()->getSurveyArchiveDBString();
if (count($strInsertDataText) > 0) {
$strInsert = "INSERT INTO srv_data_text".$db_table." (spr_id, vre_id, text, usr_id) VALUES ";
$strInsert .= implode(',',$strInsertDataText);
@@ -3481,7 +3547,7 @@ class SurveyTelephone { sisplet_query("COMMIT");
# sestavimo še url za odpiranje izpolnjevanja ankete
- $return['surveyUrl'] = $site_url.'a/'.Common::encryptAnketaID($this->sid).'&survey-'.$this->sid.'&code='.$res_row[password];
+ $return['surveyUrl'] = $site_url.'a/'.SurveyInfo::getInstance()->getSurveyHash().'&survey-'.$this->sid.'&code='.$res_row[password];
$return['error'] = '';
}
}
@@ -3497,6 +3563,11 @@ class SurveyTelephone { $newDate = date('d.m.Y H:i', time()+3600 );
$marker = $_POST['marker'];
$usr_id = (int)$_POST['usr_id'];
+
+ echo '<h2>'.$lang['srv_inv_recipients_status'].'</h2>';
+ echo '<div class="popup_close"><a href="#" onClick="$(\'#telephone_popup\').hide(); $(\'#fade\').fadeOut(\'slow\');">✕</a></div>';
+
+ $button_setting = '';
if ($usr_id > 0 && ($marker == 'P' || $marker == 'T')) {
if ($marker == 'T') {
@@ -3508,8 +3579,11 @@ class SurveyTelephone { }
echo '<p><form name="'.$marker.'">';
- echo '<input id="'.$marker.'_datetime" type="text" name="'.$marker.'_datetime" value="'.$newDate.'" />
- <span class="faicon calendar_icon icon-as_link" id="'.$marker.'_datetime_image"></span>
+
+ echo '<div class="setting_holder">';
+ echo '<div class="setting_item">';
+ echo '<input id="'.$marker.'_datetime" type="text" class="text large" name="'.$marker.'_datetime" value="'.$newDate.'" />
+ <span class="faicon calendar_icon blue pointer" id="'.$marker.'_datetime_image"></span>
<script type="text/javascript">
Calendar.setup({
inputField : "'.$marker.'_datetime",
@@ -3517,16 +3591,23 @@ class SurveyTelephone { button : "'.$marker.'_datetime_image",
singleClick : true
});
- </script></form>
- </p>';
-
+ </script></form>';
+ echo '</div>';
+ echo '</div>';
+ }
+
+ echo '<div class="button_holder">';
+ echo '<button class="medium white-blue" onClick="$(\'#telephone_popup\').hide(); $(\'#fade\').fadeOut(\'slow\');">'.$lang['edit1338'].'</button>';
+
+ if ($usr_id > 0 && ($marker == 'P' || $marker == 'T')){
+
if ($marker == 'T') {
- echo '<span class="buttonwrapper floatRight spaceRight" ><a class="ovalbutton ovalbutton_orange" href="#" onclick="phnAddMarker(\''.$usr_id.'\',\''.$marker.'\'); return false;"><span>'.$lang['srv_call_zmenjen'].'</span></a></span>';
+ echo '<button class="medium blue" onclick="phnAddMarker(\''.$usr_id.'\',\''.$marker.'\'); return false;">'.$lang['srv_call_zmenjen'].'</button>';
} else if ($marker == 'P') {
- echo '<span class="buttonwrapper floatRight spaceRight" ><a class="ovalbutton ovalbutton_orange" href="#" onclick="phnAddMarker(\''.$usr_id.'\',\''.$marker.'\'); return false;"><span>'.$lang['srv_call_prekinjen'].'</span></a></span>';
+ echo '<button class="medium blue" onclick="phnAddMarker(\''.$usr_id.'\',\''.$marker.'\'); return false;">'.$lang['srv_call_prekinjen'].'</button>';
}
}
- echo '<span class="buttonwrapper floatRight spaceRight" ><a class="ovalbutton ovalbutton_gray" href="#" onclick="$(\'#telephone_popup\').hide(); $(\'#fade\').fadeOut(\'slow\'); "><span>'.$lang['srv_cancel'].'</span></a></span>';
+ echo '</div>';
}
// Nastavimo filter za pregled respondentov
|