From 7988eed4d50a3160de37441a48d58b21a7f4fd6f Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 4 Feb 2010 04:40:06 +0000 Subject: [PATCH] updated language builds flag for 2.2.0rc4 release git-svn-id: svn://192.168.202.10@1330 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../LANG_www/agc_br/vdc_db_query.php | 52 +- .../agc_2.2.0/LANG_www/agc_br/vicidial.php | 27 +- .../LANG_www/agc_de/active_list_refresh.php | 2 +- .../LANG_www/agc_de/call_log_display.php | 2 +- .../LANG_www/agc_de/conf_exten_check.php | 2 +- .../LANG_www/agc_de/inbound_popup.php | 2 +- .../LANG_www/agc_de/live_exten_check.php | 2 +- .../LANG_www/agc_de/manager_send.php | 2 +- .../LANG_www/agc_de/park_calls_display.php | 2 +- .../LANG_www/agc_de/vdc_db_query.php | 54 +- .../agc_2.2.0/LANG_www/agc_de/vicidial.php | 27 +- .../LANG_www/agc_de/voicemail_check.php | 2 +- .../LANG_www/agc_el/astguiclient.php | 2 +- .../LANG_www/agc_el/vdc_db_query.php | 52 +- .../agc_2.2.0/LANG_www/agc_el/vicidial.php | 29 +- .../LANG_www/agc_es/astguiclient.php | 2 +- .../LANG_www/agc_es/vdc_db_query.php | 52 +- .../agc_2.2.0/LANG_www/agc_es/vicidial.php | 25 +- .../LANG_www/agc_fr/active_list_refresh.php | 2 +- .../LANG_www/agc_fr/astguiclient.php | 2 +- .../LANG_www/agc_fr/call_log_display.php | 2 +- .../LANG_www/agc_fr/conf_exten_check.php | 2 +- .../LANG_www/agc_fr/inbound_popup.php | 2 +- .../LANG_www/agc_fr/live_exten_check.php | 2 +- .../LANG_www/agc_fr/manager_send.php | 2 +- .../LANG_www/agc_fr/park_calls_display.php | 2 +- .../LANG_www/agc_fr/vdc_db_query.php | 54 +- .../agc_2.2.0/LANG_www/agc_fr/vicidial.php | 29 +- .../LANG_www/agc_fr/voicemail_check.php | 2 +- .../LANG_www/agc_it/active_list_refresh.php | 2 +- .../LANG_www/agc_it/astguiclient.php | 14 +- .../LANG_www/agc_it/call_log_display.php | 4 +- .../LANG_www/agc_it/conf_exten_check.php | 8 +- .../LANG_www/agc_it/inbound_popup.php | 6 +- .../LANG_www/agc_it/live_exten_check.php | 4 +- .../LANG_www/agc_it/manager_send.php | 106 ++-- .../LANG_www/agc_it/park_calls_display.php | 4 +- .../agc_2.2.0/LANG_www/agc_it/timeclock.php | 42 +- .../LANG_www/agc_it/vdc_db_query.php | 114 ++-- .../agc_2.2.0/LANG_www/agc_it/vicidial.php | 239 ++++---- .../LANG_www/agc_it/voicemail_check.php | 4 +- .../LANG_www/agc_nl/astguiclient.php | 2 +- .../LANG_www/agc_nl/vdc_db_query.php | 52 +- .../agc_2.2.0/LANG_www/agc_nl/vicidial.php | 29 +- .../LANG_www/agc_pl/vdc_db_query.php | 52 +- .../agc_2.2.0/LANG_www/agc_pl/vicidial.php | 27 +- .../LANG_www/agc_pt/active_list_refresh.php | 2 +- .../LANG_www/agc_pt/astguiclient.php | 2 +- .../LANG_www/agc_pt/call_log_display.php | 2 +- .../LANG_www/agc_pt/conf_exten_check.php | 2 +- .../LANG_www/agc_pt/inbound_popup.php | 2 +- .../LANG_www/agc_pt/live_exten_check.php | 2 +- .../LANG_www/agc_pt/manager_send.php | 2 +- .../LANG_www/agc_pt/park_calls_display.php | 2 +- .../LANG_www/agc_pt/vdc_db_query.php | 54 +- .../agc_2.2.0/LANG_www/agc_pt/vicidial.php | 29 +- .../LANG_www/agc_pt/voicemail_check.php | 2 +- .../LANG_www/agc_ru/active_list_refresh.php | 2 +- .../LANG_www/agc_ru/astguiclient.php | 2 +- .../LANG_www/agc_ru/call_log_display.php | 2 +- .../LANG_www/agc_ru/conf_exten_check.php | 2 +- .../LANG_www/agc_ru/inbound_popup.php | 2 +- .../LANG_www/agc_ru/live_exten_check.php | 2 +- .../LANG_www/agc_ru/manager_send.php | 2 +- .../LANG_www/agc_ru/park_calls_display.php | 2 +- .../LANG_www/agc_ru/vdc_db_query.php | 54 +- .../agc_2.2.0/LANG_www/agc_ru/vicidial.php | 33 +- .../LANG_www/agc_ru/voicemail_check.php | 2 +- .../LANG_www/agc_sk/astguiclient.php | 2 +- .../LANG_www/agc_sk/vdc_db_query.php | 52 +- .../agc_2.2.0/LANG_www/agc_sk/vicidial.php | 29 +- .../LANG_www/agc_tw/active_list_refresh.php | 2 +- .../LANG_www/agc_tw/astguiclient.php | 2 +- .../LANG_www/agc_tw/call_log_display.php | 2 +- .../LANG_www/agc_tw/conf_exten_check.php | 2 +- .../LANG_www/agc_tw/inbound_popup.php | 2 +- .../LANG_www/agc_tw/live_exten_check.php | 2 +- .../LANG_www/agc_tw/manager_send.php | 2 +- .../LANG_www/agc_tw/park_calls_display.php | 2 +- .../LANG_www/agc_tw/vdc_db_query.php | 54 +- .../agc_2.2.0/LANG_www/agc_tw/vicidial.php | 29 +- .../LANG_www/agc_tw/voicemail_check.php | 2 +- .../LANG_www/vicidial_de/AST_VDADstats.php | 26 +- .../vicidial_de/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_de/AST_agent_status_detail.php | 18 +- .../vicidial_de/AST_agent_time_detail.php | 51 +- .../agc_2.2.0/LANG_www/vicidial_de/admin.php | 59 +- .../vicidial_de/call_report_export.php | 21 +- .../LANG_www/vicidial_de/list_download.php | 15 +- .../LANG_www/vicidial_de/listloader.pl | 153 +++++- .../LANG_www/vicidial_de/listloader_super.pl | 153 +++++- .../vicidial_de/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_de/non_agent_api.php | 148 ++++- .../LANG_www/vicidial_de/user_stats.php | 161 +++++- .../LANG_www/vicidial_el/AST_VDADstats.php | 26 +- .../vicidial_el/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_el/AST_agent_status_detail.php | 18 +- .../vicidial_el/AST_agent_time_detail.php | 51 +- .../agc_2.2.0/LANG_www/vicidial_el/admin.php | 59 +- .../vicidial_el/call_report_export.php | 21 +- .../LANG_www/vicidial_el/dbconnect.php | 8 +- .../LANG_www/vicidial_el/list_download.php | 15 +- .../LANG_www/vicidial_el/listloader.pl | 153 +++++- .../LANG_www/vicidial_el/listloader_super.pl | 153 +++++- .../vicidial_el/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_el/non_agent_api.php | 148 ++++- .../LANG_www/vicidial_el/user_stats.php | 161 +++++- .../LANG_www/vicidial_es/AST_VDADstats.php | 26 +- .../vicidial_es/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_es/AST_agent_status_detail.php | 18 +- .../vicidial_es/AST_agent_time_detail.php | 51 +- .../agc_2.2.0/LANG_www/vicidial_es/admin.php | 59 +- .../vicidial_es/call_report_export.php | 21 +- .../LANG_www/vicidial_es/list_download.php | 15 +- .../LANG_www/vicidial_es/listloader.pl | 153 +++++- .../LANG_www/vicidial_es/listloader_super.pl | 153 +++++- .../vicidial_es/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_es/non_agent_api.php | 148 ++++- .../LANG_www/vicidial_es/user_stats.php | 161 +++++- .../LANG_www/vicidial_fr/AST_VDADstats.php | 26 +- .../vicidial_fr/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_fr/AST_agent_status_detail.php | 18 +- .../vicidial_fr/AST_agent_time_detail.php | 51 +- .../agc_2.2.0/LANG_www/vicidial_fr/admin.php | 59 +- .../vicidial_fr/call_report_export.php | 21 +- .../LANG_www/vicidial_fr/list_download.php | 15 +- .../LANG_www/vicidial_fr/listloader.pl | 153 +++++- .../LANG_www/vicidial_fr/listloader_super.pl | 153 +++++- .../vicidial_fr/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_fr/non_agent_api.php | 148 ++++- .../LANG_www/vicidial_fr/user_stats.php | 161 +++++- .../LANG_www/vicidial_it/AST_VDADstats.php | 26 +- .../vicidial_it/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_it/AST_agent_status_detail.php | 18 +- .../vicidial_it/AST_agent_time_detail.php | 51 +- .../agc_2.2.0/LANG_www/vicidial_it/admin.php | 59 +- .../vicidial_it/call_report_export.php | 21 +- .../LANG_www/vicidial_it/list_download.php | 15 +- .../LANG_www/vicidial_it/listloader.pl | 153 +++++- .../LANG_www/vicidial_it/listloader_super.pl | 153 +++++- .../vicidial_it/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_it/non_agent_api.php | 148 ++++- .../LANG_www/vicidial_it/user_stats.php | 161 +++++- .../bin/build_translation_www_files.pl | 516 +++++++++--------- .../extras/MySQL_AST_CREATE_tables.sql | 2 +- .../agc_2.2.0/extras/upgrade_2.2.0.sql | 2 +- agc_2-X/branches/agc_2.2.0/version | 2 +- .../trunk/LANG_www/agc_br/vdc_db_query.php | 52 +- agc_2-X/trunk/LANG_www/agc_br/vicidial.php | 27 +- .../LANG_www/agc_de/active_list_refresh.php | 2 +- .../LANG_www/agc_de/call_log_display.php | 2 +- .../LANG_www/agc_de/conf_exten_check.php | 2 +- .../trunk/LANG_www/agc_de/inbound_popup.php | 2 +- .../LANG_www/agc_de/live_exten_check.php | 2 +- .../trunk/LANG_www/agc_de/manager_send.php | 2 +- .../LANG_www/agc_de/park_calls_display.php | 2 +- .../trunk/LANG_www/agc_de/vdc_db_query.php | 54 +- agc_2-X/trunk/LANG_www/agc_de/vicidial.php | 27 +- .../trunk/LANG_www/agc_de/voicemail_check.php | 2 +- .../trunk/LANG_www/agc_el/astguiclient.php | 2 +- .../trunk/LANG_www/agc_el/vdc_db_query.php | 52 +- agc_2-X/trunk/LANG_www/agc_el/vicidial.php | 29 +- .../trunk/LANG_www/agc_es/astguiclient.php | 2 +- .../trunk/LANG_www/agc_es/vdc_db_query.php | 52 +- agc_2-X/trunk/LANG_www/agc_es/vicidial.php | 25 +- .../LANG_www/agc_fr/active_list_refresh.php | 2 +- .../trunk/LANG_www/agc_fr/astguiclient.php | 2 +- .../LANG_www/agc_fr/call_log_display.php | 2 +- .../LANG_www/agc_fr/conf_exten_check.php | 2 +- .../trunk/LANG_www/agc_fr/inbound_popup.php | 2 +- .../LANG_www/agc_fr/live_exten_check.php | 2 +- .../trunk/LANG_www/agc_fr/manager_send.php | 2 +- .../LANG_www/agc_fr/park_calls_display.php | 2 +- .../trunk/LANG_www/agc_fr/vdc_db_query.php | 54 +- agc_2-X/trunk/LANG_www/agc_fr/vicidial.php | 29 +- .../trunk/LANG_www/agc_fr/voicemail_check.php | 2 +- .../LANG_www/agc_it/active_list_refresh.php | 2 +- .../trunk/LANG_www/agc_it/astguiclient.php | 14 +- .../LANG_www/agc_it/call_log_display.php | 4 +- .../LANG_www/agc_it/conf_exten_check.php | 8 +- .../trunk/LANG_www/agc_it/inbound_popup.php | 6 +- .../LANG_www/agc_it/live_exten_check.php | 4 +- .../trunk/LANG_www/agc_it/manager_send.php | 106 ++-- .../LANG_www/agc_it/park_calls_display.php | 4 +- agc_2-X/trunk/LANG_www/agc_it/timeclock.php | 42 +- .../trunk/LANG_www/agc_it/vdc_db_query.php | 114 ++-- agc_2-X/trunk/LANG_www/agc_it/vicidial.php | 239 ++++---- .../trunk/LANG_www/agc_it/voicemail_check.php | 4 +- .../trunk/LANG_www/agc_nl/astguiclient.php | 2 +- .../trunk/LANG_www/agc_nl/vdc_db_query.php | 52 +- agc_2-X/trunk/LANG_www/agc_nl/vicidial.php | 29 +- .../trunk/LANG_www/agc_pl/vdc_db_query.php | 52 +- agc_2-X/trunk/LANG_www/agc_pl/vicidial.php | 27 +- .../LANG_www/agc_pt/active_list_refresh.php | 2 +- .../trunk/LANG_www/agc_pt/astguiclient.php | 2 +- .../LANG_www/agc_pt/call_log_display.php | 2 +- .../LANG_www/agc_pt/conf_exten_check.php | 2 +- .../trunk/LANG_www/agc_pt/inbound_popup.php | 2 +- .../LANG_www/agc_pt/live_exten_check.php | 2 +- .../trunk/LANG_www/agc_pt/manager_send.php | 2 +- .../LANG_www/agc_pt/park_calls_display.php | 2 +- .../trunk/LANG_www/agc_pt/vdc_db_query.php | 54 +- agc_2-X/trunk/LANG_www/agc_pt/vicidial.php | 29 +- .../trunk/LANG_www/agc_pt/voicemail_check.php | 2 +- .../LANG_www/agc_ru/active_list_refresh.php | 2 +- .../trunk/LANG_www/agc_ru/astguiclient.php | 2 +- .../LANG_www/agc_ru/call_log_display.php | 2 +- .../LANG_www/agc_ru/conf_exten_check.php | 2 +- .../trunk/LANG_www/agc_ru/inbound_popup.php | 2 +- .../LANG_www/agc_ru/live_exten_check.php | 2 +- .../trunk/LANG_www/agc_ru/manager_send.php | 2 +- .../LANG_www/agc_ru/park_calls_display.php | 2 +- .../trunk/LANG_www/agc_ru/vdc_db_query.php | 54 +- agc_2-X/trunk/LANG_www/agc_ru/vicidial.php | 33 +- .../trunk/LANG_www/agc_ru/voicemail_check.php | 2 +- .../trunk/LANG_www/agc_sk/astguiclient.php | 2 +- .../trunk/LANG_www/agc_sk/vdc_db_query.php | 52 +- agc_2-X/trunk/LANG_www/agc_sk/vicidial.php | 29 +- .../LANG_www/agc_tw/active_list_refresh.php | 2 +- .../trunk/LANG_www/agc_tw/astguiclient.php | 2 +- .../LANG_www/agc_tw/call_log_display.php | 2 +- .../LANG_www/agc_tw/conf_exten_check.php | 2 +- .../trunk/LANG_www/agc_tw/inbound_popup.php | 2 +- .../LANG_www/agc_tw/live_exten_check.php | 2 +- .../trunk/LANG_www/agc_tw/manager_send.php | 2 +- .../LANG_www/agc_tw/park_calls_display.php | 2 +- .../trunk/LANG_www/agc_tw/vdc_db_query.php | 54 +- agc_2-X/trunk/LANG_www/agc_tw/vicidial.php | 29 +- .../trunk/LANG_www/agc_tw/voicemail_check.php | 2 +- .../LANG_www/vicidial_de/AST_VDADstats.php | 26 +- .../vicidial_de/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_de/AST_agent_status_detail.php | 18 +- .../vicidial_de/AST_agent_time_detail.php | 51 +- agc_2-X/trunk/LANG_www/vicidial_de/admin.php | 59 +- .../vicidial_de/call_report_export.php | 21 +- .../LANG_www/vicidial_de/list_download.php | 15 +- .../trunk/LANG_www/vicidial_de/listloader.pl | 153 +++++- .../LANG_www/vicidial_de/listloader_super.pl | 153 +++++- .../vicidial_de/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_de/non_agent_api.php | 148 ++++- .../trunk/LANG_www/vicidial_de/user_stats.php | 161 +++++- .../LANG_www/vicidial_el/AST_VDADstats.php | 26 +- .../vicidial_el/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_el/AST_agent_status_detail.php | 18 +- .../vicidial_el/AST_agent_time_detail.php | 51 +- agc_2-X/trunk/LANG_www/vicidial_el/admin.php | 59 +- .../vicidial_el/call_report_export.php | 21 +- .../trunk/LANG_www/vicidial_el/dbconnect.php | 8 +- .../LANG_www/vicidial_el/list_download.php | 15 +- .../trunk/LANG_www/vicidial_el/listloader.pl | 153 +++++- .../LANG_www/vicidial_el/listloader_super.pl | 153 +++++- .../vicidial_el/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_el/non_agent_api.php | 148 ++++- .../trunk/LANG_www/vicidial_el/user_stats.php | 161 +++++- .../LANG_www/vicidial_es/AST_VDADstats.php | 26 +- .../vicidial_es/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_es/AST_agent_status_detail.php | 18 +- .../vicidial_es/AST_agent_time_detail.php | 51 +- agc_2-X/trunk/LANG_www/vicidial_es/admin.php | 59 +- .../vicidial_es/call_report_export.php | 21 +- .../LANG_www/vicidial_es/list_download.php | 15 +- .../trunk/LANG_www/vicidial_es/listloader.pl | 153 +++++- .../LANG_www/vicidial_es/listloader_super.pl | 153 +++++- .../vicidial_es/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_es/non_agent_api.php | 148 ++++- .../trunk/LANG_www/vicidial_es/user_stats.php | 161 +++++- .../LANG_www/vicidial_fr/AST_VDADstats.php | 26 +- .../vicidial_fr/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_fr/AST_agent_status_detail.php | 18 +- .../vicidial_fr/AST_agent_time_detail.php | 51 +- agc_2-X/trunk/LANG_www/vicidial_fr/admin.php | 59 +- .../vicidial_fr/call_report_export.php | 21 +- .../LANG_www/vicidial_fr/list_download.php | 15 +- .../trunk/LANG_www/vicidial_fr/listloader.pl | 153 +++++- .../LANG_www/vicidial_fr/listloader_super.pl | 153 +++++- .../vicidial_fr/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_fr/non_agent_api.php | 148 ++++- .../trunk/LANG_www/vicidial_fr/user_stats.php | 161 +++++- .../LANG_www/vicidial_it/AST_VDADstats.php | 26 +- .../vicidial_it/AST_agent_days_detail.php | 14 +- .../AST_agent_performance_detail.php | 55 +- .../vicidial_it/AST_agent_status_detail.php | 18 +- .../vicidial_it/AST_agent_time_detail.php | 51 +- agc_2-X/trunk/LANG_www/vicidial_it/admin.php | 59 +- .../vicidial_it/call_report_export.php | 21 +- .../LANG_www/vicidial_it/list_download.php | 15 +- .../trunk/LANG_www/vicidial_it/listloader.pl | 153 +++++- .../LANG_www/vicidial_it/listloader_super.pl | 153 +++++- .../vicidial_it/new_listloader_superL.php | 144 ++++- .../LANG_www/vicidial_it/non_agent_api.php | 148 ++++- .../trunk/LANG_www/vicidial_it/user_stats.php | 161 +++++- .../trunk/bin/build_translation_www_files.pl | 516 +++++++++--------- 301 files changed, 11717 insertions(+), 2593 deletions(-) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vdc_db_query.php index 61d1ed96..ebfa9a6c 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vicidial.php index 60054346..fdcebbfa 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_br/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUsuário; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Início\"
\"Discar"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Usuários&action=Authenticate&return_module=Usuários&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/active_list_refresh.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/active_list_refresh.php index c3323059..de44be3c 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/call_log_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/call_log_display.php index 534c23fe..c22cdd86 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/call_log_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/conf_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/conf_exten_check.php index af358b2f..2d1c0e07 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/inbound_popup.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/inbound_popup.php index 3aed520d..3b0148b1 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/inbound_popup.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/live_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/live_exten_check.php index 3a094519..0b53fa1c 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/live_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/manager_send.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/manager_send.php index edca2532..95fe0851 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/manager_send.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/park_calls_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/park_calls_display.php index 12bdf195..8acb363a 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/park_calls_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vdc_db_query.php index 6c751024..c3470ec4 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vicidial.php index bbd83c44..c3756c36 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeBenutzer; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"WiederAufnehmen\"
\"Nächste"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Benutzers&action=Authenticate&return_module=Benutzers&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/voicemail_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/voicemail_check.php index a0f296dc..41b37f3e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/voicemail_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_de/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/astguiclient.php index 35f88e31..d55c139d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "χειριστής astGUIclient: Σύνδεση\n"; + echo "χειριστής astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vdc_db_query.php index ce98d802..8f81c8dc 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vicidial.php index 233936f6..22b347a0 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_el/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Σύνδεση\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeΧρήστης; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Επανάληψη\"
\"Κλήση"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Χρήστηςs&action=Authenticate&return_module=Χρήστηςs&return_action=Σύνδεση&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/astguiclient.php index 29fb4907..7dee1758 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web client astGUIclient: Conexión\n"; + echo "web client astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vdc_db_query.php index cdb708b5..559f24ca 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vicidial.php index ea0d44c7..4b36d014 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_es/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Conexión\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUsuario; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Comienzo\"
\"Marcar"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/active_list_refresh.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/active_list_refresh.php index 0d81835a..2e9c0760 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/astguiclient.php index fdfb77f3..5b578b49 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "astGUIclient Client Web: Ouverture de Session\n"; + echo "astGUIclient Client Web: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/call_log_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/call_log_display.php index b31579b9..8a52cf2b 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/call_log_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/conf_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/conf_exten_check.php index dee740a4..f9bf57a4 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/inbound_popup.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/inbound_popup.php index f5c0101a..1b734c3b 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/inbound_popup.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/live_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/live_exten_check.php index a20eefa0..85224fc3 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/live_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/manager_send.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/manager_send.php index 9d690c25..335adb6a 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/manager_send.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/park_calls_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/park_calls_display.php index 64c8dc1a..bc20d026 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/park_calls_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vdc_db_query.php index 2556e2ed..e562766b 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vicidial.php index e0f7d21c..1eb3b6de 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo ""; echo ""; echo "\n"; - echo "\n"; + echo "\n"; echo ""; echo "\n"; echo ""; @@ -953,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} } // ################################################################################ -// Send Redirect command for live call to Managersends phone name where call is going to +// Send Redirect command for live call to Manager sends phone name where call is going to function mainxfer_send_redirect(taskvar,taskxferconf) { var xmlhttp=false; @@ -1046,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} // ################################################################################ -// Send Originate command for local dial to Managersends phone name where call is going to +// Send Originate command for local dial to Manager sends phone name where call is going to function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop) { var xmlhttp=false; @@ -1825,7 +1825,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var LMAcontent_change=0; var LMAcontent_match=0; var conv_start=-1; - var live_conf_HTML = "CHIAMATE IN CORSO SU QUESTA CONFERENZA:
Agent web client: Ouverture de Session\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUtilisateur; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Résumé\"
\"Appel"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Utilisateurs&action=Authenticate&return_module=Utilisateurs&return_action=Ouverture de Session&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/voicemail_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/voicemail_check.php index 38fa7f95..355a9871 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/voicemail_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_fr/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/active_list_refresh.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/active_list_refresh.php index 994fb9cb..24826253 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/astguiclient.php index c7759742..547ed6c6 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/astguiclient.php @@ -261,7 +261,7 @@ echo "
Login Telefono
 
Spiacente, il telefono inserito non e` attivo in questo sistema, riprova di nuovo:
 
 
Spiacente, il telefono inserito non è attivo in questo sistema, riprova di nuovo:
 
Login Telefono:
Password Telefono:
"; + var live_conf_HTML = "CHIAMATE IN CORSO IN QUESTA CONFERENZA:
#CANALE REMOTORIAGGANCIATRASF
"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -2758,7 +2758,7 @@ echo "\n"; -
#CANALE REMOTORIAGGANCIATRASF
+
TRASFERIMENTO DELLA CHIAMATA IN CORSO
Canale trasferito: Channel
-
TRASFERIMENTO DELLA CHIAMATA IN CORSO
Canale da trasferire: Channel
Interni:
Menu Interni

@@ -2768,7 +2768,7 @@ echo "\n"; Aggiorna


Torna alla schermata principale

Conferenze:
(Seleziona uno dei numeri sotto per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenze
+
Conferenze:
(seleziona uno dei numeri sotto per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenze
@@ -2839,7 +2839,7 @@ echo "\n"; \n"; echo "\n"; - echo "\n"; + echo "\n"; echo ""; echo ""; echo "\n"; - echo "\n"; + echo "\n"; echo ""; echo "\n"; echo ""; @@ -1979,7 +1980,7 @@ else if ($auto_dial_level > 0) { - echo "\n"; + echo "\n"; $closer_chooser_string=''; @@ -2021,7 +2022,7 @@ else } else { - print "\n"; + print "\n"; $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME','N','N');"; if ($DB) {echo "$stmt\n";} @@ -2059,7 +2060,7 @@ else echo "Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "
-STOP | START     Frequenza di refresh: 1000 ms Piu` veloce | Piu` lento

+STOP | START     Frequenza di refresh: 1000 ms Più veloce | Più lento

Inizializzazione..
Interni Attivi
diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/call_log_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/call_log_display.php index 1e8d6e86..2d00000e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/call_log_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -121,7 +121,7 @@ echo " if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; + echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/conf_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/conf_exten_check.php index 2496b77e..dbc79787 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -187,7 +187,7 @@ echo " if (strlen($conf_exten)<1) { $channel_live=0; - echo "Conf Exten $conf_exten non e` valido\n"; + echo "Conf Exten $conf_exten non è valido\n"; exit; } else @@ -634,7 +634,7 @@ echo " if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) { $channel_live=0; - echo "Conf Exten $conf_exten non e` valido or Exten $exten non e` valido\n"; + echo "Conf Exten $conf_exten non è valido or Exten $exten non è valido\n"; exit; } else @@ -644,7 +644,7 @@ echo " $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03013',$user,$server_ip,$session_name,$one_mysql_log);} } - echo "Conferenza $conf_exten e` stato registrato su $exten\n"; + echo "Conferenza $conf_exten è stato registrato su $exten\n"; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/inbound_popup.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/inbound_popup.php index 51416989..a3112792 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/inbound_popup.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -266,7 +266,7 @@ $channel_live=1; if (strlen($uniqueid)<9) { $channel_live=0; - echo "Uniqueid $uniqueid non e` valido\n"; + echo "Uniqueid $uniqueid non è valido\n"; exit; } else @@ -320,7 +320,7 @@ else echo "
Numero chiamato: $row[8]
Note:$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
Note: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; echo "RIAGGANCIA - \n"; echo "INVIA ALLA MIA VOICEMAIL\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/live_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/live_exten_check.php index 0262a41e..089710ca 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/live_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -132,7 +132,7 @@ echo "$row[0]|"; if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; + echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/manager_send.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/manager_send.php index f4f118b6..fb1579e8 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/manager_send.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -297,7 +297,7 @@ if ($ACTION=="SysCIDOriginate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) { - echo "Exten $exten non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; + echo "Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; } else { @@ -319,9 +319,9 @@ if ($ACTION=="OriginateName") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -348,9 +348,9 @@ if ($ACTION=="OriginateNameVmail") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; @@ -392,13 +392,13 @@ if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) { - echo "ERROR Exten $exten non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; + echo "ERROR Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; } else { if ( (eregi('MANUAL',$agent_dialed_type)) and ( (preg_match("/^\d860\d\d\d\d$/i",$exten)) or (preg_match("/^860\d\d\d\d$/i",$exten)) ) ) { - echo "ERROR Non ti è permesso di comporre in sessioni altro agente $exten\n"; + echo "ERROR Non ti è permesso lavorare nella sessione di un altro operatore $exten\n"; exit; } @@ -442,7 +442,7 @@ if ($ACTION=="HangupConfDial") if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) { $channel_live=0; - echo "conference $exten non e` valido or ext_context $ext_context or queryCID $queryCID non e` valido, Hangup comando non inserito\n"; + echo "conference $exten non è valido or ext_context $ext_context or queryCID $queryCID non è valido, Hangup comando non inserito\n"; } else { @@ -486,7 +486,7 @@ if ($ACTION=="Hangup") if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) { $channel_live=0; - echo "Channel $channel non e` valido or queryCID $queryCID non e` valido, Hangup comando non inserito\n"; + echo "Channel $channel non è valido or queryCID $queryCID non è valido, Hangup comando non inserito\n"; } else { @@ -517,7 +517,7 @@ if ($ACTION=="Hangup") $rowx=mysql_fetch_row($rslt); if ($rowx[0]==0) { - echo "Call $CalLCID $channel non e` attivo su $call_server_ip, Checking Live Canale...\n"; + echo "Call $CalLCID $channel non è attivo su $call_server_ip, Checking Live Canale...\n"; $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; if ($format=='debug') {echo "\n";} @@ -527,7 +527,7 @@ if ($ACTION=="Hangup") if ($row[0]==0) { $channel_live=0; - echo "Channel $channel non e` attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n"; + echo "Channel $channel non è attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n"; } else { @@ -693,9 +693,9 @@ if ($ACTION=="RedirectVD") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -776,9 +776,9 @@ if ($ACTION=="RedirectToPark") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "extenName $extenName deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; @@ -806,9 +806,9 @@ if ($ACTION=="RedirectFromPark") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -830,9 +830,9 @@ if ($ACTION=="RedirectName") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -859,9 +859,9 @@ if ($ACTION=="RedirectNameVmail") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; @@ -899,10 +899,10 @@ if ($ACTION=="RedirectXtraCXNeW") { $channel_liveX=0; $channel_liveY=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "ExtraChannel $extrachannel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "ExtraChannel $extrachannel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -1008,8 +1008,8 @@ if ($ACTION=="RedirectXtraCXNeW") if ($rowx[0]==0) { $channel_liveX=0; - echo "Channel $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";} + echo "Channel $channel non è attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -1027,8 +1027,8 @@ if ($ACTION=="RedirectXtraCXNeW") if ($rowx[0]==0) { $channel_liveY=0; - echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";} + echo "Channel $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -1124,10 +1124,10 @@ if ($ACTION=="RedirectXtraNeW") { $channel_liveX=0; $channel_liveY=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "ExtraChannel $extrachannel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "ExtraChannel $extrachannel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -1225,8 +1225,8 @@ if ($ACTION=="RedirectXtraNeW") if ($rowx[0]==0) { $channel_liveX=0; - echo "Channel $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";} + echo "Channel $channel non è attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -1244,8 +1244,8 @@ if ($ACTION=="RedirectXtraNeW") if ($rowx[0]==0) { $channel_liveY=0; - echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";} + echo "Channel $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -1345,9 +1345,9 @@ if ($ACTION=="Redirect") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect") if ($rowx[0]==0) { $channel_live=0; - echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; + echo "Channel $channel non è attivo su $server_ip, Redirect comando non inserito\n"; } } if ($channel_live==1) @@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) ) { $channel_live=0; - echo "Channel $channel non e` valido or queryCID $queryCID non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n"; + echo "Channel $channel non è valido or queryCID $queryCID non è valido or filename: $filename non è valido, $ACTION comando non inserito\n"; } else { @@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ($rowx[0]==0) { $channel_live=0; - echo "Channel $channel non e` attivo su $server_ip, $ACTION comando non inserito\n"; + echo "Channel $channel non è attivo su $server_ip, $ACTION comando non inserito\n"; } } if ($channel_live==1) @@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) ) { $channel_live=0; - echo "Channel $channel non e` valido or exten $exten non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n"; + echo "Channel $channel non è valido or exten $exten non è valido or filename: $filename non è valido, $ACTION comando non inserito\n"; } else { @@ -1639,7 +1639,7 @@ if ($ACTION=="VolumeControl") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) ) { - echo "Conferenza $exten, Stage $stage non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; + echo "Conferenza $exten, Stage $stage non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; } else { diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/park_calls_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/park_calls_display.php index c5d2e0b7..6beccec3 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/park_calls_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -111,7 +111,7 @@ echo " if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; + echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/timeclock.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/timeclock.php index 8299312d..82c5f9c2 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/timeclock.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/timeclock.php @@ -120,10 +120,10 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ($valid_user < 1) { ### NOT A VALID USER/PASS - $VDdisplayMESSAGE = "Lutente e la password che hai inserito non sono attivi nel sistema
Si prega di riprovare:"; + $VDdisplayMESSAGE = "L`utente e la password che hai inserito non sono attivi nel sistema
Si prega di riprovare:"; echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -138,7 +138,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) echo "

$VDdisplayMESSAGE

"; echo ""; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo ""; @@ -225,10 +225,10 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ( ($last_action_sec < 30) and ($status != 'START') ) { ### You cannot log in or out within 30 secondi of your last login/logout - $VDdisplayMESSAGE = "Non è possibile accedere o entro 30 secondi del tuo ultimo accesso o il logout"; + $VDdisplayMESSAGE = "Non è possibile accedere o scollegarsi prima di 30 secondi dal tuo ultimo accesso o logout"; echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -243,7 +243,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
Login Utente:
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo ""; @@ -292,8 +292,8 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ( ($status=='LOGIN') and ($stage=='logout') ) { - $VDdisplayMESSAGE = "Lei ha appena effettuato laccesso-out"; - $LOGtimeMESSAGE = "Hai effettuato laccesso a$NOW_TIME
Importo di tempo sono state registrate in:$totTIME_HMS"; + $VDdisplayMESSAGE = "Ti sei appena scollegato dal sistema"; + $LOGtimeMESSAGE = "Ti sei scollegato alle $NOW_TIME
Durata della tua connessione: $totTIME_HMS"; ### Add a record to the timeclock log $stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';"; @@ -333,24 +333,24 @@ if ( ($stage == 'login') or ($stage == 'logout') ) } if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) ) - {echo "ERRORE: orologio registro entrata già fatto:$status|$stage"; exit;} + {echo "ERRORE: Registrazione entrata già effettuata: $status|$stage"; exit;} if ($referrer=='agent') - {$BACKlink = "Torna alla schermata di login di agente";} + {$BACKlink = "Torna alla schermata di Login";} if ($referrer=='admin') - {$BACKlink = "BACK per Amministrazione";} + {$BACKlink = "Torna ad Amministrazione";} if ($referrer=='welcome') {$BACKlink = "Torna alla schermata iniziale";} echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
Login Utente:
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo "\n"; @@ -368,21 +368,21 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) { - $VDdisplayMESSAGE = "Tempo dallultimo registrato in:$totTIME_HMS"; + $VDdisplayMESSAGE = "Tempo dal tuo ultimo login: $totTIME_HMS"; $log_action = 'login'; $button_name = 'LOGIN'; - $LOGtimeMESSAGE = "È lultima connesso a:$last_action_date

Clicca qui sotto per LOGIN log-in"; + $LOGtimeMESSAGE = "Ti sei scollegato l`ultima volta alle: $last_action_date

Clicca LOGIN qui sotto per collegarti"; } if ($status=='LOGIN') { - $VDdisplayMESSAGE = "Quantità di tempo è stato registrato in:$totTIME_HMS"; + $VDdisplayMESSAGE = "Durata connessione al sistema: $totTIME_HMS"; $log_action = 'logout'; $button_name = 'LOGOUT'; - $LOGtimeMESSAGE = "Hai effettuato laccesso al-in: $last_action_date
Quantità di tempo è stato registrato in:$totTIME_HMS

Clicca qui sotto per LOGOUT log-out"; + $LOGtimeMESSAGE = "Ti sei collegata l`ultima volta alle: $last_action_date
Durata connessione al sistema: $totTIME_HMS

Clicca LOGOUT qui sotto per scollegarti"; } echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -400,7 +400,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
$LOGtimeMESSAGE
 
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo "\n"; @@ -421,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) else { echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -436,7 +436,7 @@ else echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
$LOGtimeMESSAGE
 
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo ""; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vdc_db_query.php index 48c8310d..f87c8711 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -610,7 +612,7 @@ if ($ACTION == 'LogiNCamPaigns') $shift_ok=0; if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) ) { - $VDdisplayMESSAGE = "ERRORE: Non ci sono cambiamenti abilitati per il tuo gruppo di utenti\n"; + $VDdisplayMESSAGE = "ERRORE: Non ci sono turni abilitati per il tuo gruppo di utenti\n"; $VDloginDISPLAY=1; } else @@ -670,14 +672,14 @@ if ($ACTION == 'LogiNCamPaigns') if ($VDloginDISPLAY > 0) { $loginDATE = date("Ymd"); - $VDdisplayMESSAGE.= "

Sovrascrive MANAGER:
\n"; + $VDdisplayMESSAGE.= "

OVERRIDE MANAGER:
\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; - $VDdisplayMESSAGE.= "ManagerLogin:
\n"; - $VDdisplayMESSAGE.= "ManagerPassword:
\n"; + $VDdisplayMESSAGE.= "Manager Login:
\n"; + $VDdisplayMESSAGE.= "Manager Password:
\n"; $VDdisplayMESSAGE.= "



\n"; echo "$VDdisplayMESSAGE"; exit; @@ -706,7 +708,7 @@ if ($ACTION == 'LogiNCamPaigns') else { echo "\n"; } exit; @@ -725,7 +727,7 @@ if ($ACTION == 'regCLOSER') if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) { $channel_live=0; - echo "Scelta del Gruppo $closer_choice non e` valido\n"; + echo "Scelta del Gruppo $closer_choice non è valido\n"; exit; } else @@ -807,7 +809,7 @@ if ($ACTION == 'regCLOSER') } } - echo "Closer In Scelta del Gruppo $closer_choice e` stato registrato dall`utente $user\n"; + echo "Closer In Scelta del Gruppo $closer_choice è stato registrato dall`utente $user\n"; } @@ -825,7 +827,7 @@ if ($ACTION == 'regTERRITORY') if ( (strlen($agent_territories)<1) || (strlen($user)<1) ) { $channel_live=0; - echo "Territory Choice $agent_territories non e` valido\n"; + echo "Territory Choice $agent_territories non è valido\n"; exit; } else @@ -865,7 +867,7 @@ if ($ACTION == 'regTERRITORY') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00256',$user,$server_ip,$session_name,$one_mysql_log);} } - echo "Territory Choice $agent_territories e` stato registrato dall`utente $user\n"; + echo "Territory Choice $agent_territories è stato registrato dall`utente $user\n"; } @@ -999,7 +1001,7 @@ if ($ACTION == 'manDiaLnextCaLL') { $channel_live=0; echo "LISTA DI CHIAMATA VUOTA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non e` valido\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non è valido\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2055,7 +2079,7 @@ if ($ACTION == 'alt_phone_change') { $channel_live=0; echo "NUMERO ALTERNATIVO NUMERO STATO NOT CHANGED\n"; - echo "$phone_number $stage $lead_id or $called_count non e` valido\n"; + echo "$phone_number $stage $lead_id or $called_count non è valido\n"; exit; } else @@ -2080,7 +2104,7 @@ if ($ACTION == 'AlertControl') { $channel_live=0; echo "AGENT ALERT SETTING NOT CHANGED\n"; - echo "$stage non e` valido\n"; + echo "$stage non è valido\n"; exit; } else @@ -2111,7 +2135,7 @@ if ($ACTION == 'manDiaLskip') { $channel_live=0; echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non e` valido\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non è valido\n"; exit; } else @@ -2142,7 +2166,7 @@ if ($ACTION == 'manDiaLonly') { $channel_live=0; echo " CHIAMATA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non e` valido\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non è valido\n"; exit; } else @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2337,7 +2383,7 @@ if ($ACTION == 'manDiaLlookCaLL') if (strlen($MDnextCID)<18) { echo "NO\n"; - echo "MDnextCID $MDnextCID non e` valido\n"; + echo "MDnextCID $MDnextCID non è valido\n"; exit; } else @@ -2461,7 +2507,7 @@ if ($stage == "start") fclose($fp); echo "LOG NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign non e` valido\n"; + echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign non è valido\n"; exit; } else @@ -2574,7 +2620,7 @@ if ($stage == "end") if ( (strlen($uniqueid)<1) or (strlen($lead_id)<1) ) { echo "LOG NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id non e` valido\n"; + echo "uniqueid $uniqueid or lead_id: $lead_id non è valido\n"; exit; } else @@ -3564,8 +3610,8 @@ if ($ACTION == 'VDADREcheckINCOMING') { $channel_live=0; echo "0\n"; - echo "Campagna $campaign non e` valido\n"; - echo "lead_id $lead_id non e` valido\n"; + echo "Campagna $campaign non è valido\n"; + echo "lead_id $lead_id non è valido\n"; exit; } else @@ -3615,7 +3661,7 @@ if ($ACTION == 'VDADcheckINCOMING') { $channel_live=0; echo "0\n"; - echo "Campagna $campaign non e` valido\n"; + echo "Campagna $campaign non è valido\n"; exit; } else @@ -4466,7 +4512,7 @@ if ($ACTION == 'userLOGout') if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) { echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten non e` valido\n"; + echo "campaign $campaign or conf_exten $conf_exten non è valido\n"; exit; } else @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; @@ -4660,7 +4706,7 @@ if ($ACTION == 'updateDISPO') $MAN_vl_insert=0; if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) { - echo "Dispo Choice $dispo or lead_id $lead_id non e` valido\n"; + echo "Dispo Choice $dispo or lead_id $lead_id non è valido\n"; exit; } else @@ -5740,7 +5786,7 @@ if ($ACTION == 'updateDISPO') fclose($fp); } } - echo 'Lead ' . $lead_id . ' e` cambiato ' . $dispo_choice . " Stato\nNext agent_log_id:\n" . $agent_log_id . "\n"; + echo 'Lead ' . $lead_id . ' è cambiato ' . $dispo_choice . " Stato\nNext agent_log_id:\n" . $agent_log_id . "\n"; } ################################################################################ @@ -5755,7 +5801,7 @@ if ($ACTION == 'updateLEAD') $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { - echo "phone_number $phone_number or lead_id $lead_id non e` valido\n"; + echo "phone_number $phone_number or lead_id $lead_id non è valido\n"; exit; } else @@ -5856,7 +5902,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $row=''; $rowx=''; if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) { - echo "stage $stage non e` valido\n"; + echo "stage $stage non è valido\n"; exit; } else @@ -6037,7 +6083,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $VLAaffected_rows_update = mysql_affected_rows($link); } } - echo 'Agent ' . $user . ' e` ora nello stato ' . $stage . "\nNext agent_log_id:\n$agent_log_id\n"; + echo 'Agent ' . $user . ' è ora nello stato ' . $stage . "\nNext agent_log_id:\n$agent_log_id\n"; } @@ -6050,7 +6096,7 @@ if ($ACTION == 'UpdatEFavoritEs') $channel_live=1; if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) { - echo "favorites list $favorites_list non e` valido\n"; + echo "favorites list $favorites_list non è valido\n"; exit; } else @@ -6088,7 +6134,7 @@ if ($ACTION == 'PauseCodeSubmit') $row=''; $rowx=''; if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) { - echo "agent_log_id $agent_log_id or pause_code $status non e` valido\n"; + echo "agent_log_id $agent_log_id or pause_code $status non è valido\n"; exit; } else @@ -6280,7 +6326,7 @@ if ($ACTION == 'CALLSINQUEUEview') if (eregi('NONE',$view_calls_in_queue)) { - echo "Chiamate in coda Visualizza disabili per questa campagna\n"; + echo "Visualizzazione Chiamate in coda disabilitato per questa campagna\n"; exit; } else @@ -6472,7 +6518,7 @@ if ($ACTION == 'CALLSINQUEUEgrab') if ( (eregi('NONE',$view_calls_in_queue)) or (eregi('N',$grab_calls_in_queue)) ) { - echo "ERROR: Chiamate in coda Visualizza disabili per questa campagna\n"; + echo "ERROR: Visualizzazione Chiamate in coda disabilitato per questa campagna\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vicidial.php index 5cdc48fa..a6afe509 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -507,7 +508,7 @@ if ($campaign_login_list > 0) $SQL_log = "$stmt|"; $SQL_log = ereg_replace(';','',$SQL_log); $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$MGR_login', ip_address='$ip', event_section='AGENT', event_type='OVERRIDE', record_id='$VD_login', event_code='Sovrascrive MANAGER OF AGENT SHIFT ENFORCEMENT', event_sql=\"$SQL_log\", event_notes='user: $VD_login';"; + $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$MGR_login', ip_address='$ip', event_section='AGENT', event_type='OVERRIDE', record_id='$VD_login', event_code='OVERRIDE MANAGER OF AGENT SHIFT ENFORCEMENT', event_sql=\"$SQL_log\", event_notes='user: $VD_login';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01060',$VD_login,$server_ip,$session_name,$one_mysql_log);} @@ -660,7 +661,7 @@ if ($relogin == 'YES') echo "Agent web client: Re-Login\n"; echo "\n"; echo "\n"; -echo "Orologio
\n"; +echo " Orologio
\n"; echo "
Orologio Orologio
 
Login Utente:
\n"; echo "\n"; echo "\n";echo "\n";echo "
English Italiano
\n"; @@ -700,7 +701,7 @@ if ($user_login_first == 1) echo "Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -746,7 +747,7 @@ echo "
Agent web client: Login\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -787,7 +788,7 @@ if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) echo "Agent web client: Login Telefono\n"; echo "\n"; echo "\n"; -echo "Orologio
\n"; +echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n";echo "
English Italiano
\n"; @@ -920,7 +921,7 @@ $VDloginDISPLAY=0; if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) ) { $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "È necessario accedere al orologio LA PRIMA
"; + $VDdisplayMESSAGE = "è necessario accedere prima all`orologio
"; } } ### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR @@ -932,7 +933,7 @@ $VDloginDISPLAY=0; if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) ) { $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "ERRORE: Non ci sono cambiamenti abilitati per il tuo gruppo di utenti
"; + $VDdisplayMESSAGE = "ERRORE: Non ci sono turni abilitati per il tuo gruppo di utenti
"; } else { @@ -990,7 +991,7 @@ $VDloginDISPLAY=0; } if ( ($shift_ok < 1) and ($VU_shift_override_flag < 1) and ($VDloginDISPLAY > 0) ) { - $VDdisplayMESSAGE.= "

Sovrascrive MANAGER:
\n"; + $VDdisplayMESSAGE.= "

OVERRIDE MANAGER:
\n"; $VDdisplayMESSAGE.= "
\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; @@ -999,8 +1000,8 @@ $VDloginDISPLAY=0; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; - $VDdisplayMESSAGE.= "ManagerLogin:
\n"; - $VDdisplayMESSAGE.= "ManagerPassword:
\n"; + $VDdisplayMESSAGE.= "Manager Login:
\n"; + $VDdisplayMESSAGE.= "Manager Password:
\n"; $VDdisplayMESSAGE.= "
\n"; } } @@ -1028,7 +1029,7 @@ $VDloginDISPLAY=0; echo "Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -1469,7 +1470,7 @@ echo "
Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -1562,7 +1563,7 @@ if (!$authphone) echo "Agent web client: Login Telefono Error\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -1577,7 +1578,7 @@ echo "
Login Error
 
Spiacente, il telefono inserito non e` attivo in questo sistema, riprova di nuovo:
 
 
Spiacente, il telefono inserito non è attivo in questo sistema, riprova di nuovo:
 
Login Telefono:
Password Telefono:
\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -2085,7 +2086,7 @@ echo "
Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUtente; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -3734,11 +3735,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // filename = filedate + "_" + user_abb; var query_recording_exten = recording_exten; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Ferma"; + var conf_rec_start_html = "\"Ferma"; if (LIVE_campaign_recording == 'ALLFORCE') { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else { @@ -3750,10 +3751,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} filename = taskconffile; var query_recording_exten = session_id; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Start"; + var conf_rec_start_html = "\"Inizia"; if (LIVE_campaign_recording == 'ALLFORCE') { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else { @@ -3804,7 +3805,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } // ################################################################################ -// Send Redirect command for live call to Managersends phone name where call is going to +// Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, ATTESA, FROMATTESA, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote,taskdispowindow) { @@ -3882,7 +3883,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { xferredirect_query=''; taskvar = 'NOTHING'; - alert("Il numero per il trasferimento deve avere piu` di 1 digit:" + blindxferdialstring); + alert("Il numero per il trasferimento deve avere più di 1 cifra:" + blindxferdialstring); } else { @@ -4171,10 +4172,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // alert("VICIDIAL Call log entered:\n" + document.vicidial_form.uniqueid.value); if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) ) { - var conf_rec_start_html = "\"Start"; + var conf_rec_start_html = "\"Inizia"; if ( (LIVE_campaign_recording == 'NEVER') || (LIVE_campaign_recording == 'ALLFORCE') ) { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else {document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;} @@ -4287,7 +4288,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CBcounT = xmlhttp.responseText; if (CBcounT == 0) {var CBprint = "NO";} else {var CBprint = CBcounT;} - document.getElementById("CBstatusSpan").innerHTML ="" + CBprint + " CHIAMATABACK ATTIVE"; + document.getElementById("CBstatusSpan").innerHTML ="" + CBprint + " RICHIAMI ATTIVI"; } } @@ -4413,7 +4414,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI ESSERE IN PAUSA PER EFFETTUARE UNA CHIAMATA MANUALE QUANDO SEI IN MODALITA` AUTODIAL"); + alert("DEVI ESSERE IN PAUSA PER EFFETTUARE UNA CHIAMATA MANUALE QUANDO SEI IN MODALITà AUTODIAL"); } else { @@ -4582,7 +4583,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (alt_dial_status_display=='0') { // alert(document.getElementById("MainStatuSSpan").innerHTML); - document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + "   In attesa del Ring... " + MD_ring_secondS + " secondi"; + document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + "   In attesa dello squillo... " + MD_ring_secondS + " secondi"; // alert("channel not found yet:\n" + campaign); } } @@ -4615,7 +4616,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} XD_live_call_secondS = 0; MD_channel_look=0; - document.getElementById("MainStatuSSpan").innerHTML = " Chiamata la terza parte: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; + document.getElementById("MainStatuSSpan").innerHTML = " Terzo Numero Chiamato: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; @@ -4684,7 +4685,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (quick_transfer_button == 'IN_GROUP') { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } if (prepopulate_transfer_preset_enabled > 0) { @@ -4701,7 +4702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; if (quick_transfer_button == 'PRESET_1') {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Riprendi\"
\"Chiama"; } @@ -5143,13 +5149,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { reselect_preview_dial = 1; var man_preview = 'YES'; - var man_status = "Anteprima del contatto, quindi CHIAMA LEAD or SKIP LEAD"; + var man_status = "Anteprima del contatto, quindi CHIAMA CLIENTE or SALTA CLIENTE"; } else { reselect_preview_dial = 0; var man_preview = 'NO'; - var man_status = "In attesa del Ring..."; + var man_status = "In attesa dello squillo..."; } var xmlhttp=false; @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5215,7 +5221,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (MDnextCID.match(regMDFvarDNC)) {alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR); alert_displayed=1;} if (MDnextCID.match(regMDFvarCAMP)) - {alert("Questo numero di telefono non si trova nella campagna di elenchi:\n" + mdnPhonENumbeR); alert_displayed=1;} + {alert("Questo numero di telefono non è presente nell`elenco delle campagne:\n" + mdnPhonENumbeR); alert_displayed=1;} if (alert_displayed==0) {alert("Errore non specificato:\n" + mdnPhonENumbeR + "|" + MDnextCID); alert_displayed=1;} @@ -5732,7 +5738,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDSnextCID = MDSnextResponse_array[0]; if (MDSnextCID == "LEAD NOT REVERTED") { - alert("Il contatto non e` ritornato, c`e` un errore:\n" + MDSnextResponse); + alert("Il contatto non è ritornato, c`è un errore:\n" + MDSnextResponse); } else { @@ -5836,24 +5842,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } if (dialed_label == 'ALT') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: ALT ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: ALT ";} if (dialed_label == 'ADDR3') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: INDIRIZZO3 ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: INDIRIZZO3 ";} var REGalt_dial = new RegExp("X","g"); if (dialed_label.match(REGalt_dial)) { - document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: " + dialed_label + ""; + document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: " + dialed_label + ""; document.getElementById("EAcommentsBoxA").innerHTML = "Codice e Numero di telefono: " + EAphone_code + " " + EAphone_number; var EAactive_link = ''; if (EAalt_phone_active == 'Y') - {EAactive_link = "Cambia il numero di telefono a INACTIVE";} + {EAactive_link = "Cambia il numero di telefono a INATTIVO";} else - {EAactive_link = "Cambia il numero di telefono per ATTIVO";} + {EAactive_link = "Cambia il numero di telefono ad ATTIVO";} - document.getElementById("EAcommentsBoxB").innerHTML = "Attivo:" + EAalt_phone_active + "
" + EAactive_link; - document.getElementById("EAcommentsBoxC").innerHTML = "Alt Conte:" + EAalt_phone_count; - document.getElementById("EAcommentsBoxD").innerHTML = "Note:
" + EAalt_phone_notes; + document.getElementById("EAcommentsBoxB").innerHTML = "Attivo: " + EAalt_phone_active + "
" + EAactive_link; + document.getElementById("EAcommentsBoxC").innerHTML = "Conteggio Num Alt: " + EAalt_phone_count; + document.getElementById("EAcommentsBoxD").innerHTML = "Note:
" + EAalt_phone_notes; showDiv('EAcommentsBox'); } @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -5907,7 +5913,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDnextCID = MDOnextResponse_array[0]; if (MDnextCID == " CHIAMATA NOT PLACED") { - alert("chiamata non effettuata, c`e` un errore:\n" + MDOnextResponse); + alert("chiamata non effettuata, c`è un errore:\n" + MDOnextResponse); } else { @@ -5920,7 +5926,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (alt_dial_status_display=='0') { - document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + MDnextCID + "   In attesa del Ring..."; + document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + MDnextCID + "   In attesa dello squillo..."; document.getElementById("HangupControl").innerHTML = "\"Riaggancia"; } @@ -6253,11 +6259,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var EAactive_link = ''; if (APCactive == 'Y') - {EAactive_link = "Cambia il numero di telefono a INACTIVE";} + {EAactive_link = "Cambia il numero di telefono a INATTIVO";} else - {EAactive_link = "Cambia il numero di telefono per ATTIVO";} + {EAactive_link = "Cambia il numero di telefono ad ATTIVO";} - document.getElementById("EAcommentsBoxB").innerHTML = "Attivo:" + EAalt_phone_active + "
" + EAactive_link; + document.getElementById("EAcommentsBoxB").innerHTML = "Attivo: " + EAalt_phone_active + "
" + EAactive_link; var xmlhttp=false; /*@cc_on @*/ @@ -6517,24 +6523,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('CBcommentsBox'); } if (dialed_label == 'ALT') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: ALT ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: ALT ";} if (dialed_label == 'ADDR3') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: INDIRIZZO3 ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: INDIRIZZO3 ";} var REGalt_dial = new RegExp("X","g"); if (dialed_label.match(REGalt_dial)) { - document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: " + dialed_label + ""; + document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: " + dialed_label + ""; document.getElementById("EAcommentsBoxA").innerHTML = "Codice e Numero di telefono: " + EAphone_code + " " + EAphone_number; var EAactive_link = ''; if (EAalt_phone_active == 'Y') - {EAactive_link = "Cambia il numero di telefono a INACTIVE";} + {EAactive_link = "Cambia il numero di telefono a INATTIVO";} else - {EAactive_link = "Cambia il numero di telefono per ATTIVO";} + {EAactive_link = "Cambia il numero di telefono ad ATTIVO";} - document.getElementById("EAcommentsBoxB").innerHTML = "Attivo:" + EAalt_phone_active + "
" + EAactive_link; - document.getElementById("EAcommentsBoxC").innerHTML = "Alt Conte:" + EAalt_phone_count; - document.getElementById("EAcommentsBoxD").innerHTML = "Note:" + EAalt_phone_notes; + document.getElementById("EAcommentsBoxB").innerHTML = "Attivo: " + EAalt_phone_active + "
" + EAactive_link; + document.getElementById("EAcommentsBoxC").innerHTML = "Conteggio Num Alt: " + EAalt_phone_count; + document.getElementById("EAcommentsBoxD").innerHTML = "Note: " + EAalt_phone_notes; showDiv('EAcommentsBox'); } @@ -6567,7 +6573,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (quick_transfer_button == 'IN_GROUP') { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } if (prepopulate_transfer_preset_enabled > 0) { @@ -6584,7 +6590,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; if (quick_transfer_button == 'PRESET_1') {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} @@ -7458,7 +7464,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("VolumeDownSpan").innerHTML = ""; if (quick_transfer_button_enabled > 0) - {document.getElementById("QuickXfer").innerHTML = "\"QUICK";} + {document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO";} if (call_requeue_button > 0) { @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -7806,7 +7812,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI ESSERE IN PAUSA PER INSERIRE UN CODICE PAUSA IN MODALITA` AUTODIAL"); + alert("DEVI ESSERE IN PAUSA PER INSERIRE UN CODICE PAUSA IN MODALITà AUTODIAL"); } else { @@ -8021,13 +8027,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} manual_dial_finished(); } document.getElementById("GENDERhideFORieALT").innerHTML = ''; - document.getElementById("GENDERhideFORie").innerHTML = ''; + document.getElementById("GENDERhideFORie").innerHTML = ''; hideDiv('DispoSelectBox'); hideDiv('DispoButtonHideA'); hideDiv('DispoButtonHideB'); hideDiv('DispoButtonHideC'); document.getElementById("DispoSelectBox").style.top = 1; - document.getElementById("DispoSelectMaxMin").innerHTML = " minimizza "; + document.getElementById("DispoSelectMaxMin").innerHTML = " riduci "; document.getElementById("DispoSelectHAspan").innerHTML = "Aggancia di nuovo"; CBcommentsBoxhide(); @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -8324,7 +8329,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { VU_agent_choose_ingroups_DV = "MGRLOCK"; - var live_CSC_HTML = "Managerhas selected groups for you
"; + var live_CSC_HTML = "Manager has selected groups for you
"; document.vicidial_form.CloserSelectList.value = ''; document.getElementById("CloserSelectContent").innerHTML = live_CSC_HTML; } @@ -8477,7 +8482,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { agent_select_territories = "MGRLOCK"; - var live_TERR_HTML = "Managerhas selected territories for you
"; + var live_TERR_HTML = "Manager has selected territories for you
"; document.vicidial_form.TerritorySelectList.value = ''; document.getElementById("TerritorySelectContent").innerHTML = live_TERR_HTML; } @@ -8626,12 +8631,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function LogouT(tempreason) { if (MD_channel_look==1) - {alert("Non puoi disconnetterti durante un tentativo di chiamata. \nAttende 50 secondi prima di fallire se non c`e` risposta");} + {alert("Non puoi disconnetterti durante un tentativo di chiamata. \nAttende 50 secondi prima di fallire se non c`è risposta");} else { if (VD_live_customer_call==1) { - alert("LA CHIAMATA IN CORSO E' ANCORA ATTIVA! Riaggancia e quindi puoi disconnetterti.\n" + VD_live_customer_call); + alert("LA CHIAMATA IN CORSO E` ANCORA ATTIVA! Riaggancia e quindi puoi disconnetterti.\n" + VD_live_customer_call); } else { @@ -8674,7 +8679,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('LogouTBox'); var logout_content=''; if (tempreason=='SHIFT') - {logout_content='Il tuo Shift è finita o è cambiato, è stato disconnesso dal tuo sessione

';} + {logout_content='Il tuo turno è finito o è cambiato, sei stato disconnesso dalla tua sessione

';} document.getElementById("LogouTBoxLink").innerHTML = logout_content + "FAI CLICK QUI PER AUTENTICARTI DI NUOVO\n"; @@ -9257,7 +9262,7 @@ function phone_number_format(formatphone) { { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI ESSERE IN PAUSA PER CHIAMATE GRAB IN CODA"); + alert("DEVI ESSERE IN PAUSA PER RECUPERARE LE CHIAMATE IN CODA"); } else { @@ -9479,7 +9484,7 @@ function phone_number_format(formatphone) { function DispoMaximize() { document.getElementById("DispoSelectBox").style.top = 1; - document.getElementById("DispoSelectMaxMin").innerHTML = " minimizza "; + document.getElementById("DispoSelectMaxMin").innerHTML = " riduci "; hideDiv('DispoButtonHideA'); hideDiv('DispoButtonHideB'); hideDiv('DispoButtonHideC'); @@ -9498,7 +9503,7 @@ function phone_number_format(formatphone) { { if (manager_ingroups_set > 0) { - alert("Manager" + external_igb_set_name + " ha selezionato il vostro in-selezioni per il gruppo"); + alert("Manager " + external_igb_set_name + " ha selezionato le tue scelte per i gruppi inbound"); } else { @@ -9674,7 +9679,7 @@ else { if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') ) { - document.getElementById("TimerContentSpan").innerHTML = "TIMER NOTIFICA: " + timer_action_seconds + " secondi

" + timer_action_message + "
"; + document.getElementById("TimerContentSpan").innerHTML = "NOTIFICA TIMER: " + timer_action_seconds + " secondi

" + timer_action_message + "
"; showDiv('TimerSpan'); } @@ -9801,7 +9806,7 @@ else document.getElementById("sessionIDspan").innerHTML = session_id; if ( (LIVE_campaign_recording == 'NEVER') || (LIVE_campaign_recording == 'ALLFORCE') ) { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } if (INgroupCOUNT > 0) { @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Utentes&action=Authenticate&return_module=Utentes&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); @@ -9882,7 +9887,7 @@ else } CustomerData_update(); document.getElementById("GENDERhideFORie").innerHTML = ''; - document.getElementById("GENDERhideFORieALT").innerHTML = ''; + document.getElementById("GENDERhideFORieALT").innerHTML = ''; showDiv('DispoSelectBox'); DispoSelectContent_create('','ReSET'); WaitingForNextStep=1; @@ -10295,7 +10300,7 @@ else document.getElementById(divvar).innerHTML = ''; if (divvar == 'DiaLLeaDPrevieW') { - var buildDivHTML = " LEAD PREVIEW
"; + var buildDivHTML = " ANTEPRIMA CLIENTE
"; document.getElementById("DiaLLeaDPrevieWHide").innerHTML = buildDivHTML; } if (divvar == 'DiaLDiaLAltPhonE') @@ -10315,7 +10320,7 @@ else if (divvar == 'DiaLLeaDPrevieW') { document.getElementById("DiaLLeaDPrevieWHide").innerHTML = ''; - var buildDivHTML = " LEAD PREVIEW
"; + var buildDivHTML = " ANTEPRIMA CLIENTE
"; document.getElementById(divvar).innerHTML = buildDivHTML; if (reselect_preview_dial==1) {document.vicidial_form.LeadPreview.checked=true} @@ -10382,7 +10387,7 @@ else showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Trasferimento"; if (quick_transfer_button_enabled > 0) - {document.getElementById("QuickXfer").innerHTML = "\"QUICK";} + {document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO";} } else { @@ -10394,11 +10399,11 @@ else if (quick_transfer_button == 'IN_GROUP') { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } } } @@ -10494,7 +10499,7 @@ else var genderValue = document.getElementById('gender_list').options[genderIndex].value; if (genderValue == 'M') {var gIndex = 1;} if (genderValue == 'F') {var gIndex = 2;} - document.getElementById("GENDERhideFORieALT").innerHTML = ''; + document.getElementById("GENDERhideFORieALT").innerHTML = ''; document.getElementById("GENDERhideFORie").innerHTML = ''; document.getElementById("gender_list").selectedIndex = gIndex; } @@ -10506,7 +10511,7 @@ else var genderValue = document.getElementById('gender_list').options[genderIndex].value; if (genderValue == 'M') {var gIndex = 1;} if (genderValue == 'F') {var gIndex = 2;} - document.getElementById("GENDERhideFORie").innerHTML = ''; + document.getElementById("GENDERhideFORie").innerHTML = ''; document.getElementById("GENDERhideFORieALT").innerHTML = ''; document.getElementById("gender_list").selectedIndex = gIndex; } @@ -10585,7 +10590,7 @@ echo "\n"; -X CHIAMATABACK ATTIVE
+X RICHIAMI ATTIVI
@@ -10610,7 +10615,7 @@ echo "\n"; - height=460>
RICHIAMI PER L`OPERATORE :
Selezionare una callback per chiamare il cliente ora. Una volta fatto click, il record sara` rimosso dalla lista. + height=460> - + -
RICHIAMI PER L`OPERATORE :
Selezionare un richiamo per chiamare il cliente ora. Una volta fatto click, il record sarà rimosso dalla lista.

  @@ -10626,7 +10631,7 @@ echo "\n"; \n"; + echo "Nota: prefisso di chiamata $dial_prefix sarà aggiunto all`inizio di questo numero
\n"; } ?> Nota: tutti i nuovi contatti chiamati manualmente andranno nella lista

@@ -10640,7 +10645,7 @@ echo "\n";
Cerca Contatti esistenti:   (Questa opzione tentera` di trovare il numero di telefono nel sistema prima di inserire un nuovo contatto)  (Questa opzione tenterà di trovare il numero di telefono nel sistema prima di inserire un nuovo contatto)
@@ -10650,13 +10655,13 @@ echo "\n";

If you want to dial a number and have it NOT be added as a new lead, enter in the exact dialstring that you want to call in the Chiamata automatica field below. To hangup this call you will have to open the CHIAMATAS IN THIS SESSION link at the bottom of the screen and hang it up by clicking su its channel link there.
 
Chiamata automatica:   (solo digit per favore) +   (solo cifre per favore)

Chiama Ora                 - Anteprima invito + Anteprima Chiamata                 Torna Indietro
@@ -10770,10 +10775,10 @@ if ($view_calls_in_queue > 0)
  -Altri agenti Stato:  
 
+Stato Altri Operatori:  
 
-Agenti di trasferimento disponibili:
+Trasferimento Operatori Disponibili:
Agents View +
@@ -10800,7 +10805,7 @@ if ($agent_display_dialable_leads > 0) height=70> + Se attivo, premi il tasto corrispondente all`esito desiderato e la chiamata sarà riagganciata automaticamente: @@ -10833,8 +10838,8 @@ if ($agent_display_dialable_leads > 0)
Tasti Funzione per Esiti: - Se attivo, premi il tasto corrispondente all`esito desiderato e la chiamata sara` riagganciata automaticamente:
height=70> - - + +
Estensione Alt Telefono informazioni: minimizza Informazioni Estese Numero Alternativo: riduci

@@ -10855,7 +10860,7 @@ if ($agent_display_dialable_leads > 0) - height=500>
Non c'è nessuno nella tua sessione:
+ height=500>
Non c`è nessuno nella tua sessione:
Torna Indietro

Chiama l`operatore di nuovo @@ -10871,7 +10876,7 @@ if ($agent_display_dialable_leads > 0) - height=550>
Call Wrapup: secondi di riposo restanti

+ height=550>
Riposo prima della prossima chiamata: secondi di riposo restanti



Termina riposo e continua @@ -10881,17 +10886,17 @@ if ($agent_display_dialable_leads > 0)



- Chiudi Message + Chiudi Messaggio
- height=500>
La tua sessione e` stata disabilitata
LOGOUT

Torna Indietro + height=500>
La tua sessione è stata disabilitata
LOGOUT

Torna Indietro
- height=500>
Cè un problema di sincronizzazione con il tempo il vostro sistema, si prega di informare lamministratore di sistema


Torna Indietro + height=500>
C`è un problema di sincronizzazione con il sistema, si prega di informare l`amministratore di sistema


Torna Indietro
@@ -10912,7 +10917,7 @@ if ($agent_display_dialable_leads > 0) - height=460>
ESITO CHIAMATA :       Aggancia di nuovo       minimizza
+ height=460> - + @@ -11180,7 +11185,7 @@ if ($call_requeue_button > 0) - +
ESITO CHIAMATA :       Aggancia di nuovo       riduci
Selezione Esito di fine chiamata
PAUSA OPERATORE
@@ -10934,7 +10939,7 @@ if ($agent_display_dialable_leads > 0) height=460>
SCEGLI UN GRUPPO ALIAS :
- Gruppo Alias selezione + Selezione Gruppo Alias

 
@@ -10986,7 +10991,7 @@ if ($agent_display_dialable_leads > 0)  
CHIAMATABACK PERSONALE (nessun altro potra` richiamarlo)
";} + {echo " RICHIAMO PERSONALE
";} ?> Note Richiamo:

@@ -11030,7 +11035,7 @@ if ($agent_display_dialable_leads > 0) Canale CHIAMATABACK PERSONALE (nessun altro potra` richiamarlo)
";} + {echo " RICHIAMO PERSONALE
";} if ( ($outbound_autodial_active < 1) or ($disable_blended_checkbox > 0) or ($dial_method == 'INBOUND_MAN') ) {echo " CHIAMATA MISTA
";} ?> @@ -11084,13 +11089,13 @@ else
Chiama il prossimo numero
- LEAD PREVIEW
+ ANTEPRIMA CLIENTE
CHIAMA ALT NUM
-Start Registrazione
+Inizia Registrazione

Web Form
0)
Indirizzo3:
Citta`: Città: Stato: Vendor ID: Sesso:
Telefono: diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/voicemail_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/voicemail_check.php index e30cc236..471220a6 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/voicemail_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_it/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -108,7 +108,7 @@ echo " if (strlen($vmail_box)<1) { $channel_live=0; - echo "Casella Voicemail $vmail_box non e` valido\n"; + echo "Casella Voicemail $vmail_box non è valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/astguiclient.php index eb360da4..7fe83c08 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "astGUIclient web client: Inloggen\n"; + echo "astGUIclient web client: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vdc_db_query.php index 8af3097d..87e8ca5a 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vicidial.php index fdecc617..d5665725 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_nl/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Inloggen\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo " Tijdklok
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeGebruiker; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Doorgaan\"
\"Bel"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Gebruikers&action=Authenticate&return_module=Gebruikers&return_action=Inloggen&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vdc_db_query.php index 148a3715..db43e55b 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vicidial.php index ca2f9ef7..19c35aa9 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pl/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUżytkownik; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Ponów\"
\"Wybierz"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Użytkowniks&action=Authenticate&return_module=Użytkowniks&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/active_list_refresh.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/active_list_refresh.php index 59b162f7..9f32075b 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/astguiclient.php index c3a1a4e0..3cb5f3fa 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web client astGUIclient: Início de uma sessão\n"; + echo "web client astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/call_log_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/call_log_display.php index 4160a7d4..80123be8 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/call_log_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/conf_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/conf_exten_check.php index ac6f93f0..56f1da42 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/inbound_popup.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/inbound_popup.php index fcd7fd48..54fb3445 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/inbound_popup.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/live_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/live_exten_check.php index 8af6fd7b..b6024856 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/live_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/manager_send.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/manager_send.php index 5c82b78f..c66c5512 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/manager_send.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/park_calls_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/park_calls_display.php index 42e595af..2e9d97f7 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/park_calls_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vdc_db_query.php index 6d20c575..9eb3ad47 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vicidial.php index 16d7e9e6..6339d8e2 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Início de uma sessão\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUsuário; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Resumo\"
\"Número"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Usuários&action=Authenticate&return_module=Usuários&return_action=Início de uma sessão&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/voicemail_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/voicemail_check.php index 3c9455f2..d517e396 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/voicemail_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_pt/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/active_list_refresh.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/active_list_refresh.php index 482e4c83..3279f941 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/astguiclient.php index 12927b44..155c8d83 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web-клиент astGUIclient: Логин\n"; + echo "web-клиент astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/call_log_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/call_log_display.php index ff70ef0f..9bb169dd 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/call_log_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/conf_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/conf_exten_check.php index 2029f8a5..523cfec1 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/inbound_popup.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/inbound_popup.php index 8846450b..cb539374 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/inbound_popup.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/live_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/live_exten_check.php index c855647b..f66f2252 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/live_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/manager_send.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/manager_send.php index 843a5654..2f5829e0 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/manager_send.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/park_calls_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/park_calls_display.php index 056fd3a8..33e44d5f 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/park_calls_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vdc_db_query.php index 84c137d2..9d5d3e3a 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vicidial.php index 4f74ef96..157673aa 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -657,7 +658,7 @@ else if ($relogin == 'YES') { -echo "Agent web client: Re-Логин\n"; +echo "Agent web client: Re-Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -670,7 +671,7 @@ echo "\n"; echo "\n"; echo "


"; echo ""; -echo ""; +echo ""; echo "\n"; echo "\n"; echo ""; @@ -743,7 +744,7 @@ echo "
Re-Логин Re-Login
 
Логин Телефона: Agent web client: Логин\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeПользователь; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Резюме\"
\"Набрать"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Пользовательs&action=Authenticate&return_module=Пользовательs&return_action=Логин&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/voicemail_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/voicemail_check.php index 8d28dba3..08966144 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/voicemail_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_ru/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/astguiclient.php index a97c57ea..14efa80b 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web klient astGUIclient: Prihlásiť\n"; + echo "web klient astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vdc_db_query.php index f628d84b..122b6411 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vicidial.php index d59cfccb..9868cff1 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_sk/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Prihlásiť\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUžívateľ; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Pokračovať\"
\"Volať"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Užívateľs&action=Authenticate&return_module=Užívateľs&return_action=Prihlásiť&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/active_list_refresh.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/active_list_refresh.php index 49075a18..59a82090 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/astguiclient.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/astguiclient.php index e88babc5..8eb6e941 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/astguiclient.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "astGUIclient web client: 登入\n"; + echo "astGUIclient web client: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/call_log_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/call_log_display.php index 0a094c6e..209df112 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/call_log_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/conf_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/conf_exten_check.php index fa32043a..77772f60 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/inbound_popup.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/inbound_popup.php index 9f4f3425..007e2990 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/inbound_popup.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/live_exten_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/live_exten_check.php index 9a3066cb..55b9134a 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/live_exten_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/manager_send.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/manager_send.php index 6672ea14..c332817c 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/manager_send.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/park_calls_display.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/park_calls_display.php index d3bee36d..804e8b8e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/park_calls_display.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vdc_db_query.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vdc_db_query.php index 1e3c904f..0f7dde3c 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vicidial.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vicidial.php index dd858e9c..cc576a53 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vicidial.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "\\n\";"; - } - $e++; - } - } - else - { - if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/) - { - $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/ILPA/g; + $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/ILPV/g; $e=0; $gif = '.gif'; foreach(@lang_link_list) @@ -357,67 +343,89 @@ foreach(@lang_list) $lang_list_name = $lang_list_detail[1]; if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';} else {$list_bgcolor = '';} - $file[$LINESct] .= "echo \"\\n\";"; + if ($file_name =~ /admin/) {$link_file_name = 'admin.php';} + else {$link_file_name = $file_name;} + $file[$LINESct] .= "echo \"\\n\";"; } $e++; } } else { - if ( ($lang_abb =~ /^en/) && ($Tct > 2) ) + if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/) { - $file[$LINESct] =~ s/\.\/images\//\.\.\/agc\/images\//g; - $file[$LINESct] =~ s/\"help.gif/\"..\/astguiclient\/help.gif/g; - $phrase_found_counter++; + $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/ILPA/g; + $e=0; + $gif = '.gif'; + foreach(@lang_link_list) + { + if (length($lang_link_list[$e]) > 2) + { + @lang_list_detail = split(/-/, $lang_link_list[$e]); + $lang_list_abb = $lang_list_detail[0]; + $lang_list_name = $lang_list_detail[1]; + if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';} + else {$list_bgcolor = '';} + $file[$LINESct] .= "echo \"\\n\";"; + } + $e++; + } } - if ($lang_abb !~ /^en/) + else { - $file[$LINESct] =~ s/$ORIGtext/$TRANStext/g; - $phrase_found_counter++; + if ( ($lang_abb =~ /^en/) && ($Tct > 2) ) + { + $file[$LINESct] =~ s/\.\/images\//\.\.\/agc\/images\//g; + $file[$LINESct] =~ s/\"help.gif/\"..\/astguiclient\/help.gif/g; + $phrase_found_counter++; + } + if ($lang_abb !~ /^en/) + { + $file[$LINESct] =~ s/$ORIGtext/$TRANStext/g; + $phrase_found_counter++; + } } } } + + if ($phrase_found_counter < 1) + { + open(ERRout, ">>$LANG_FILE_ERROR") + || die "Can't open $LANG_FILE_ERROR: $!\n"; + print ERRout "|$ORIGtext|\n"; + close(ERRout); + } + + $LINESct++; + + if ($a =~ /00000$/i) {print "$a $file[$LINESct]\n|$ORIGtext|$TRANStext|";} + $a++; } - - if ($phrase_found_counter < 1) - { - open(ERRout, ">>$LANG_FILE_ERROR") - || die "Can't open $LANG_FILE_ERROR: $!\n"; - print ERRout "|$ORIGtext|\n"; - close(ERRout); - } - - $LINESct++; - - if ($a =~ /00000$/i) {print "$a $file[$LINESct]\n|$ORIGtext|$TRANStext|";} - $a++; + $Tct++; } - $Tct++; } + ### open the translation result file for writing ### + open(out, ">$webroot/$file_path$US$lang_abb/$file_name") + || die "Can't open $webroot/$file_path$US$lang_abb/$file_name: $!\n"; + # print out "Header(\"Content-type: text/html; charset=utf-8\");\n"; + $LINESct=0; + foreach(@file) + { + print out "$file[$LINESct]"; + $LINESct++; + } + close(out); + print "\n"; + print "File Written: $webroot/$file_path$US$lang_abb/$file_name\n"; } - ### open the translation result file for writing ### - open(out, ">$webroot/$file_path$US$lang_abb/$file_name") - || die "Can't open $webroot/$file_path$US$lang_abb/$file_name: $!\n"; - # print out "Header(\"Content-type: text/html; charset=utf-8\");\n"; - $LINESct=0; - foreach(@file) + else { - print out "$file[$LINESct]"; - $LINESct++; + print "File does not exist: $webroot/$file_path/$file_name\n"; } - close(out); - print "\n"; - print "File Written: $webroot/$file_path$US$lang_abb/$file_name\n"; + $Fct++; } - else - { - print "File does not exist: $webroot/$file_path/$file_name\n"; - } - $Fct++; } } + $i++; } - $i++; } - -} \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.2.0/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/branches/agc_2.2.0/extras/MySQL_AST_CREATE_tables.sql index fccda7ef..db3a6b26 100644 --- a/agc_2-X/branches/agc_2.2.0/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/branches/agc_2.2.0/extras/MySQL_AST_CREATE_tables.sql @@ -1913,7 +1913,7 @@ INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,queue INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N'; INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N'; -INSERT INTO system_settings (version,install_date) values('2.2.0rc3', CURDATE()); +INSERT INTO system_settings (version,install_date) values('2.2.0rc4', CURDATE()); INSERT INTO vicidial_status_categories (vsc_id,vsc_name) values('UNDEFINED','Default Category'); diff --git a/agc_2-X/branches/agc_2.2.0/extras/upgrade_2.2.0.sql b/agc_2-X/branches/agc_2.2.0/extras/upgrade_2.2.0.sql index 24db89b3..04171e6b 100644 --- a/agc_2-X/branches/agc_2.2.0/extras/upgrade_2.2.0.sql +++ b/agc_2-X/branches/agc_2.2.0/extras/upgrade_2.2.0.sql @@ -734,4 +734,4 @@ CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log; UPDATE system_settings SET db_schema_version='1193',db_schema_update_date=NOW(); -UPDATE system_settings SET version='2.2.0rc3',db_schema_update_date=NOW(); +UPDATE system_settings SET version='2.2.0rc4',db_schema_update_date=NOW(); diff --git a/agc_2-X/branches/agc_2.2.0/version b/agc_2-X/branches/agc_2.2.0/version index 005f88bc..6b8c1c16 100644 --- a/agc_2-X/branches/agc_2.2.0/version +++ b/agc_2-X/branches/agc_2.2.0/version @@ -1 +1 @@ -2.2.0rc3 +2.2.0rc4 diff --git a/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php index 61d1ed96..ebfa9a6c 100644 --- a/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_br/vicidial.php b/agc_2-X/trunk/LANG_www/agc_br/vicidial.php index 60054346..fdcebbfa 100644 --- a/agc_2-X/trunk/LANG_www/agc_br/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_br/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUsuário; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Início\"
\"Discar"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Usuários&action=Authenticate&return_module=Usuários&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_de/active_list_refresh.php b/agc_2-X/trunk/LANG_www/agc_de/active_list_refresh.php index c3323059..de44be3c 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/active_list_refresh.php +++ b/agc_2-X/trunk/LANG_www/agc_de/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/call_log_display.php b/agc_2-X/trunk/LANG_www/agc_de/call_log_display.php index 534c23fe..c22cdd86 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/call_log_display.php +++ b/agc_2-X/trunk/LANG_www/agc_de/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php index af358b2f..2d1c0e07 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/inbound_popup.php b/agc_2-X/trunk/LANG_www/agc_de/inbound_popup.php index 3aed520d..3b0148b1 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/inbound_popup.php +++ b/agc_2-X/trunk/LANG_www/agc_de/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/live_exten_check.php b/agc_2-X/trunk/LANG_www/agc_de/live_exten_check.php index 3a094519..0b53fa1c 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/live_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_de/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/manager_send.php b/agc_2-X/trunk/LANG_www/agc_de/manager_send.php index edca2532..95fe0851 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_de/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/park_calls_display.php b/agc_2-X/trunk/LANG_www/agc_de/park_calls_display.php index 12bdf195..8acb363a 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/park_calls_display.php +++ b/agc_2-X/trunk/LANG_www/agc_de/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php index 6c751024..c3470ec4 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_de/vicidial.php b/agc_2-X/trunk/LANG_www/agc_de/vicidial.php index bbd83c44..c3756c36 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_de/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeBenutzer; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"WiederAufnehmen\"
\"Nächste"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Benutzers&action=Authenticate&return_module=Benutzers&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_de/voicemail_check.php b/agc_2-X/trunk/LANG_www/agc_de/voicemail_check.php index a0f296dc..41b37f3e 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/voicemail_check.php +++ b/agc_2-X/trunk/LANG_www/agc_de/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Unzulässig Benutzername/Passwort: |$user|$pass|\n"; + echo "Unzulässig Username/Passwort: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_el/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_el/astguiclient.php index 35f88e31..d55c139d 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_el/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "χειριστής astGUIclient: Σύνδεση\n"; + echo "χειριστής astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "
Agent web client: 登入\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo " Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChange使用者; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"恢復\"
\"撥下一個號碼\""; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=使用者s&action=Authenticate&return_module=使用者s&return_action=登入&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/voicemail_check.php b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/voicemail_check.php index 8a289064..f3892742 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/voicemail_check.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/agc_tw/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_VDADstats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_VDADstats.php index 51c35cc8..15819d7a 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_VDADstats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "----------AUTO-DIAL KEINE ANTWORTEN\n"; + $OUToutput .= "---------- NO ANTWORTS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Durchschnittliche Anruf-Länge für Na benennt in den Sekunden: $average_na_seconds\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_days_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_days_detail.php index aaa22cb5..77c9e9c9 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_days_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_performance_detail.php index cb08d70d..ba8de7b7 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_performance_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_status_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_status_detail.php index 0febd0b6..4b00fa19 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_status_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_time_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_time_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/admin.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/admin.php index 06129ac4..853103d6 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/admin.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/call_report_export.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/call_report_export.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/list_download.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/list_download.php index bf5b1e58..6d988fb0 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/list_download.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader_super.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader_super.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/new_listloader_superL.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/new_listloader_superL.php index d1290697..ed71b514 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sonntag in October to First Sonntag in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sonntag in October and first Sonntag in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sonntag October to Third Sonntag March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sonntag in September to First Sonntag in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sonntag in September and first Sonntag in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # lokale Zeit calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sonntag October to Last Sonntag February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/non_agent_api.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/non_agent_api.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/user_stats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/user_stats.php index 1c2bae33..d20d325d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/user_stats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_de/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "INBOUND/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE KAMPAGNE WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE KAMPAGNE WAIT (S) MITTEL(S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "MITTELACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD KAMPAGNE PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_VDADstats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_VDADstats.php index d562e759..eb623d65 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_VDADstats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- ΜΗ ΑΠΑΝΤ ΑΥΤ ΚΛΗΣΕΙΣ\n"; + $OUToutput .= "---------- NO ΑΠΑΝΤΗΣΗS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Μέσος όρος σε δευτερόλεπτα για ΝΑ κλήσεις: $average_na_seconds\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_days_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_days_detail.php index c43f6389..d7d0460e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_days_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_performance_detail.php index 31b72079..099a8905 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_performance_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_status_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_status_detail.php index 73a3a3df..856954c2 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_status_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_time_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_time_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/admin.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/admin.php index 1ea589bc..cd61ea68 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/admin.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6191,6 +6192,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6257,6 +6266,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6312,6 +6329,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7366,6 +7391,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20633,6 +20671,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -24016,7 +24067,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/call_report_export.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/call_report_export.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/dbconnect.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/dbconnect.php index dae8cc7a..dca45485 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/dbconnect.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/dbconnect.php @@ -1,10 +1,10 @@ - LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # if ( file_exists("/etc/astguiclient.conf") ) { @@ -16,6 +16,8 @@ foreach ($DBCagc as $DBCline) {$PATHlogs = $DBCline; $PATHlogs = preg_replace("/.*=/","",$PATHlogs);} if (ereg("^PATHweb", $DBCline)) {$WeBServeRRooT = $DBCline; $WeBServeRRooT = preg_replace("/.*=/","",$WeBServeRRooT);} + if (ereg("^VARserver_ip", $DBCline)) + {$WEBserver_ip = $DBCline; $WEBserver_ip = preg_replace("/.*=/","",$WEBserver_ip);} if (ereg("^VARDB_server", $DBCline)) {$VARDB_server = $DBCline; $VARDB_server = preg_replace("/.*=/","",$VARDB_server);} if (ereg("^VARDB_database", $DBCline)) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/list_download.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/list_download.php index 6e7bbc86..8604d872 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/list_download.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader_super.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader_super.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/new_listloader_superL.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/new_listloader_superL.php index 8f834971..019bddc3 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Κυριακή in October to First Κυριακή in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Κυριακή in October and first Κυριακή in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Κυριακή October to Third Κυριακή March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Κυριακή in September to First Κυριακή in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Κυριακή in September and first Κυριακή in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # τοπικός χρόνος calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Κυριακή October to Last Κυριακή February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/non_agent_api.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/non_agent_api.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/user_stats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/user_stats.php index 0d0e7701..a5cef2d4 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/user_stats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_el/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "Εισερχόμενα/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ WAIT (S) ΧΕΙΡΙΣΤΗΣ(S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "ΧΕΙΡΙΣΤΗΣACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEADΕΚΣΤΡΑΤΕΙΑ PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_VDADstats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_VDADstats.php index 1074766b..8ecd4030 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_VDADstats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- AUTO-DIAL SIN RESPUESTA\n"; + $OUToutput .= "---------- NO RESPUESTAS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Longitud media para las Llamadas sin Respuesta en segundos: $average_na_seconds\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_days_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_days_detail.php index 7de56a11..912664a5 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_days_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_performance_detail.php index 6c7ab5c3..f383366e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_performance_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_status_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_status_detail.php index 8c911234..9bc7e7dd 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_status_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_time_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_time_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/admin.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/admin.php index c5b1d8fa..e9d1f0ff 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/admin.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/call_report_export.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/call_report_export.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/list_download.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/list_download.php index 98e1aea8..a0156bcf 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/list_download.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader_super.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader_super.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/new_listloader_superL.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/new_listloader_superL.php index d53e77dd..9f797cd2 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Domingo in October to First Domingo in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Domingo in October and first Domingo in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Domingo October to Third Domingo March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Domingo in September to First Domingo in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Domingo in September and first Domingo in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # tiempo local calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Domingo October to Last Domingo February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/non_agent_api.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/non_agent_api.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/user_stats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/user_stats.php index eb13efd1..32ebf789 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/user_stats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_es/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "Entrantes/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAÑA WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAÑA WAIT (S) AGENTE (S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "AGENTE ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD CAMPAÑA PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_VDADstats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_VDADstats.php index d83d1a57..6e3b3441 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_VDADstats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- APPELS AUTOMATIQUES SANS REPONSES\n"; + $OUToutput .= "---------- NO REPONSES\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Durée moyenne des appels pour les appels NA en secondes: $average_na_seconds\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_days_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_days_detail.php index 11e2a7d2..53925f3e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_days_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_performance_detail.php index 0ebbbf24..84252b9e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_performance_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_status_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_status_detail.php index 389d0dfa..2b352039 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_status_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_time_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_time_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/admin.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/admin.php index f260e66d..7871196d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/admin.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/call_report_export.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/call_report_export.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/list_download.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/list_download.php index 572bf79d..8dfb9682 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/list_download.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader_super.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader_super.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/new_listloader_superL.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/new_listloader_superL.php index 2b735e85..3d489dad 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Dimanche in October to First Dimanche in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Dimanche in October and first Dimanche in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Dimanche October to Third Dimanche March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Dimanche in September to First Dimanche in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Dimanche in September and first Dimanche in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # heure locale calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Dimanche October to Last Dimanche February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/non_agent_api.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/non_agent_api.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/user_stats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/user_stats.php index 01e28ae7..d32923d3 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/user_stats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_fr/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "ENTRANT/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNE WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNE WAIT (S) AGENT (S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "AGENT ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD CAMPAGNE PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_VDADstats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_VDADstats.php index ec07840c..2ccf8241 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_VDADstats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- NESSUNA RISPOSTA AUTO-DIAL\n"; + $OUToutput .= "---------- NO RISPOSTAS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: $NAcalls $NApercent%\n"; + $OUToutput .= "Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Durata Media Chiamate Senza Risposta in secondi: $average_na_seconds\n"; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_days_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_days_detail.php index 1266cccd..8650a7ce 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_days_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_performance_detail.php index ea8b18f9..43dfd4df 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_performance_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALI AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALI AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_status_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_status_detail.php index 2c8b8083..859e1413 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_status_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_time_detail.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_time_detail.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/admin.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/admin.php index 641f0af9..e32f1cb2 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/admin.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/call_report_export.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/call_report_export.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/list_download.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/list_download.php index 9914d2b2..c9115190 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/list_download.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader_super.pl b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader_super.pl +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/new_listloader_superL.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/new_listloader_superL.php index e19121fe..fe330845 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Domenica in October to First Domenica in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Domenica in October and first Domenica in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Domenica October to Third Domenica March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Domenica in September to First Domenica in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Domenica in September and first Domenica in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Domenica October to Last Domenica February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/non_agent_api.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/non_agent_api.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/user_stats.php b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/user_stats.php index dcf5245d..e23daa53 100644 --- a/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/user_stats.php +++ b/agc_2-X/branches/agc_2.2.0/LANG_www/vicidial_it/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "INBOUND/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNA WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNA WAIT (S) AGENT (S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALI $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "AGENT ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD CAMPAGNA PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALI $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/branches/agc_2.2.0/bin/build_translation_www_files.pl b/agc_2-X/branches/agc_2.2.0/bin/build_translation_www_files.pl index fb7d083d..9e9a079f 100644 --- a/agc_2-X/branches/agc_2.2.0/bin/build_translation_www_files.pl +++ b/agc_2-X/branches/agc_2.2.0/bin/build_translation_www_files.pl @@ -1,15 +1,16 @@ #!/usr/bin/perl # -# build_translation_www_files.pl version 2.0.5 +# build_translation_www_files.pl version 2.2.0 # # converts web pages to other language # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # changes: # 60808-1029 - Changed to use /etc/astguiclient.conf for configs # 70402-1305 - Added error log generation for not found phrases # 90317-0127 - Changed internationalization link for admin +# 100203-1331 - Added PATHweb override # ############################################ @@ -53,13 +54,6 @@ foreach(@conf) $i++; } -# -# path to home directory: (assumes it already exists) -$home = $PATHhome; - -# path to web root directory: (assumes it already exists) -$webroot = $PATHweb; - ############################################ $secX = time(); @@ -75,99 +69,114 @@ $admin_error_file = "language_admin_error.txt"; ### begin parsing run-time options ### if (length($ARGV[0])>1) -{ + { $i=0; while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } + { + $args = "$args $ARGV[$i]"; + $i++; + } if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[--admin-only] = only translate admin pages\n[--client-only] = only translate client pages\n[--without-en] = only translate non-english\n[--language=] = which language to build, 2 letter code, defaults to es-spanish\n\n"; + { + print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[--admin-only] = only translate admin pages\n[--client-only] = only translate client pages\n[--without-en] = only translate non-english\n[--language=] = which language to build, 2 letter code, defaults to es-spanish\n[--PATHweb=] = override to use this directory as source\n\n"; - exit; - } + exit; + } else - { + { if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } + { + $DB=1; # Debug flag + } if ($args =~ /--language/i) - { - $LANG=1; - print "\n----- LANGUAGE WEB SCRIPT ONLY BUILD -----\n\n"; - } + { + $LANG=1; + print "\n----- LANGUAGE WEB SCRIPT ONLY BUILD -----\n\n"; + } if ($args =~ /--language=/i) - { - @data_in = split(/--language=/,$args); - $CLIlanguage = $data_in[1]; - } + { + @data_in = split(/--language=/,$args); + @CLIlanguageX = split(/ /,$data_in[1]); + $CLIlanguage = $CLIlanguageX[0]; + } else {$CLIlanguage = 'es';} # default to build all languages + if ($args =~ /--PATHweb=/i) + { + @PATHwebA = split(/--PATHweb=/,$args); + @PATHwebB = split(/ /,$PATHwebA[1]); + $PATHweb = $PATHwebB[0]; + print "\n----- WEB PATH OVERRIDE: $PATHweb -----\n\n"; + } if ($args =~ /-admin-only/i) - { - $admin_only=1; # Admin flag - print "\n----- ADMIN PAGES ONLY BUILD -----\n\n"; - } + { + $admin_only=1; # Admin flag + print "\n----- ADMIN PAGES ONLY BUILD -----\n\n"; + } if ($args =~ /-client-only/i) - { - $client_only=1; # Client flag - print "\n----- CLIENT PAGES ONLY BUILD -----\n\n"; - } + { + $client_only=1; # Client flag + print "\n----- CLIENT PAGES ONLY BUILD -----\n\n"; + } if ($args =~ /-without-en/i) - { - print "\n----- NON-ENGLISH ONLY BUILD -----\n\n"; - $without_en=1; - } + { + print "\n----- NON-ENGLISH ONLY BUILD -----\n\n"; + $without_en=1; + } if ($args =~ /-t/i) - { - $TEST=1; - $T=1; + { + $TEST=1; + $T=1; + } } } -} else -{ -# print "no command line options set\n"; -} + { + # print "no command line options set\n"; + } ### end parsing run-time options ### +# +# path to home directory: (assumes it already exists) +$home = $PATHhome; + +# path to web root directory: (assumes it already exists) +$webroot = $PATHweb; + if ($LANG) -{ -if ( (!$admin_only) && (!$client_only) ) - {$admin_only=1; $client_only=1;} - -if ($admin_only==1) { - print "\n----- LANGUAGE BUILD: $CLIlanguage -----\n\n"; - $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$admin_error_file"; - $LANG_FILE_ADMIN = "./translations/$CLIlanguage$US$language_admin_file"; - open(lang, "$LANG_FILE_ADMIN") || die "can't open $LANG_FILE_ADMIN: $!\n"; - @lang = ; - close(lang); - &translate_pages; - } + if ( (!$admin_only) && (!$client_only) ) + {$admin_only=1; $client_only=1;} -@lang=@MT; -@LANGUAGES=@MT; -@FILES=@MT; -@TRANSLATIONS=@MT; -@TRANSLATIONS_RAW=@MT; + if ($admin_only==1) + { + print "\n----- LANGUAGE BUILD: $CLIlanguage -----\n\n"; + $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$admin_error_file"; + $LANG_FILE_ADMIN = "./translations/$CLIlanguage$US$language_admin_file"; + open(lang, "$LANG_FILE_ADMIN") || die "can't open $LANG_FILE_ADMIN: $!\n"; + @lang = ; + close(lang); + &translate_pages; + } -if ($client_only==1) - { - $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$error_file"; - $LANG_FILE = "./translations/$CLIlanguage$US$language_file"; - open(lang, "$LANG_FILE") || die "can't open $LANG_FILE: $!\n"; - @lang = ; - close(lang); - &translate_pages; + @lang=@MT; + @LANGUAGES=@MT; + @FILES=@MT; + @TRANSLATIONS=@MT; + @TRANSLATIONS_RAW=@MT; + + if ($client_only==1) + { + $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$error_file"; + $LANG_FILE = "./translations/$CLIlanguage$US$language_file"; + open(lang, "$LANG_FILE") || die "can't open $LANG_FILE: $!\n"; + @lang = ; + close(lang); + &translate_pages; + } } -} $secy = time(); $secz = ($secy - $secX); $minz = ($secz/60); # calculate script runtime so far print "\n - process runtime ($secz sec) ($minz minutes)\n"; @@ -179,173 +188,150 @@ exit; sub translate_pages -{ -#***LANGUAGES*** -#en-English|es-Espaol| -#***FILES*** -#agc/astguiclient.php -#agc/vicidial.php -#***TRANSLATIONS*** -#English|Ingls| -#Spanish|Espaol| - -##### PARSE THE LANGUAGES SETTING FILE ##### -$section=''; -$i=0; -$Lct=0; $Fct=0; $Tct=0; -foreach(@lang) { - if ($lang[$i] !~ /^\#/) + #***LANGUAGES*** + #en-English|es-Espaol| + #***FILES*** + #agc/astguiclient.php + #agc/vicidial.php + #***TRANSLATIONS*** + #English|Ingls| + #Spanish|Espaol| + + ##### PARSE THE LANGUAGES SETTING FILE ##### + $section=''; + $i=0; + $Lct=0; $Fct=0; $Tct=0; + foreach(@lang) { - if ($lang[$i] =~ /^\*\*\*/) + if ($lang[$i] !~ /^\#/) { - $section = $lang[$i]; - $section =~ s/\*|\n|\r//gi; - # print "section heading: $section: $lang[$i]"; - } - else - { - if ($section =~ /LANGUAGES/) + if ($lang[$i] =~ /^\*\*\*/) { - $LANGUAGES = $lang[$i]; - $Lct++; + $section = $lang[$i]; + $section =~ s/\*|\n|\r//gi; + # print "section heading: $section: $lang[$i]"; } else { - if ($section =~ /FILES/) + if ($section =~ /LANGUAGES/) { - # print "section: $section line: $lang[$i]"; - $FILES[$Fct] = $lang[$i]; - $Fct++; + $LANGUAGES = $lang[$i]; + $Lct++; } else { - if ($section =~ /TRANSLATIONS/) + if ($section =~ /FILES/) { # print "section: $section line: $lang[$i]"; - @TRANSlineX = split(/\|/, $lang[$i]); - $ORIGtextX = "$TRANSlineX[0]"; - $lengthX = length($ORIGtextX); - $lengthX = sprintf("%04d",$lengthX); - $TRANSLATIONS_RAW[$Tct] = "$lengthX|$lang[$i]"; - $Tct++; + $FILES[$Fct] = $lang[$i]; + $Fct++; + } + else + { + if ($section =~ /TRANSLATIONS/) + { + # print "section: $section line: $lang[$i]"; + @TRANSlineX = split(/\|/, $lang[$i]); + $ORIGtextX = "$TRANSlineX[0]"; + $lengthX = length($ORIGtextX); + $lengthX = sprintf("%04d",$lengthX); + $TRANSLATIONS_RAW[$Tct] = "$lengthX|$lang[$i]"; + $Tct++; + } } } } } + $i++; } - $i++; - } -if ($DB) - { - print "LANGUAGE FILE PARSE RESULTS: $#lang lines in file\n"; - print "LANGUAGES: $LANGUAGES\n"; - print "FILES: $Fct\n"; - print "TRANSLATIONS: $Tct\n"; - } - -#@TRANSLATIONS = sort { length($b) <=> length($a) } @TRANSLATIONS_RAW; -@TRANSLATIONS = sort { $b <=> $a } @TRANSLATIONS_RAW; - -#$k=0; -#foreach(@TRANSLATIONS) -# { -# $length = length($TRANSLATIONS[$k]); -# print "$TRANSLATIONS[$k]|$length|\n"; -# $k++; -# } - -##### LOOP THROUGH THE LANGUAGES -@lang_list = split(/\|/, $LANGUAGES); -@lang_link_list = @lang_list; -$i=0; -$gif = '.gif'; -foreach(@lang_list) - { - if (length($lang_list[$i]) > 2) + if ($DB) { - @lang_detail = split(/-/, $lang_list[$i]); - $lang_abb = $lang_detail[0]; - $lang_name = $lang_detail[1]; + print "LANGUAGE FILE PARSE RESULTS: $#lang lines in file\n"; + print "LANGUAGES: $LANGUAGES\n"; + print "FILES: $Fct\n"; + print "TRANSLATIONS: $Tct\n"; + } - if ( ($without_en==1) && ($lang_abb =~ /en/) ) + #@TRANSLATIONS = sort { length($b) <=> length($a) } @TRANSLATIONS_RAW; + @TRANSLATIONS = sort { $b <=> $a } @TRANSLATIONS_RAW; + + #$k=0; + #foreach(@TRANSLATIONS) + # { + # $length = length($TRANSLATIONS[$k]); + # print "$TRANSLATIONS[$k]|$length|\n"; + # $k++; + # } + + ##### LOOP THROUGH THE LANGUAGES + @lang_list = split(/\|/, $LANGUAGES); + @lang_link_list = @lang_list; + $i=0; + $gif = '.gif'; + foreach(@lang_list) + { + if (length($lang_list[$i]) > 2) { - print "SKIPPING ENGLISH COPYING: $lang_abb|$i\n\n"; - } - else - { - ##### LOOP THROUGH THE FILES - $Fct=0; - foreach(@FILES) + @lang_detail = split(/-/, $lang_list[$i]); + $lang_abb = $lang_detail[0]; + $lang_name = $lang_detail[1]; + + if ( ($without_en==1) && ($lang_abb =~ /en/) ) { - $a=0; - @file_detail = split(/\|/, $FILES[$Fct]); - $file_path = $file_detail[0]; - $file_name = $file_detail[1]; - $file_name =~ s/\t|\r|\n//gi; - $file_passthru = $file_detail[2]; - $file_passthru =~ s/\t|\r|\n//gi; - if (-e "$webroot/$file_path/$file_name") + print "SKIPPING ENGLISH COPYING: $lang_abb|$i\n\n"; + } + else + { + ##### LOOP THROUGH THE FILES + $Fct=0; + foreach(@FILES) { - open(file, "$webroot/$file_path/$file_name") || die "can't open $webroot/$file_path/$file_name: $!\n"; - @file = @MT; - @file = ; - close(file); + $a=0; + @file_detail = split(/\|/, $FILES[$Fct]); + $file_path = $file_detail[0]; + $file_name = $file_detail[1]; + $file_name =~ s/\t|\r|\n//gi; + $file_passthru = $file_detail[2]; + $file_passthru =~ s/\t|\r|\n//gi; + if (-e "$webroot/$file_path/$file_name") + { + open(file, "$webroot/$file_path/$file_name") || die "can't open $webroot/$file_path/$file_name: $!\n"; + @file = @MT; + @file = ; + close(file); - print "File exists: ./$file_path/$file_name\n"; - if (-e "$webroot/$file_path$US$lang_abb") - { - print "Lang Directory exists: $webroot/$file_path$US$lang_abb\n"; - } - else - { - `mkdir $webroot/$file_path$US$lang_abb`; - `chmod 0777 $webroot/$file_path$US$lang_abb`; - print "Lang Directory created: $webroot/$file_path$US$lang_abb\n"; - } - - if ($file_passthru < 1) - { - ##### LOOP THROUGH THE TRANSLATIONS - $Tct=0; - foreach(@TRANSLATIONS) + print "File exists: ./$file_path/$file_name\n"; + if (-e "$webroot/$file_path$US$lang_abb") { - @TRANSline = split(/\|/, $TRANSLATIONS[$Tct]); - $ORIGtext = "$TRANSline[1]"; - $TRANStext = "$TRANSline[$i+1]"; - $LINESct=0; - foreach(@file) + print "Lang Directory exists: $webroot/$file_path$US$lang_abb\n"; + } + else + { + `mkdir $webroot/$file_path$US$lang_abb`; + `chmod 0777 $webroot/$file_path$US$lang_abb`; + print "Lang Directory created: $webroot/$file_path$US$lang_abb\n"; + } + + if ($file_passthru < 1) + { + ##### LOOP THROUGH THE TRANSLATIONS + $Tct=0; + foreach(@TRANSLATIONS) { - if ($file[$LINESct] !~ /^\#|^\s*function |'INCALL'|'PAUSED'|'READY'|'NEW'|xmlhttp|ILPV |ILPA |SELECT cmd_line_f|=\"SELECT|Header\(\"/) + @TRANSline = split(/\|/, $TRANSLATIONS[$Tct]); + $ORIGtext = "$TRANSline[1]"; + $TRANStext = "$TRANSline[$i+1]"; + $LINESct=0; + foreach(@file) { - $phrase_found_counter=0; - if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/) + if ($file[$LINESct] !~ /^\#|^\s*function |'INCALL'|'PAUSED'|'READY'|'NEW'|xmlhttp|ILPV |ILPA |SELECT cmd_line_f|=\"SELECT|Header\(\"/) { - $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/ILPV/g; - $e=0; - $gif = '.gif'; - foreach(@lang_link_list) + $phrase_found_counter=0; + if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/) { - if (length($lang_link_list[$e]) > 2) - { - @lang_list_detail = split(/-/, $lang_link_list[$e]); - $lang_list_abb = $lang_list_detail[0]; - $lang_list_name = $lang_list_detail[1]; - if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';} - else {$list_bgcolor = '';} - if ($file_name =~ /admin/) {$link_file_name = 'admin.php';} - else {$link_file_name = $file_name;} - $file[$LINESct] .= "echo \"
$lang_list_name $lang_list_name $lang_list_name $lang_list_name
\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php index ce98d802..8f81c8dc 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_el/vicidial.php b/agc_2-X/trunk/LANG_www/agc_el/vicidial.php index 233936f6..22b347a0 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_el/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Σύνδεση\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeΧρήστης; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Επανάληψη\"
\"Κλήση"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Χρήστηςs&action=Authenticate&return_module=Χρήστηςs&return_action=Σύνδεση&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_es/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_es/astguiclient.php index 29fb4907..7dee1758 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_es/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web client astGUIclient: Conexión\n"; + echo "web client astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php index cdb708b5..559f24ca 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_es/vicidial.php b/agc_2-X/trunk/LANG_www/agc_es/vicidial.php index ea0d44c7..4b36d014 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_es/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Conexión\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUsuario; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Comienzo\"
\"Marcar"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } diff --git a/agc_2-X/trunk/LANG_www/agc_fr/active_list_refresh.php b/agc_2-X/trunk/LANG_www/agc_fr/active_list_refresh.php index 0d81835a..2e9c0760 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/active_list_refresh.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_fr/astguiclient.php index fdfb77f3..5b578b49 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "astGUIclient Client Web: Ouverture de Session\n"; + echo "astGUIclient Client Web: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_fr/call_log_display.php b/agc_2-X/trunk/LANG_www/agc_fr/call_log_display.php index b31579b9..8a52cf2b 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/call_log_display.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php index dee740a4..f9bf57a4 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/inbound_popup.php b/agc_2-X/trunk/LANG_www/agc_fr/inbound_popup.php index f5c0101a..1b734c3b 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/inbound_popup.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/live_exten_check.php b/agc_2-X/trunk/LANG_www/agc_fr/live_exten_check.php index a20eefa0..85224fc3 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/live_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php b/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php index 9d690c25..335adb6a 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/park_calls_display.php b/agc_2-X/trunk/LANG_www/agc_fr/park_calls_display.php index 64c8dc1a..bc20d026 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/park_calls_display.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php index 2556e2ed..e562766b 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php b/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php index e0f7d21c..1eb3b6de 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo ""; echo ""; echo "\n"; - echo "\n"; + echo "\n"; echo ""; echo "\n"; echo ""; @@ -953,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} } // ################################################################################ -// Send Redirect command for live call to Managersends phone name where call is going to +// Send Redirect command for live call to Manager sends phone name where call is going to function mainxfer_send_redirect(taskvar,taskxferconf) { var xmlhttp=false; @@ -1046,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} // ################################################################################ -// Send Originate command for local dial to Managersends phone name where call is going to +// Send Originate command for local dial to Manager sends phone name where call is going to function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop) { var xmlhttp=false; @@ -1825,7 +1825,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var LMAcontent_change=0; var LMAcontent_match=0; var conv_start=-1; - var live_conf_HTML = "CHIAMATE IN CORSO SU QUESTA CONFERENZA:
Agent web client: Ouverture de Session\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUtilisateur; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Résumé\"
\"Appel"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Utilisateurs&action=Authenticate&return_module=Utilisateurs&return_action=Ouverture de Session&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_fr/voicemail_check.php b/agc_2-X/trunk/LANG_www/agc_fr/voicemail_check.php index 38fa7f95..355a9871 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/voicemail_check.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Invalide Utilisateurname/Mot de passe: |$user|$pass|\n"; + echo "Invalide Username/Mot de passe: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_it/active_list_refresh.php b/agc_2-X/trunk/LANG_www/agc_it/active_list_refresh.php index 994fb9cb..24826253 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/active_list_refresh.php +++ b/agc_2-X/trunk/LANG_www/agc_it/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_it/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_it/astguiclient.php index c7759742..547ed6c6 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_it/astguiclient.php @@ -261,7 +261,7 @@ echo "
Login Telefono
 
Spiacente, il telefono inserito non e` attivo in questo sistema, riprova di nuovo:
 
 
Spiacente, il telefono inserito non è attivo in questo sistema, riprova di nuovo:
 
Login Telefono:
Password Telefono:
"; + var live_conf_HTML = "CHIAMATE IN CORSO IN QUESTA CONFERENZA:
#CANALE REMOTORIAGGANCIATRASF
"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -2758,7 +2758,7 @@ echo "\n"; -
#CANALE REMOTORIAGGANCIATRASF
+
TRASFERIMENTO DELLA CHIAMATA IN CORSO
Canale trasferito: Channel
-
TRASFERIMENTO DELLA CHIAMATA IN CORSO
Canale da trasferire: Channel
Interni:
Menu Interni

@@ -2768,7 +2768,7 @@ echo "\n"; Aggiorna


Torna alla schermata principale

Conferenze:
(Seleziona uno dei numeri sotto per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenze
+
Conferenze:
(seleziona uno dei numeri sotto per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenze
@@ -2839,7 +2839,7 @@ echo "\n"; \n"; echo "\n"; - echo "\n"; + echo "\n"; echo ""; echo ""; echo "\n"; - echo "\n"; + echo "\n"; echo ""; echo "\n"; echo ""; @@ -1979,7 +1980,7 @@ else if ($auto_dial_level > 0) { - echo "\n"; + echo "\n"; $closer_chooser_string=''; @@ -2021,7 +2022,7 @@ else } else { - print "\n"; + print "\n"; $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME','N','N');"; if ($DB) {echo "$stmt\n";} @@ -2059,7 +2060,7 @@ else echo "Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "
-STOP | START     Frequenza di refresh: 1000 ms Piu` veloce | Piu` lento

+STOP | START     Frequenza di refresh: 1000 ms Più veloce | Più lento

Inizializzazione..
Interni Attivi
diff --git a/agc_2-X/trunk/LANG_www/agc_it/call_log_display.php b/agc_2-X/trunk/LANG_www/agc_it/call_log_display.php index 1e8d6e86..2d00000e 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/call_log_display.php +++ b/agc_2-X/trunk/LANG_www/agc_it/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -121,7 +121,7 @@ echo " if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; + echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php index 2496b77e..dbc79787 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -187,7 +187,7 @@ echo " if (strlen($conf_exten)<1) { $channel_live=0; - echo "Conf Exten $conf_exten non e` valido\n"; + echo "Conf Exten $conf_exten non è valido\n"; exit; } else @@ -634,7 +634,7 @@ echo " if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) { $channel_live=0; - echo "Conf Exten $conf_exten non e` valido or Exten $exten non e` valido\n"; + echo "Conf Exten $conf_exten non è valido or Exten $exten non è valido\n"; exit; } else @@ -644,7 +644,7 @@ echo " $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03013',$user,$server_ip,$session_name,$one_mysql_log);} } - echo "Conferenza $conf_exten e` stato registrato su $exten\n"; + echo "Conferenza $conf_exten è stato registrato su $exten\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_it/inbound_popup.php b/agc_2-X/trunk/LANG_www/agc_it/inbound_popup.php index 51416989..a3112792 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/inbound_popup.php +++ b/agc_2-X/trunk/LANG_www/agc_it/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -266,7 +266,7 @@ $channel_live=1; if (strlen($uniqueid)<9) { $channel_live=0; - echo "Uniqueid $uniqueid non e` valido\n"; + echo "Uniqueid $uniqueid non è valido\n"; exit; } else @@ -320,7 +320,7 @@ else echo "
Numero chiamato: $row[8]
Note:$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
Note: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; echo "RIAGGANCIA - \n"; echo "INVIA ALLA MIA VOICEMAIL\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_it/live_exten_check.php b/agc_2-X/trunk/LANG_www/agc_it/live_exten_check.php index 0262a41e..089710ca 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/live_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_it/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -132,7 +132,7 @@ echo "$row[0]|"; if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; + echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_it/manager_send.php b/agc_2-X/trunk/LANG_www/agc_it/manager_send.php index f4f118b6..fb1579e8 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_it/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -297,7 +297,7 @@ if ($ACTION=="SysCIDOriginate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) { - echo "Exten $exten non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; + echo "Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; } else { @@ -319,9 +319,9 @@ if ($ACTION=="OriginateName") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -348,9 +348,9 @@ if ($ACTION=="OriginateNameVmail") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; @@ -392,13 +392,13 @@ if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) { - echo "ERROR Exten $exten non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; + echo "ERROR Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; } else { if ( (eregi('MANUAL',$agent_dialed_type)) and ( (preg_match("/^\d860\d\d\d\d$/i",$exten)) or (preg_match("/^860\d\d\d\d$/i",$exten)) ) ) { - echo "ERROR Non ti è permesso di comporre in sessioni altro agente $exten\n"; + echo "ERROR Non ti è permesso lavorare nella sessione di un altro operatore $exten\n"; exit; } @@ -442,7 +442,7 @@ if ($ACTION=="HangupConfDial") if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) { $channel_live=0; - echo "conference $exten non e` valido or ext_context $ext_context or queryCID $queryCID non e` valido, Hangup comando non inserito\n"; + echo "conference $exten non è valido or ext_context $ext_context or queryCID $queryCID non è valido, Hangup comando non inserito\n"; } else { @@ -486,7 +486,7 @@ if ($ACTION=="Hangup") if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) { $channel_live=0; - echo "Channel $channel non e` valido or queryCID $queryCID non e` valido, Hangup comando non inserito\n"; + echo "Channel $channel non è valido or queryCID $queryCID non è valido, Hangup comando non inserito\n"; } else { @@ -517,7 +517,7 @@ if ($ACTION=="Hangup") $rowx=mysql_fetch_row($rslt); if ($rowx[0]==0) { - echo "Call $CalLCID $channel non e` attivo su $call_server_ip, Checking Live Canale...\n"; + echo "Call $CalLCID $channel non è attivo su $call_server_ip, Checking Live Canale...\n"; $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; if ($format=='debug') {echo "\n";} @@ -527,7 +527,7 @@ if ($ACTION=="Hangup") if ($row[0]==0) { $channel_live=0; - echo "Channel $channel non e` attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n"; + echo "Channel $channel non è attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n"; } else { @@ -693,9 +693,9 @@ if ($ACTION=="RedirectVD") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -776,9 +776,9 @@ if ($ACTION=="RedirectToPark") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "extenName $extenName deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; @@ -806,9 +806,9 @@ if ($ACTION=="RedirectFromPark") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -830,9 +830,9 @@ if ($ACTION=="RedirectName") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -859,9 +859,9 @@ if ($ACTION=="RedirectNameVmail") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "extenName $extenName deve essere impostato\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; @@ -899,10 +899,10 @@ if ($ACTION=="RedirectXtraCXNeW") { $channel_liveX=0; $channel_liveY=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "ExtraChannel $extrachannel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "ExtraChannel $extrachannel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -1008,8 +1008,8 @@ if ($ACTION=="RedirectXtraCXNeW") if ($rowx[0]==0) { $channel_liveX=0; - echo "Channel $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";} + echo "Channel $channel non è attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -1027,8 +1027,8 @@ if ($ACTION=="RedirectXtraCXNeW") if ($rowx[0]==0) { $channel_liveY=0; - echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";} + echo "Channel $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -1124,10 +1124,10 @@ if ($ACTION=="RedirectXtraNeW") { $channel_liveX=0; $channel_liveY=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "ExtraChannel $extrachannel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "ExtraChannel $extrachannel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -1225,8 +1225,8 @@ if ($ACTION=="RedirectXtraNeW") if ($rowx[0]==0) { $channel_liveX=0; - echo "Channel $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";} + echo "Channel $channel non è attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -1244,8 +1244,8 @@ if ($ACTION=="RedirectXtraNeW") if ($rowx[0]==0) { $channel_liveY=0; - echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; - if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";} + echo "Channel $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -1345,9 +1345,9 @@ if ($ACTION=="Redirect") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non e` valido:\n"; - echo "Channel $channel deve avere piu' di 2 caratteri\n"; - echo "queryCID $queryCID deve avere piu' di 14 caratteri\n"; + echo "Una di queste variabili non è valido:\n"; + echo "Channel $channel deve avere più di 2 caratteri\n"; + echo "queryCID $queryCID deve avere più di 14 caratteri\n"; echo "exten $exten deve essere impostato\n"; echo "ext_context $ext_context deve essere impostato\n"; echo "ext_priority $ext_priority deve essere impostato\n"; @@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect") if ($rowx[0]==0) { $channel_live=0; - echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; + echo "Channel $channel non è attivo su $server_ip, Redirect comando non inserito\n"; } } if ($channel_live==1) @@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) ) { $channel_live=0; - echo "Channel $channel non e` valido or queryCID $queryCID non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n"; + echo "Channel $channel non è valido or queryCID $queryCID non è valido or filename: $filename non è valido, $ACTION comando non inserito\n"; } else { @@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ($rowx[0]==0) { $channel_live=0; - echo "Channel $channel non e` attivo su $server_ip, $ACTION comando non inserito\n"; + echo "Channel $channel non è attivo su $server_ip, $ACTION comando non inserito\n"; } } if ($channel_live==1) @@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) ) { $channel_live=0; - echo "Channel $channel non e` valido or exten $exten non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n"; + echo "Channel $channel non è valido or exten $exten non è valido or filename: $filename non è valido, $ACTION comando non inserito\n"; } else { @@ -1639,7 +1639,7 @@ if ($ACTION=="VolumeControl") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) ) { - echo "Conferenza $exten, Stage $stage non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; + echo "Conferenza $exten, Stage $stage non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; } else { diff --git a/agc_2-X/trunk/LANG_www/agc_it/park_calls_display.php b/agc_2-X/trunk/LANG_www/agc_it/park_calls_display.php index c5d2e0b7..6beccec3 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/park_calls_display.php +++ b/agc_2-X/trunk/LANG_www/agc_it/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -111,7 +111,7 @@ echo " if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; + echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_it/timeclock.php b/agc_2-X/trunk/LANG_www/agc_it/timeclock.php index 8299312d..82c5f9c2 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/timeclock.php +++ b/agc_2-X/trunk/LANG_www/agc_it/timeclock.php @@ -120,10 +120,10 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ($valid_user < 1) { ### NOT A VALID USER/PASS - $VDdisplayMESSAGE = "Lutente e la password che hai inserito non sono attivi nel sistema
Si prega di riprovare:"; + $VDdisplayMESSAGE = "L`utente e la password che hai inserito non sono attivi nel sistema
Si prega di riprovare:"; echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -138,7 +138,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) echo "

$VDdisplayMESSAGE

"; echo ""; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo ""; @@ -225,10 +225,10 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ( ($last_action_sec < 30) and ($status != 'START') ) { ### You cannot log in or out within 30 secondi of your last login/logout - $VDdisplayMESSAGE = "Non è possibile accedere o entro 30 secondi del tuo ultimo accesso o il logout"; + $VDdisplayMESSAGE = "Non è possibile accedere o scollegarsi prima di 30 secondi dal tuo ultimo accesso o logout"; echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -243,7 +243,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
Login Utente:
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo ""; @@ -292,8 +292,8 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ( ($status=='LOGIN') and ($stage=='logout') ) { - $VDdisplayMESSAGE = "Lei ha appena effettuato laccesso-out"; - $LOGtimeMESSAGE = "Hai effettuato laccesso a$NOW_TIME
Importo di tempo sono state registrate in:$totTIME_HMS"; + $VDdisplayMESSAGE = "Ti sei appena scollegato dal sistema"; + $LOGtimeMESSAGE = "Ti sei scollegato alle $NOW_TIME
Durata della tua connessione: $totTIME_HMS"; ### Add a record to the timeclock log $stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';"; @@ -333,24 +333,24 @@ if ( ($stage == 'login') or ($stage == 'logout') ) } if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) ) - {echo "ERRORE: orologio registro entrata già fatto:$status|$stage"; exit;} + {echo "ERRORE: Registrazione entrata già effettuata: $status|$stage"; exit;} if ($referrer=='agent') - {$BACKlink = "Torna alla schermata di login di agente";} + {$BACKlink = "Torna alla schermata di Login";} if ($referrer=='admin') - {$BACKlink = "BACK per Amministrazione";} + {$BACKlink = "Torna ad Amministrazione";} if ($referrer=='welcome') {$BACKlink = "Torna alla schermata iniziale";} echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
Login Utente:
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo "\n"; @@ -368,21 +368,21 @@ if ( ($stage == 'login') or ($stage == 'logout') ) if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) { - $VDdisplayMESSAGE = "Tempo dallultimo registrato in:$totTIME_HMS"; + $VDdisplayMESSAGE = "Tempo dal tuo ultimo login: $totTIME_HMS"; $log_action = 'login'; $button_name = 'LOGIN'; - $LOGtimeMESSAGE = "È lultima connesso a:$last_action_date

Clicca qui sotto per LOGIN log-in"; + $LOGtimeMESSAGE = "Ti sei scollegato l`ultima volta alle: $last_action_date

Clicca LOGIN qui sotto per collegarti"; } if ($status=='LOGIN') { - $VDdisplayMESSAGE = "Quantità di tempo è stato registrato in:$totTIME_HMS"; + $VDdisplayMESSAGE = "Durata connessione al sistema: $totTIME_HMS"; $log_action = 'logout'; $button_name = 'LOGOUT'; - $LOGtimeMESSAGE = "Hai effettuato laccesso al-in: $last_action_date
Quantità di tempo è stato registrato in:$totTIME_HMS

Clicca qui sotto per LOGOUT log-out"; + $LOGtimeMESSAGE = "Ti sei collegata l`ultima volta alle: $last_action_date
Durata connessione al sistema: $totTIME_HMS

Clicca LOGOUT qui sotto per scollegarti"; } echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -400,7 +400,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
$LOGtimeMESSAGE
 
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo "\n"; @@ -421,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') ) else { echo"\n"; - echo"AgentOrologio\n"; + echo"Agent Orologio\n"; echo"\n"; echo"\n"; echo "\n"; @@ -436,7 +436,7 @@ else echo "

$VDdisplayMESSAGE

"; echo "
Orologio Orologio
 
$LOGtimeMESSAGE
 
"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; echo ""; diff --git a/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php index 48c8310d..f87c8711 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -610,7 +612,7 @@ if ($ACTION == 'LogiNCamPaigns') $shift_ok=0; if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) ) { - $VDdisplayMESSAGE = "ERRORE: Non ci sono cambiamenti abilitati per il tuo gruppo di utenti\n"; + $VDdisplayMESSAGE = "ERRORE: Non ci sono turni abilitati per il tuo gruppo di utenti\n"; $VDloginDISPLAY=1; } else @@ -670,14 +672,14 @@ if ($ACTION == 'LogiNCamPaigns') if ($VDloginDISPLAY > 0) { $loginDATE = date("Ymd"); - $VDdisplayMESSAGE.= "

Sovrascrive MANAGER:
\n"; + $VDdisplayMESSAGE.= "

OVERRIDE MANAGER:
\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; - $VDdisplayMESSAGE.= "ManagerLogin:
\n"; - $VDdisplayMESSAGE.= "ManagerPassword:
\n"; + $VDdisplayMESSAGE.= "Manager Login:
\n"; + $VDdisplayMESSAGE.= "Manager Password:
\n"; $VDdisplayMESSAGE.= "



\n"; echo "$VDdisplayMESSAGE"; exit; @@ -706,7 +708,7 @@ if ($ACTION == 'LogiNCamPaigns') else { echo "\n"; } exit; @@ -725,7 +727,7 @@ if ($ACTION == 'regCLOSER') if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) { $channel_live=0; - echo "Scelta del Gruppo $closer_choice non e` valido\n"; + echo "Scelta del Gruppo $closer_choice non è valido\n"; exit; } else @@ -807,7 +809,7 @@ if ($ACTION == 'regCLOSER') } } - echo "Closer In Scelta del Gruppo $closer_choice e` stato registrato dall`utente $user\n"; + echo "Closer In Scelta del Gruppo $closer_choice è stato registrato dall`utente $user\n"; } @@ -825,7 +827,7 @@ if ($ACTION == 'regTERRITORY') if ( (strlen($agent_territories)<1) || (strlen($user)<1) ) { $channel_live=0; - echo "Territory Choice $agent_territories non e` valido\n"; + echo "Territory Choice $agent_territories non è valido\n"; exit; } else @@ -865,7 +867,7 @@ if ($ACTION == 'regTERRITORY') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00256',$user,$server_ip,$session_name,$one_mysql_log);} } - echo "Territory Choice $agent_territories e` stato registrato dall`utente $user\n"; + echo "Territory Choice $agent_territories è stato registrato dall`utente $user\n"; } @@ -999,7 +1001,7 @@ if ($ACTION == 'manDiaLnextCaLL') { $channel_live=0; echo "LISTA DI CHIAMATA VUOTA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non e` valido\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non è valido\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2055,7 +2079,7 @@ if ($ACTION == 'alt_phone_change') { $channel_live=0; echo "NUMERO ALTERNATIVO NUMERO STATO NOT CHANGED\n"; - echo "$phone_number $stage $lead_id or $called_count non e` valido\n"; + echo "$phone_number $stage $lead_id or $called_count non è valido\n"; exit; } else @@ -2080,7 +2104,7 @@ if ($ACTION == 'AlertControl') { $channel_live=0; echo "AGENT ALERT SETTING NOT CHANGED\n"; - echo "$stage non e` valido\n"; + echo "$stage non è valido\n"; exit; } else @@ -2111,7 +2135,7 @@ if ($ACTION == 'manDiaLskip') { $channel_live=0; echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non e` valido\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non è valido\n"; exit; } else @@ -2142,7 +2166,7 @@ if ($ACTION == 'manDiaLonly') { $channel_live=0; echo " CHIAMATA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non e` valido\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context non è valido\n"; exit; } else @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2337,7 +2383,7 @@ if ($ACTION == 'manDiaLlookCaLL') if (strlen($MDnextCID)<18) { echo "NO\n"; - echo "MDnextCID $MDnextCID non e` valido\n"; + echo "MDnextCID $MDnextCID non è valido\n"; exit; } else @@ -2461,7 +2507,7 @@ if ($stage == "start") fclose($fp); echo "LOG NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign non e` valido\n"; + echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign non è valido\n"; exit; } else @@ -2574,7 +2620,7 @@ if ($stage == "end") if ( (strlen($uniqueid)<1) or (strlen($lead_id)<1) ) { echo "LOG NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id non e` valido\n"; + echo "uniqueid $uniqueid or lead_id: $lead_id non è valido\n"; exit; } else @@ -3564,8 +3610,8 @@ if ($ACTION == 'VDADREcheckINCOMING') { $channel_live=0; echo "0\n"; - echo "Campagna $campaign non e` valido\n"; - echo "lead_id $lead_id non e` valido\n"; + echo "Campagna $campaign non è valido\n"; + echo "lead_id $lead_id non è valido\n"; exit; } else @@ -3615,7 +3661,7 @@ if ($ACTION == 'VDADcheckINCOMING') { $channel_live=0; echo "0\n"; - echo "Campagna $campaign non e` valido\n"; + echo "Campagna $campaign non è valido\n"; exit; } else @@ -4466,7 +4512,7 @@ if ($ACTION == 'userLOGout') if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) { echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten non e` valido\n"; + echo "campaign $campaign or conf_exten $conf_exten non è valido\n"; exit; } else @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; @@ -4660,7 +4706,7 @@ if ($ACTION == 'updateDISPO') $MAN_vl_insert=0; if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) { - echo "Dispo Choice $dispo or lead_id $lead_id non e` valido\n"; + echo "Dispo Choice $dispo or lead_id $lead_id non è valido\n"; exit; } else @@ -5740,7 +5786,7 @@ if ($ACTION == 'updateDISPO') fclose($fp); } } - echo 'Lead ' . $lead_id . ' e` cambiato ' . $dispo_choice . " Stato\nNext agent_log_id:\n" . $agent_log_id . "\n"; + echo 'Lead ' . $lead_id . ' è cambiato ' . $dispo_choice . " Stato\nNext agent_log_id:\n" . $agent_log_id . "\n"; } ################################################################################ @@ -5755,7 +5801,7 @@ if ($ACTION == 'updateLEAD') $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { - echo "phone_number $phone_number or lead_id $lead_id non e` valido\n"; + echo "phone_number $phone_number or lead_id $lead_id non è valido\n"; exit; } else @@ -5856,7 +5902,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $row=''; $rowx=''; if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) { - echo "stage $stage non e` valido\n"; + echo "stage $stage non è valido\n"; exit; } else @@ -6037,7 +6083,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $VLAaffected_rows_update = mysql_affected_rows($link); } } - echo 'Agent ' . $user . ' e` ora nello stato ' . $stage . "\nNext agent_log_id:\n$agent_log_id\n"; + echo 'Agent ' . $user . ' è ora nello stato ' . $stage . "\nNext agent_log_id:\n$agent_log_id\n"; } @@ -6050,7 +6096,7 @@ if ($ACTION == 'UpdatEFavoritEs') $channel_live=1; if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) { - echo "favorites list $favorites_list non e` valido\n"; + echo "favorites list $favorites_list non è valido\n"; exit; } else @@ -6088,7 +6134,7 @@ if ($ACTION == 'PauseCodeSubmit') $row=''; $rowx=''; if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) { - echo "agent_log_id $agent_log_id or pause_code $status non e` valido\n"; + echo "agent_log_id $agent_log_id or pause_code $status non è valido\n"; exit; } else @@ -6280,7 +6326,7 @@ if ($ACTION == 'CALLSINQUEUEview') if (eregi('NONE',$view_calls_in_queue)) { - echo "Chiamate in coda Visualizza disabili per questa campagna\n"; + echo "Visualizzazione Chiamate in coda disabilitato per questa campagna\n"; exit; } else @@ -6472,7 +6518,7 @@ if ($ACTION == 'CALLSINQUEUEgrab') if ( (eregi('NONE',$view_calls_in_queue)) or (eregi('N',$grab_calls_in_queue)) ) { - echo "ERROR: Chiamate in coda Visualizza disabili per questa campagna\n"; + echo "ERROR: Visualizzazione Chiamate in coda disabilitato per questa campagna\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_it/vicidial.php b/agc_2-X/trunk/LANG_www/agc_it/vicidial.php index 5cdc48fa..a6afe509 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_it/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -507,7 +508,7 @@ if ($campaign_login_list > 0) $SQL_log = "$stmt|"; $SQL_log = ereg_replace(';','',$SQL_log); $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$MGR_login', ip_address='$ip', event_section='AGENT', event_type='OVERRIDE', record_id='$VD_login', event_code='Sovrascrive MANAGER OF AGENT SHIFT ENFORCEMENT', event_sql=\"$SQL_log\", event_notes='user: $VD_login';"; + $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$MGR_login', ip_address='$ip', event_section='AGENT', event_type='OVERRIDE', record_id='$VD_login', event_code='OVERRIDE MANAGER OF AGENT SHIFT ENFORCEMENT', event_sql=\"$SQL_log\", event_notes='user: $VD_login';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01060',$VD_login,$server_ip,$session_name,$one_mysql_log);} @@ -660,7 +661,7 @@ if ($relogin == 'YES') echo "Agent web client: Re-Login\n"; echo "\n"; echo "\n"; -echo "Orologio
\n"; +echo " Orologio
\n"; echo "
Orologio Orologio
 
Login Utente:
\n"; echo "\n"; echo "\n";echo "\n";echo "
English Italiano
\n"; @@ -700,7 +701,7 @@ if ($user_login_first == 1) echo "Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -746,7 +747,7 @@ echo "
Agent web client: Login\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -787,7 +788,7 @@ if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) echo "Agent web client: Login Telefono\n"; echo "\n"; echo "\n"; -echo "Orologio
\n"; +echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n";echo "
English Italiano
\n"; @@ -920,7 +921,7 @@ $VDloginDISPLAY=0; if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) ) { $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "È necessario accedere al orologio LA PRIMA
"; + $VDdisplayMESSAGE = "è necessario accedere prima all`orologio
"; } } ### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR @@ -932,7 +933,7 @@ $VDloginDISPLAY=0; if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) ) { $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "ERRORE: Non ci sono cambiamenti abilitati per il tuo gruppo di utenti
"; + $VDdisplayMESSAGE = "ERRORE: Non ci sono turni abilitati per il tuo gruppo di utenti
"; } else { @@ -990,7 +991,7 @@ $VDloginDISPLAY=0; } if ( ($shift_ok < 1) and ($VU_shift_override_flag < 1) and ($VDloginDISPLAY > 0) ) { - $VDdisplayMESSAGE.= "

Sovrascrive MANAGER:
\n"; + $VDdisplayMESSAGE.= "

OVERRIDE MANAGER:
\n"; $VDdisplayMESSAGE.= "
\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; @@ -999,8 +1000,8 @@ $VDloginDISPLAY=0; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; $VDdisplayMESSAGE.= "\n"; - $VDdisplayMESSAGE.= "ManagerLogin:
\n"; - $VDdisplayMESSAGE.= "ManagerPassword:
\n"; + $VDdisplayMESSAGE.= "Manager Login:
\n"; + $VDdisplayMESSAGE.= "Manager Password:
\n"; $VDdisplayMESSAGE.= "
\n"; } } @@ -1028,7 +1029,7 @@ $VDloginDISPLAY=0; echo "Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -1469,7 +1470,7 @@ echo "
Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -1562,7 +1563,7 @@ if (!$authphone) echo "Agent web client: Login Telefono Error\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -1577,7 +1578,7 @@ echo "
Login Error
 
Spiacente, il telefono inserito non e` attivo in questo sistema, riprova di nuovo:
 
 
Spiacente, il telefono inserito non è attivo in questo sistema, riprova di nuovo:
 
Login Telefono:
Password Telefono:
\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -2085,7 +2086,7 @@ echo "
Agent web client: Login Campagna\n"; echo "\n"; echo "\n"; - echo "Orologio
\n"; + echo " Orologio
\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUtente; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -3734,11 +3735,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // filename = filedate + "_" + user_abb; var query_recording_exten = recording_exten; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Ferma"; + var conf_rec_start_html = "\"Ferma"; if (LIVE_campaign_recording == 'ALLFORCE') { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else { @@ -3750,10 +3751,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} filename = taskconffile; var query_recording_exten = session_id; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Start"; + var conf_rec_start_html = "\"Inizia"; if (LIVE_campaign_recording == 'ALLFORCE') { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else { @@ -3804,7 +3805,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } // ################################################################################ -// Send Redirect command for live call to Managersends phone name where call is going to +// Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, ATTESA, FROMATTESA, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote,taskdispowindow) { @@ -3882,7 +3883,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { xferredirect_query=''; taskvar = 'NOTHING'; - alert("Il numero per il trasferimento deve avere piu` di 1 digit:" + blindxferdialstring); + alert("Il numero per il trasferimento deve avere più di 1 cifra:" + blindxferdialstring); } else { @@ -4171,10 +4172,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // alert("VICIDIAL Call log entered:\n" + document.vicidial_form.uniqueid.value); if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) ) { - var conf_rec_start_html = "\"Start"; + var conf_rec_start_html = "\"Inizia"; if ( (LIVE_campaign_recording == 'NEVER') || (LIVE_campaign_recording == 'ALLFORCE') ) { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else {document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;} @@ -4287,7 +4288,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CBcounT = xmlhttp.responseText; if (CBcounT == 0) {var CBprint = "NO";} else {var CBprint = CBcounT;} - document.getElementById("CBstatusSpan").innerHTML ="" + CBprint + " CHIAMATABACK ATTIVE"; + document.getElementById("CBstatusSpan").innerHTML ="" + CBprint + " RICHIAMI ATTIVI"; } } @@ -4413,7 +4414,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI ESSERE IN PAUSA PER EFFETTUARE UNA CHIAMATA MANUALE QUANDO SEI IN MODALITA` AUTODIAL"); + alert("DEVI ESSERE IN PAUSA PER EFFETTUARE UNA CHIAMATA MANUALE QUANDO SEI IN MODALITà AUTODIAL"); } else { @@ -4582,7 +4583,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (alt_dial_status_display=='0') { // alert(document.getElementById("MainStatuSSpan").innerHTML); - document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + "   In attesa del Ring... " + MD_ring_secondS + " secondi"; + document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + "   In attesa dello squillo... " + MD_ring_secondS + " secondi"; // alert("channel not found yet:\n" + campaign); } } @@ -4615,7 +4616,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} XD_live_call_secondS = 0; MD_channel_look=0; - document.getElementById("MainStatuSSpan").innerHTML = " Chiamata la terza parte: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; + document.getElementById("MainStatuSSpan").innerHTML = " Terzo Numero Chiamato: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; @@ -4684,7 +4685,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (quick_transfer_button == 'IN_GROUP') { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } if (prepopulate_transfer_preset_enabled > 0) { @@ -4701,7 +4702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; if (quick_transfer_button == 'PRESET_1') {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Riprendi\"
\"Chiama"; } @@ -5143,13 +5149,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { reselect_preview_dial = 1; var man_preview = 'YES'; - var man_status = "Anteprima del contatto, quindi CHIAMA LEAD or SKIP LEAD"; + var man_status = "Anteprima del contatto, quindi CHIAMA CLIENTE or SALTA CLIENTE"; } else { reselect_preview_dial = 0; var man_preview = 'NO'; - var man_status = "In attesa del Ring..."; + var man_status = "In attesa dello squillo..."; } var xmlhttp=false; @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5215,7 +5221,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (MDnextCID.match(regMDFvarDNC)) {alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR); alert_displayed=1;} if (MDnextCID.match(regMDFvarCAMP)) - {alert("Questo numero di telefono non si trova nella campagna di elenchi:\n" + mdnPhonENumbeR); alert_displayed=1;} + {alert("Questo numero di telefono non è presente nell`elenco delle campagne:\n" + mdnPhonENumbeR); alert_displayed=1;} if (alert_displayed==0) {alert("Errore non specificato:\n" + mdnPhonENumbeR + "|" + MDnextCID); alert_displayed=1;} @@ -5732,7 +5738,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDSnextCID = MDSnextResponse_array[0]; if (MDSnextCID == "LEAD NOT REVERTED") { - alert("Il contatto non e` ritornato, c`e` un errore:\n" + MDSnextResponse); + alert("Il contatto non è ritornato, c`è un errore:\n" + MDSnextResponse); } else { @@ -5836,24 +5842,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } if (dialed_label == 'ALT') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: ALT ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: ALT ";} if (dialed_label == 'ADDR3') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: INDIRIZZO3 ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: INDIRIZZO3 ";} var REGalt_dial = new RegExp("X","g"); if (dialed_label.match(REGalt_dial)) { - document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: " + dialed_label + ""; + document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: " + dialed_label + ""; document.getElementById("EAcommentsBoxA").innerHTML = "Codice e Numero di telefono: " + EAphone_code + " " + EAphone_number; var EAactive_link = ''; if (EAalt_phone_active == 'Y') - {EAactive_link = "Cambia il numero di telefono a INACTIVE";} + {EAactive_link = "Cambia il numero di telefono a INATTIVO";} else - {EAactive_link = "Cambia il numero di telefono per ATTIVO";} + {EAactive_link = "Cambia il numero di telefono ad ATTIVO";} - document.getElementById("EAcommentsBoxB").innerHTML = "Attivo:" + EAalt_phone_active + "
" + EAactive_link; - document.getElementById("EAcommentsBoxC").innerHTML = "Alt Conte:" + EAalt_phone_count; - document.getElementById("EAcommentsBoxD").innerHTML = "Note:
" + EAalt_phone_notes; + document.getElementById("EAcommentsBoxB").innerHTML = "Attivo: " + EAalt_phone_active + "
" + EAactive_link; + document.getElementById("EAcommentsBoxC").innerHTML = "Conteggio Num Alt: " + EAalt_phone_count; + document.getElementById("EAcommentsBoxD").innerHTML = "Note:
" + EAalt_phone_notes; showDiv('EAcommentsBox'); } @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -5907,7 +5913,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDnextCID = MDOnextResponse_array[0]; if (MDnextCID == " CHIAMATA NOT PLACED") { - alert("chiamata non effettuata, c`e` un errore:\n" + MDOnextResponse); + alert("chiamata non effettuata, c`è un errore:\n" + MDOnextResponse); } else { @@ -5920,7 +5926,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (alt_dial_status_display=='0') { - document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + MDnextCID + "   In attesa del Ring..."; + document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + MDnextCID + "   In attesa dello squillo..."; document.getElementById("HangupControl").innerHTML = "\"Riaggancia"; } @@ -6253,11 +6259,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var EAactive_link = ''; if (APCactive == 'Y') - {EAactive_link = "Cambia il numero di telefono a INACTIVE";} + {EAactive_link = "Cambia il numero di telefono a INATTIVO";} else - {EAactive_link = "Cambia il numero di telefono per ATTIVO";} + {EAactive_link = "Cambia il numero di telefono ad ATTIVO";} - document.getElementById("EAcommentsBoxB").innerHTML = "Attivo:" + EAalt_phone_active + "
" + EAactive_link; + document.getElementById("EAcommentsBoxB").innerHTML = "Attivo: " + EAalt_phone_active + "
" + EAactive_link; var xmlhttp=false; /*@cc_on @*/ @@ -6517,24 +6523,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('CBcommentsBox'); } if (dialed_label == 'ALT') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: ALT ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: ALT ";} if (dialed_label == 'ADDR3') - {document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: INDIRIZZO3 ";} + {document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: INDIRIZZO3 ";} var REGalt_dial = new RegExp("X","g"); if (dialed_label.match(REGalt_dial)) { - document.getElementById("CusTInfOSpaN").innerHTML = " ALT CHIAMA NUMERO: " + dialed_label + ""; + document.getElementById("CusTInfOSpaN").innerHTML = " NUMERO ALTERNATIVO: " + dialed_label + ""; document.getElementById("EAcommentsBoxA").innerHTML = "Codice e Numero di telefono: " + EAphone_code + " " + EAphone_number; var EAactive_link = ''; if (EAalt_phone_active == 'Y') - {EAactive_link = "Cambia il numero di telefono a INACTIVE";} + {EAactive_link = "Cambia il numero di telefono a INATTIVO";} else - {EAactive_link = "Cambia il numero di telefono per ATTIVO";} + {EAactive_link = "Cambia il numero di telefono ad ATTIVO";} - document.getElementById("EAcommentsBoxB").innerHTML = "Attivo:" + EAalt_phone_active + "
" + EAactive_link; - document.getElementById("EAcommentsBoxC").innerHTML = "Alt Conte:" + EAalt_phone_count; - document.getElementById("EAcommentsBoxD").innerHTML = "Note:" + EAalt_phone_notes; + document.getElementById("EAcommentsBoxB").innerHTML = "Attivo: " + EAalt_phone_active + "
" + EAactive_link; + document.getElementById("EAcommentsBoxC").innerHTML = "Conteggio Num Alt: " + EAalt_phone_count; + document.getElementById("EAcommentsBoxD").innerHTML = "Note: " + EAalt_phone_notes; showDiv('EAcommentsBox'); } @@ -6567,7 +6573,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (quick_transfer_button == 'IN_GROUP') { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } if (prepopulate_transfer_preset_enabled > 0) { @@ -6584,7 +6590,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; if (quick_transfer_button == 'PRESET_1') {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} @@ -7458,7 +7464,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("VolumeDownSpan").innerHTML = ""; if (quick_transfer_button_enabled > 0) - {document.getElementById("QuickXfer").innerHTML = "\"QUICK";} + {document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO";} if (call_requeue_button > 0) { @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -7806,7 +7812,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI ESSERE IN PAUSA PER INSERIRE UN CODICE PAUSA IN MODALITA` AUTODIAL"); + alert("DEVI ESSERE IN PAUSA PER INSERIRE UN CODICE PAUSA IN MODALITà AUTODIAL"); } else { @@ -8021,13 +8027,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} manual_dial_finished(); } document.getElementById("GENDERhideFORieALT").innerHTML = ''; - document.getElementById("GENDERhideFORie").innerHTML = ''; + document.getElementById("GENDERhideFORie").innerHTML = ''; hideDiv('DispoSelectBox'); hideDiv('DispoButtonHideA'); hideDiv('DispoButtonHideB'); hideDiv('DispoButtonHideC'); document.getElementById("DispoSelectBox").style.top = 1; - document.getElementById("DispoSelectMaxMin").innerHTML = " minimizza "; + document.getElementById("DispoSelectMaxMin").innerHTML = " riduci "; document.getElementById("DispoSelectHAspan").innerHTML = "Aggancia di nuovo"; CBcommentsBoxhide(); @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -8324,7 +8329,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { VU_agent_choose_ingroups_DV = "MGRLOCK"; - var live_CSC_HTML = "Managerhas selected groups for you
"; + var live_CSC_HTML = "Manager has selected groups for you
"; document.vicidial_form.CloserSelectList.value = ''; document.getElementById("CloserSelectContent").innerHTML = live_CSC_HTML; } @@ -8477,7 +8482,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { agent_select_territories = "MGRLOCK"; - var live_TERR_HTML = "Managerhas selected territories for you
"; + var live_TERR_HTML = "Manager has selected territories for you
"; document.vicidial_form.TerritorySelectList.value = ''; document.getElementById("TerritorySelectContent").innerHTML = live_TERR_HTML; } @@ -8626,12 +8631,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function LogouT(tempreason) { if (MD_channel_look==1) - {alert("Non puoi disconnetterti durante un tentativo di chiamata. \nAttende 50 secondi prima di fallire se non c`e` risposta");} + {alert("Non puoi disconnetterti durante un tentativo di chiamata. \nAttende 50 secondi prima di fallire se non c`è risposta");} else { if (VD_live_customer_call==1) { - alert("LA CHIAMATA IN CORSO E' ANCORA ATTIVA! Riaggancia e quindi puoi disconnetterti.\n" + VD_live_customer_call); + alert("LA CHIAMATA IN CORSO E` ANCORA ATTIVA! Riaggancia e quindi puoi disconnetterti.\n" + VD_live_customer_call); } else { @@ -8674,7 +8679,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('LogouTBox'); var logout_content=''; if (tempreason=='SHIFT') - {logout_content='Il tuo Shift è finita o è cambiato, è stato disconnesso dal tuo sessione

';} + {logout_content='Il tuo turno è finito o è cambiato, sei stato disconnesso dalla tua sessione

';} document.getElementById("LogouTBoxLink").innerHTML = logout_content + "FAI CLICK QUI PER AUTENTICARTI DI NUOVO\n"; @@ -9257,7 +9262,7 @@ function phone_number_format(formatphone) { { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI ESSERE IN PAUSA PER CHIAMATE GRAB IN CODA"); + alert("DEVI ESSERE IN PAUSA PER RECUPERARE LE CHIAMATE IN CODA"); } else { @@ -9479,7 +9484,7 @@ function phone_number_format(formatphone) { function DispoMaximize() { document.getElementById("DispoSelectBox").style.top = 1; - document.getElementById("DispoSelectMaxMin").innerHTML = " minimizza "; + document.getElementById("DispoSelectMaxMin").innerHTML = " riduci "; hideDiv('DispoButtonHideA'); hideDiv('DispoButtonHideB'); hideDiv('DispoButtonHideC'); @@ -9498,7 +9503,7 @@ function phone_number_format(formatphone) { { if (manager_ingroups_set > 0) { - alert("Manager" + external_igb_set_name + " ha selezionato il vostro in-selezioni per il gruppo"); + alert("Manager " + external_igb_set_name + " ha selezionato le tue scelte per i gruppi inbound"); } else { @@ -9674,7 +9679,7 @@ else { if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') ) { - document.getElementById("TimerContentSpan").innerHTML = "TIMER NOTIFICA: " + timer_action_seconds + " secondi

" + timer_action_message + "
"; + document.getElementById("TimerContentSpan").innerHTML = "NOTIFICA TIMER: " + timer_action_seconds + " secondi

" + timer_action_message + "
"; showDiv('TimerSpan'); } @@ -9801,7 +9806,7 @@ else document.getElementById("sessionIDspan").innerHTML = session_id; if ( (LIVE_campaign_recording == 'NEVER') || (LIVE_campaign_recording == 'ALLFORCE') ) { - document.getElementById("RecorDControl").innerHTML = "\"Start"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } if (INgroupCOUNT > 0) { @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Utentes&action=Authenticate&return_module=Utentes&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); @@ -9882,7 +9887,7 @@ else } CustomerData_update(); document.getElementById("GENDERhideFORie").innerHTML = ''; - document.getElementById("GENDERhideFORieALT").innerHTML = ''; + document.getElementById("GENDERhideFORieALT").innerHTML = ''; showDiv('DispoSelectBox'); DispoSelectContent_create('','ReSET'); WaitingForNextStep=1; @@ -10295,7 +10300,7 @@ else document.getElementById(divvar).innerHTML = ''; if (divvar == 'DiaLLeaDPrevieW') { - var buildDivHTML = " LEAD PREVIEW
"; + var buildDivHTML = " ANTEPRIMA CLIENTE
"; document.getElementById("DiaLLeaDPrevieWHide").innerHTML = buildDivHTML; } if (divvar == 'DiaLDiaLAltPhonE') @@ -10315,7 +10320,7 @@ else if (divvar == 'DiaLLeaDPrevieW') { document.getElementById("DiaLLeaDPrevieWHide").innerHTML = ''; - var buildDivHTML = " LEAD PREVIEW
"; + var buildDivHTML = " ANTEPRIMA CLIENTE
"; document.getElementById(divvar).innerHTML = buildDivHTML; if (reselect_preview_dial==1) {document.vicidial_form.LeadPreview.checked=true} @@ -10382,7 +10387,7 @@ else showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Trasferimento"; if (quick_transfer_button_enabled > 0) - {document.getElementById("QuickXfer").innerHTML = "\"QUICK";} + {document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO";} } else { @@ -10394,11 +10399,11 @@ else if (quick_transfer_button == 'IN_GROUP') { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { - document.getElementById("QuickXfer").innerHTML = "\"QUICK"; + document.getElementById("QuickXfer").innerHTML = "\"TRASFERIMENTO"; } } } @@ -10494,7 +10499,7 @@ else var genderValue = document.getElementById('gender_list').options[genderIndex].value; if (genderValue == 'M') {var gIndex = 1;} if (genderValue == 'F') {var gIndex = 2;} - document.getElementById("GENDERhideFORieALT").innerHTML = ''; + document.getElementById("GENDERhideFORieALT").innerHTML = ''; document.getElementById("GENDERhideFORie").innerHTML = ''; document.getElementById("gender_list").selectedIndex = gIndex; } @@ -10506,7 +10511,7 @@ else var genderValue = document.getElementById('gender_list').options[genderIndex].value; if (genderValue == 'M') {var gIndex = 1;} if (genderValue == 'F') {var gIndex = 2;} - document.getElementById("GENDERhideFORie").innerHTML = ''; + document.getElementById("GENDERhideFORie").innerHTML = ''; document.getElementById("GENDERhideFORieALT").innerHTML = ''; document.getElementById("gender_list").selectedIndex = gIndex; } @@ -10585,7 +10590,7 @@ echo "\n"; -X CHIAMATABACK ATTIVE
+X RICHIAMI ATTIVI
@@ -10610,7 +10615,7 @@ echo "\n"; - height=460>
RICHIAMI PER L`OPERATORE :
Selezionare una callback per chiamare il cliente ora. Una volta fatto click, il record sara` rimosso dalla lista. + height=460> - + -
RICHIAMI PER L`OPERATORE :
Selezionare un richiamo per chiamare il cliente ora. Una volta fatto click, il record sarà rimosso dalla lista.

  @@ -10626,7 +10631,7 @@ echo "\n"; \n"; + echo "Nota: prefisso di chiamata $dial_prefix sarà aggiunto all`inizio di questo numero
\n"; } ?> Nota: tutti i nuovi contatti chiamati manualmente andranno nella lista

@@ -10640,7 +10645,7 @@ echo "\n";
Cerca Contatti esistenti:   (Questa opzione tentera` di trovare il numero di telefono nel sistema prima di inserire un nuovo contatto)  (Questa opzione tenterà di trovare il numero di telefono nel sistema prima di inserire un nuovo contatto)
@@ -10650,13 +10655,13 @@ echo "\n";

If you want to dial a number and have it NOT be added as a new lead, enter in the exact dialstring that you want to call in the Chiamata automatica field below. To hangup this call you will have to open the CHIAMATAS IN THIS SESSION link at the bottom of the screen and hang it up by clicking su its channel link there.
 
Chiamata automatica:   (solo digit per favore) +   (solo cifre per favore)

Chiama Ora                 - Anteprima invito + Anteprima Chiamata                 Torna Indietro
@@ -10770,10 +10775,10 @@ if ($view_calls_in_queue > 0)
  -Altri agenti Stato:  
 
+Stato Altri Operatori:  
 
-Agenti di trasferimento disponibili:
+Trasferimento Operatori Disponibili:
Agents View +
@@ -10800,7 +10805,7 @@ if ($agent_display_dialable_leads > 0) height=70> + Se attivo, premi il tasto corrispondente all`esito desiderato e la chiamata sarà riagganciata automaticamente: @@ -10833,8 +10838,8 @@ if ($agent_display_dialable_leads > 0)
Tasti Funzione per Esiti: - Se attivo, premi il tasto corrispondente all`esito desiderato e la chiamata sara` riagganciata automaticamente:
height=70> - - + +
Estensione Alt Telefono informazioni: minimizza Informazioni Estese Numero Alternativo: riduci

@@ -10855,7 +10860,7 @@ if ($agent_display_dialable_leads > 0) - height=500>
Non c'è nessuno nella tua sessione:
+ height=500>
Non c`è nessuno nella tua sessione:
Torna Indietro

Chiama l`operatore di nuovo @@ -10871,7 +10876,7 @@ if ($agent_display_dialable_leads > 0) - height=550>
Call Wrapup: secondi di riposo restanti

+ height=550>
Riposo prima della prossima chiamata: secondi di riposo restanti



Termina riposo e continua @@ -10881,17 +10886,17 @@ if ($agent_display_dialable_leads > 0)



- Chiudi Message + Chiudi Messaggio
- height=500>
La tua sessione e` stata disabilitata
LOGOUT

Torna Indietro + height=500>
La tua sessione è stata disabilitata
LOGOUT

Torna Indietro
- height=500>
Cè un problema di sincronizzazione con il tempo il vostro sistema, si prega di informare lamministratore di sistema


Torna Indietro + height=500>
C`è un problema di sincronizzazione con il sistema, si prega di informare l`amministratore di sistema


Torna Indietro
@@ -10912,7 +10917,7 @@ if ($agent_display_dialable_leads > 0) - height=460>
ESITO CHIAMATA :       Aggancia di nuovo       minimizza
+ height=460> - + @@ -11180,7 +11185,7 @@ if ($call_requeue_button > 0) - +
ESITO CHIAMATA :       Aggancia di nuovo       riduci
Selezione Esito di fine chiamata
PAUSA OPERATORE
@@ -10934,7 +10939,7 @@ if ($agent_display_dialable_leads > 0) height=460>
SCEGLI UN GRUPPO ALIAS :
- Gruppo Alias selezione + Selezione Gruppo Alias

 
@@ -10986,7 +10991,7 @@ if ($agent_display_dialable_leads > 0)  
CHIAMATABACK PERSONALE (nessun altro potra` richiamarlo)
";} + {echo " RICHIAMO PERSONALE
";} ?> Note Richiamo:

@@ -11030,7 +11035,7 @@ if ($agent_display_dialable_leads > 0) Canale CHIAMATABACK PERSONALE (nessun altro potra` richiamarlo)
";} + {echo " RICHIAMO PERSONALE
";} if ( ($outbound_autodial_active < 1) or ($disable_blended_checkbox > 0) or ($dial_method == 'INBOUND_MAN') ) {echo " CHIAMATA MISTA
";} ?> @@ -11084,13 +11089,13 @@ else
Chiama il prossimo numero
- LEAD PREVIEW
+ ANTEPRIMA CLIENTE
CHIAMA ALT NUM
-Start Registrazione
+Inizia Registrazione

Web Form
0)
Indirizzo3:
Citta`: Città: Stato: Vendor ID: Sesso:
Telefono: diff --git a/agc_2-X/trunk/LANG_www/agc_it/voicemail_check.php b/agc_2-X/trunk/LANG_www/agc_it/voicemail_check.php index e30cc236..471220a6 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/voicemail_check.php +++ b/agc_2-X/trunk/LANG_www/agc_it/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Utentename/Password non validi: |$user|$pass|\n"; + echo "Username/Password non validi: |$user|$pass|\n"; exit; } else @@ -108,7 +108,7 @@ echo " if (strlen($vmail_box)<1) { $channel_live=0; - echo "Casella Voicemail $vmail_box non e` valido\n"; + echo "Casella Voicemail $vmail_box non è valido\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_nl/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_nl/astguiclient.php index eb360da4..7fe83c08 100644 --- a/agc_2-X/trunk/LANG_www/agc_nl/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_nl/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "astGUIclient web client: Inloggen\n"; + echo "astGUIclient web client: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_nl/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_nl/vdc_db_query.php index 8af3097d..87e8ca5a 100644 --- a/agc_2-X/trunk/LANG_www/agc_nl/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_nl/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_nl/vicidial.php b/agc_2-X/trunk/LANG_www/agc_nl/vicidial.php index fdecc617..d5665725 100644 --- a/agc_2-X/trunk/LANG_www/agc_nl/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_nl/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Inloggen\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo " Tijdklok
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeGebruiker; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Doorgaan\"
\"Bel"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Gebruikers&action=Authenticate&return_module=Gebruikers&return_action=Inloggen&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php index 148a3715..db43e55b 100644 --- a/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php b/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php index ca2f9ef7..19c35aa9 100644 --- a/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUżytkownik; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Ponów\"
\"Wybierz"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Użytkowniks&action=Authenticate&return_module=Użytkowniks&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_pt/active_list_refresh.php b/agc_2-X/trunk/LANG_www/agc_pt/active_list_refresh.php index 59b162f7..9f32075b 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/active_list_refresh.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_pt/astguiclient.php index c3a1a4e0..3cb5f3fa 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web client astGUIclient: Início de uma sessão\n"; + echo "web client astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_pt/call_log_display.php b/agc_2-X/trunk/LANG_www/agc_pt/call_log_display.php index 4160a7d4..80123be8 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/call_log_display.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php index ac6f93f0..56f1da42 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/inbound_popup.php b/agc_2-X/trunk/LANG_www/agc_pt/inbound_popup.php index fcd7fd48..54fb3445 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/inbound_popup.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/live_exten_check.php b/agc_2-X/trunk/LANG_www/agc_pt/live_exten_check.php index 8af6fd7b..b6024856 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/live_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php b/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php index 5c82b78f..c66c5512 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/park_calls_display.php b/agc_2-X/trunk/LANG_www/agc_pt/park_calls_display.php index 42e595af..2e9d97f7 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/park_calls_display.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php index 6d20c575..9eb3ad47 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php b/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php index 16d7e9e6..6339d8e2 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Início de uma sessão\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUsuário; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Resumo\"
\"Número"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Usuários&action=Authenticate&return_module=Usuários&return_action=Início de uma sessão&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_pt/voicemail_check.php b/agc_2-X/trunk/LANG_www/agc_pt/voicemail_check.php index 3c9455f2..d517e396 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/voicemail_check.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; + echo "Inválido Username/Senha: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/active_list_refresh.php b/agc_2-X/trunk/LANG_www/agc_ru/active_list_refresh.php index 482e4c83..3279f941 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/active_list_refresh.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_ru/astguiclient.php index 12927b44..155c8d83 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web-клиент astGUIclient: Логин\n"; + echo "web-клиент astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_ru/call_log_display.php b/agc_2-X/trunk/LANG_www/agc_ru/call_log_display.php index ff70ef0f..9bb169dd 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/call_log_display.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_ru/conf_exten_check.php index 2029f8a5..523cfec1 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/inbound_popup.php b/agc_2-X/trunk/LANG_www/agc_ru/inbound_popup.php index 8846450b..cb539374 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/inbound_popup.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/live_exten_check.php b/agc_2-X/trunk/LANG_www/agc_ru/live_exten_check.php index c855647b..f66f2252 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/live_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/manager_send.php b/agc_2-X/trunk/LANG_www/agc_ru/manager_send.php index 843a5654..2f5829e0 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/park_calls_display.php b/agc_2-X/trunk/LANG_www/agc_ru/park_calls_display.php index 056fd3a8..33e44d5f 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/park_calls_display.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_ru/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_ru/vdc_db_query.php index 84c137d2..9d5d3e3a 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_ru/vicidial.php b/agc_2-X/trunk/LANG_www/agc_ru/vicidial.php index 4f74ef96..157673aa 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -657,7 +658,7 @@ else if ($relogin == 'YES') { -echo "Agent web client: Re-Логин\n"; +echo "Agent web client: Re-Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -670,7 +671,7 @@ echo "\n"; echo "\n"; echo "


"; echo ""; -echo ""; +echo ""; echo "\n"; echo "\n"; echo ""; @@ -743,7 +744,7 @@ echo "
Re-Логин Re-Login
 
Логин Телефона: Agent web client: Логин\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeПользователь; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Резюме\"
\"Набрать"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Пользовательs&action=Authenticate&return_module=Пользовательs&return_action=Логин&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_ru/voicemail_check.php b/agc_2-X/trunk/LANG_www/agc_ru/voicemail_check.php index 8d28dba3..08966144 100644 --- a/agc_2-X/trunk/LANG_www/agc_ru/voicemail_check.php +++ b/agc_2-X/trunk/LANG_www/agc_ru/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Недопустимо Пользовательname/Пароль: |$user|$pass|\n"; + echo "Недопустимо Username/Пароль: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_sk/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_sk/astguiclient.php index a97c57ea..14efa80b 100644 --- a/agc_2-X/trunk/LANG_www/agc_sk/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_sk/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "web klient astGUIclient: Prihlásiť\n"; + echo "web klient astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_sk/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_sk/vdc_db_query.php index f628d84b..122b6411 100644 --- a/agc_2-X/trunk/LANG_www/agc_sk/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_sk/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_sk/vicidial.php b/agc_2-X/trunk/LANG_www/agc_sk/vicidial.php index d59cfccb..9868cff1 100644 --- a/agc_2-X/trunk/LANG_www/agc_sk/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_sk/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "
Agent web client: Prihlásiť\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo "Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChangeUžívateľ; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"Pokračovať\"
\"Volať"; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=Užívateľs&action=Authenticate&return_module=Užívateľs&return_action=Prihlásiť&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_tw/active_list_refresh.php b/agc_2-X/trunk/LANG_www/agc_tw/active_list_refresh.php index 49075a18..59a82090 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/active_list_refresh.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/active_list_refresh.php @@ -126,7 +126,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/astguiclient.php b/agc_2-X/trunk/LANG_www/agc_tw/astguiclient.php index e88babc5..8eb6e941 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/astguiclient.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/astguiclient.php @@ -145,7 +145,7 @@ if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) { header ("Content-type: text/html; charset=utf-8"); - echo "astGUIclient web client: 登入\n"; + echo "astGUIclient web client: Login\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/LANG_www/agc_tw/call_log_display.php b/agc_2-X/trunk/LANG_www/agc_tw/call_log_display.php index 0a094c6e..209df112 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/call_log_display.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/call_log_display.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_tw/conf_exten_check.php index fa32043a..77772f60 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/conf_exten_check.php @@ -137,7 +137,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/inbound_popup.php b/agc_2-X/trunk/LANG_www/agc_tw/inbound_popup.php index 9f4f3425..007e2990 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/inbound_popup.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/inbound_popup.php @@ -86,7 +86,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/live_exten_check.php b/agc_2-X/trunk/LANG_www/agc_tw/live_exten_check.php index 9a3066cb..55b9134a 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/live_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/live_exten_check.php @@ -75,7 +75,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/manager_send.php b/agc_2-X/trunk/LANG_www/agc_tw/manager_send.php index 6672ea14..c332817c 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/manager_send.php @@ -239,7 +239,7 @@ $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/park_calls_display.php b/agc_2-X/trunk/LANG_www/agc_tw/park_calls_display.php index d3bee36d..804e8b8e 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/park_calls_display.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/park_calls_display.php @@ -65,7 +65,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/agc_tw/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_tw/vdc_db_query.php index 1e3c904f..0f7dde3c 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/vdc_db_query.php @@ -231,10 +231,11 @@ # 100109-0745 - Added alt_num_status for ALTNUM dialing status # 100109-1336 - Fixed Manual dial live call detection # 100113-1949 - Fixed dispo_choice bug and added dispo_status to dispo URL call +# 100202-2306 - Fixed logging issues related to INBOUND_MAN dial_method # -$version = '2.2.0-139'; -$build = '100113-1949'; +$version = '2.2.0-140'; +$build = '100202-2306'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=300; $one_mysql_log=0; @@ -430,6 +431,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); $MT[0]=''; $agents='@agents'; +$US='_'; ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### @@ -485,7 +487,7 @@ else if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else @@ -1855,6 +1857,28 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00036',$user,$server_ip,$session_name,$one_mysql_log);} + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -2262,6 +2286,28 @@ if ($ACTION == 'manDiaLonly') echo "$MqueryCID\n"; + #### update vicidial_agent_log if not MANUAL dial_method + if ($dial_method != 'MANUAL') + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + } + if ($agent_dialed_number > 0) { $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','$RAWaccount')"; @@ -4568,8 +4614,8 @@ if ($ACTION == 'userLOGout') $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { - $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); + $agent_log_id = $row[5]; $pause_sec = (($StarTtime - $row[0]) + $row[1]); $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; diff --git a/agc_2-X/trunk/LANG_www/agc_tw/vicidial.php b/agc_2-X/trunk/LANG_www/agc_tw/vicidial.php index dd858e9c..cc576a53 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/vicidial.php @@ -272,10 +272,11 @@ # 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting # 100109-1338 - Fixed Manual dial live call detection # 100116-0709 - Added presets to script and web form variables +# 100203-0640 - Fixed logging issues related to INBOUND_MAN dial method # -$version = '2.2.0-250'; -$build = '100116-0709'; +$version = '2.2.0-251'; +$build = '100203-0640'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -743,7 +744,7 @@ echo "\\n\";"; - } - $e++; - } - } - else - { - if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/) - { - $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/ILPA/g; + $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/ILPV/g; $e=0; $gif = '.gif'; foreach(@lang_link_list) @@ -357,67 +343,89 @@ foreach(@lang_list) $lang_list_name = $lang_list_detail[1]; if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';} else {$list_bgcolor = '';} - $file[$LINESct] .= "echo \"\\n\";"; + if ($file_name =~ /admin/) {$link_file_name = 'admin.php';} + else {$link_file_name = $file_name;} + $file[$LINESct] .= "echo \"\\n\";"; } $e++; } } else { - if ( ($lang_abb =~ /^en/) && ($Tct > 2) ) + if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/) { - $file[$LINESct] =~ s/\.\/images\//\.\.\/agc\/images\//g; - $file[$LINESct] =~ s/\"help.gif/\"..\/astguiclient\/help.gif/g; - $phrase_found_counter++; + $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/ILPA/g; + $e=0; + $gif = '.gif'; + foreach(@lang_link_list) + { + if (length($lang_link_list[$e]) > 2) + { + @lang_list_detail = split(/-/, $lang_link_list[$e]); + $lang_list_abb = $lang_list_detail[0]; + $lang_list_name = $lang_list_detail[1]; + if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';} + else {$list_bgcolor = '';} + $file[$LINESct] .= "echo \"\\n\";"; + } + $e++; + } } - if ($lang_abb !~ /^en/) + else { - $file[$LINESct] =~ s/$ORIGtext/$TRANStext/g; - $phrase_found_counter++; + if ( ($lang_abb =~ /^en/) && ($Tct > 2) ) + { + $file[$LINESct] =~ s/\.\/images\//\.\.\/agc\/images\//g; + $file[$LINESct] =~ s/\"help.gif/\"..\/astguiclient\/help.gif/g; + $phrase_found_counter++; + } + if ($lang_abb !~ /^en/) + { + $file[$LINESct] =~ s/$ORIGtext/$TRANStext/g; + $phrase_found_counter++; + } } } } + + if ($phrase_found_counter < 1) + { + open(ERRout, ">>$LANG_FILE_ERROR") + || die "Can't open $LANG_FILE_ERROR: $!\n"; + print ERRout "|$ORIGtext|\n"; + close(ERRout); + } + + $LINESct++; + + if ($a =~ /00000$/i) {print "$a $file[$LINESct]\n|$ORIGtext|$TRANStext|";} + $a++; } - - if ($phrase_found_counter < 1) - { - open(ERRout, ">>$LANG_FILE_ERROR") - || die "Can't open $LANG_FILE_ERROR: $!\n"; - print ERRout "|$ORIGtext|\n"; - close(ERRout); - } - - $LINESct++; - - if ($a =~ /00000$/i) {print "$a $file[$LINESct]\n|$ORIGtext|$TRANStext|";} - $a++; + $Tct++; } - $Tct++; } + ### open the translation result file for writing ### + open(out, ">$webroot/$file_path$US$lang_abb/$file_name") + || die "Can't open $webroot/$file_path$US$lang_abb/$file_name: $!\n"; + # print out "Header(\"Content-type: text/html; charset=utf-8\");\n"; + $LINESct=0; + foreach(@file) + { + print out "$file[$LINESct]"; + $LINESct++; + } + close(out); + print "\n"; + print "File Written: $webroot/$file_path$US$lang_abb/$file_name\n"; } - ### open the translation result file for writing ### - open(out, ">$webroot/$file_path$US$lang_abb/$file_name") - || die "Can't open $webroot/$file_path$US$lang_abb/$file_name: $!\n"; - # print out "Header(\"Content-type: text/html; charset=utf-8\");\n"; - $LINESct=0; - foreach(@file) + else { - print out "$file[$LINESct]"; - $LINESct++; + print "File does not exist: $webroot/$file_path/$file_name\n"; } - close(out); - print "\n"; - print "File Written: $webroot/$file_path$US$lang_abb/$file_name\n"; + $Fct++; } - else - { - print "File does not exist: $webroot/$file_path/$file_name\n"; - } - $Fct++; } } + $i++; } - $i++; } - -} \ No newline at end of file
Agent web client: 登入\n"; + echo "Agent web client: Login\n"; echo "\n"; echo "\n"; echo " Timeclock
\n"; @@ -3509,7 +3510,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (InGroupChange > 0) { var external_blended = InGroupChangeBlend; - var external_igb_set_user = InGroupChange使用者; + var external_igb_set_user = InGroupChangeUser; external_igb_set_name = InGroupChangeName; manager_ingroups_set=1; @@ -5129,9 +5130,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { auto_dial_level=0; - agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); + if (VDRP_stage != 'PAUSED') + { + agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','',"DIALNEXT"); - PauseCodeSelect_submit("NXDIAL"); + PauseCodeSelect_submit("NXDIAL"); + } + else + {auto_dial_level=starting_dial_level;} document.getElementById("DiaLControl").innerHTML = "\"\"恢復\"
\"撥下一個號碼\""; } @@ -5182,7 +5188,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method; // alert(manual_dial_filter + "\n" +manDiaLnext_query); xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); @@ -5890,7 +5896,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {var call_prefix = dial_prefix;} - manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type; + manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLonly_query); @@ -7467,7 +7473,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.custdatetime.value = ''; - if (auto_dial_level == 0) + if ( (auto_dial_level == 0) && (dial_method != 'INBOUND_MAN') ) { if (document.vicidial_form.DiaLAltPhonE.checked==true) { @@ -8231,7 +8237,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function NoneInSession() { showDiv('NoneInSessionBox'); - document.getElementById("NoneInSessionID").innerHTML = session_id; WaitingForNextStep=1; } @@ -9839,11 +9844,11 @@ else } if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) ) { - document.getElementById("ScriptContents").innerHTML = " "; + document.getElementById("ScriptContents").innerHTML = " "; } if ( (VtigeRLogiNScripT == 'NEW_WINDOW') && (VtigeREnableD > 0) ) { - var VtigeRall = VtigeRurl + "/index.php?module=使用者s&action=Authenticate&return_module=使用者s&return_action=登入&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; + var VtigeRall = VtigeRurl + "/index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us"; VtigeRwin =window.open(VtigeRall, web_form_target,'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); diff --git a/agc_2-X/trunk/LANG_www/agc_tw/voicemail_check.php b/agc_2-X/trunk/LANG_www/agc_tw/voicemail_check.php index 8a289064..f3892742 100644 --- a/agc_2-X/trunk/LANG_www/agc_tw/voicemail_check.php +++ b/agc_2-X/trunk/LANG_www/agc_tw/voicemail_check.php @@ -62,7 +62,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "無效 使用者name/密碼: |$user|$pass|\n"; + echo "無效 Username/密碼: |$user|$pass|\n"; exit; } else diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php index 51c35cc8..15819d7a 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "----------AUTO-DIAL KEINE ANTWORTEN\n"; + $OUToutput .= "---------- NO ANTWORTS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Durchschnittliche Anruf-Länge für Na benennt in den Sekunden: $average_na_seconds\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_days_detail.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_days_detail.php index aaa22cb5..77c9e9c9 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_days_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_performance_detail.php index cb08d70d..ba8de7b7 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_status_detail.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_status_detail.php index 0febd0b6..4b00fa19 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_status_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_detail.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/admin.php b/agc_2-X/trunk/LANG_www/vicidial_de/admin.php index 06129ac4..853103d6 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/admin.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/call_report_export.php b/agc_2-X/trunk/LANG_www/vicidial_de/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/call_report_export.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/list_download.php b/agc_2-X/trunk/LANG_www/vicidial_de/list_download.php index bf5b1e58..6d988fb0 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/list_download.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial_de/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_de/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial_de/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_de/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php index d1290697..ed71b514 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sonntag in October to First Sonntag in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sonntag in October and first Sonntag in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sonntag October to Third Sonntag March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sonntag in September to First Sonntag in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sonntag in September and first Sonntag in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # lokale Zeit calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sonntag October to Last Sonntag February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/non_agent_api.php b/agc_2-X/trunk/LANG_www/vicidial_de/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/non_agent_api.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php index 1c2bae33..d20d325d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "INBOUND/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE KAMPAGNE WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE KAMPAGNE WAIT (S) MITTEL(S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "MITTELACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD KAMPAGNE PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php index d562e759..eb623d65 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- ΜΗ ΑΠΑΝΤ ΑΥΤ ΚΛΗΣΕΙΣ\n"; + $OUToutput .= "---------- NO ΑΠΑΝΤΗΣΗS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Μέσος όρος σε δευτερόλεπτα για ΝΑ κλήσεις: $average_na_seconds\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_days_detail.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_days_detail.php index c43f6389..d7d0460e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_days_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_performance_detail.php index 31b72079..099a8905 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_status_detail.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_status_detail.php index 73a3a3df..856954c2 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_status_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_detail.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/admin.php b/agc_2-X/trunk/LANG_www/vicidial_el/admin.php index 1ea589bc..cd61ea68 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/admin.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6191,6 +6192,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6257,6 +6266,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6312,6 +6329,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7366,6 +7391,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20633,6 +20671,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -24016,7 +24067,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/call_report_export.php b/agc_2-X/trunk/LANG_www/vicidial_el/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/call_report_export.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php b/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php index dae8cc7a..dca45485 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php @@ -1,10 +1,10 @@ - LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # if ( file_exists("/etc/astguiclient.conf") ) { @@ -16,6 +16,8 @@ foreach ($DBCagc as $DBCline) {$PATHlogs = $DBCline; $PATHlogs = preg_replace("/.*=/","",$PATHlogs);} if (ereg("^PATHweb", $DBCline)) {$WeBServeRRooT = $DBCline; $WeBServeRRooT = preg_replace("/.*=/","",$WeBServeRRooT);} + if (ereg("^VARserver_ip", $DBCline)) + {$WEBserver_ip = $DBCline; $WEBserver_ip = preg_replace("/.*=/","",$WEBserver_ip);} if (ereg("^VARDB_server", $DBCline)) {$VARDB_server = $DBCline; $VARDB_server = preg_replace("/.*=/","",$VARDB_server);} if (ereg("^VARDB_database", $DBCline)) diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/list_download.php b/agc_2-X/trunk/LANG_www/vicidial_el/list_download.php index 6e7bbc86..8604d872 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/list_download.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial_el/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_el/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial_el/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_el/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php index 8f834971..019bddc3 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Κυριακή in October to First Κυριακή in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Κυριακή in October and first Κυριακή in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Κυριακή October to Third Κυριακή March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Κυριακή in September to First Κυριακή in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Κυριακή in September and first Κυριακή in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # τοπικός χρόνος calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Κυριακή October to Last Κυριακή February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/non_agent_api.php b/agc_2-X/trunk/LANG_www/vicidial_el/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/non_agent_api.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php index 0d0e7701..a5cef2d4 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "Εισερχόμενα/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ WAIT (S) ΧΕΙΡΙΣΤΗΣ(S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "ΧΕΙΡΙΣΤΗΣACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEADΕΚΣΤΡΑΤΕΙΑ PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php index 1074766b..8ecd4030 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- AUTO-DIAL SIN RESPUESTA\n"; + $OUToutput .= "---------- NO RESPUESTAS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Longitud media para las Llamadas sin Respuesta en segundos: $average_na_seconds\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_days_detail.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_days_detail.php index 7de56a11..912664a5 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_days_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_performance_detail.php index 6c7ab5c3..f383366e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_status_detail.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_status_detail.php index 8c911234..9bc7e7dd 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_status_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_detail.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/admin.php b/agc_2-X/trunk/LANG_www/vicidial_es/admin.php index c5b1d8fa..e9d1f0ff 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/admin.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/call_report_export.php b/agc_2-X/trunk/LANG_www/vicidial_es/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/call_report_export.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/list_download.php b/agc_2-X/trunk/LANG_www/vicidial_es/list_download.php index 98e1aea8..a0156bcf 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/list_download.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial_es/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_es/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial_es/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_es/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php index d53e77dd..9f797cd2 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Domingo in October to First Domingo in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Domingo in October and first Domingo in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Domingo October to Third Domingo March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Domingo in September to First Domingo in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Domingo in September and first Domingo in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # tiempo local calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Domingo October to Last Domingo February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/non_agent_api.php b/agc_2-X/trunk/LANG_www/vicidial_es/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/non_agent_api.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php index eb13efd1..32ebf789 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "Entrantes/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAÑA WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAÑA WAIT (S) AGENTE (S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "AGENTE ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD CAMPAÑA PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_VDADstats.php index d83d1a57..6e3b3441 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_VDADstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- APPELS AUTOMATIQUES SANS REPONSES\n"; + $OUToutput .= "---------- NO REPONSES\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls $NApercent%\n"; + $OUToutput .= "Total NA calls -Busy,Disconnect,RingNoAnswer: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Durée moyenne des appels pour les appels NA en secondes: $average_na_seconds\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_days_detail.php b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_days_detail.php index 11e2a7d2..53925f3e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_days_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_performance_detail.php index 0ebbbf24..84252b9e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_status_detail.php b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_status_detail.php index 389d0dfa..2b352039 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_status_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_time_detail.php b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_time_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/admin.php b/agc_2-X/trunk/LANG_www/vicidial_fr/admin.php index f260e66d..7871196d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/admin.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/call_report_export.php b/agc_2-X/trunk/LANG_www/vicidial_fr/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/call_report_export.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/list_download.php b/agc_2-X/trunk/LANG_www/vicidial_fr/list_download.php index 572bf79d..8dfb9682 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/list_download.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial_fr/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial_fr/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_fr/new_listloader_superL.php index 2b735e85..3d489dad 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Dimanche in October to First Dimanche in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Dimanche in October and first Dimanche in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Dimanche October to Third Dimanche March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Dimanche in September to First Dimanche in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Dimanche in September and first Dimanche in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # heure locale calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Dimanche October to Last Dimanche February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/non_agent_api.php b/agc_2-X/trunk/LANG_www/vicidial_fr/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/non_agent_api.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_fr/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_fr/user_stats.php index 01e28ae7..d32923d3 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_fr/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_fr/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "ENTRANT/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNE WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNE WAIT (S) AGENT (S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALS $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "AGENT ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD CAMPAGNE PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALS $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_it/AST_VDADstats.php index ec07840c..2ccf8241 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/AST_VDADstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 60619-1718 - Added variable filtering to eliminate SQL injection attack threat @@ -23,6 +23,7 @@ # 90806-0001 - Added CI(Customer Interaction/Human Answered) stats, added option to add inbound rollover stats to these # 90827-1154 - Added List ID breakdown of calls # 91222-0843 - Fixed ALL-CAMPAIGNS inbound rollover issue(bug #262), and some other bugs +# 100202-1034 - Added statuses to no-answer section # header ("Content-type: text/html; charset=utf-8"); @@ -625,19 +626,28 @@ else $OUToutput .= "\n"; - $OUToutput .= "---------- NESSUNA RISPOSTA AUTO-DIAL\n"; + $OUToutput .= "---------- NO RISPOSTAS\n"; - $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);"; + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('NA','ADC','AB','CPDB','CPDUK','CPDATB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDERR') and (length_in_sec <= 60 or length_in_sec is null);"; $rslt=mysql_query($stmt, $link); if ($DB) {$OUToutput .= "$stmt\n";} $row=mysql_fetch_row($rslt); + $autoNAcalls = sprintf("%10s", $row[0]); - $NAcalls = sprintf("%10s", $row[0]); - if ( ($NAcalls < 1) or ($TOTALcalls < 1) ) + $stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' $group_SQLand and status IN('B','DC','N') and (length_in_sec <= 60 or length_in_sec is null);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {$OUToutput .= "$stmt\n";} + $row=mysql_fetch_row($rslt); + $manualNAcalls = sprintf("%10s", $row[0]); + + $totalNAcalls = ($autoNAcalls + $manualNAcalls); + $totalNAcalls = sprintf("%10s", $totalNAcalls); + + if ( ($totalNAcalls < 1) or ($TOTALcalls < 1) ) {$NApercent = '0';} else { - $NApercent = (($NAcalls / $TOTALcalls) * 100); + $NApercent = (($totalNAcalls / $TOTALcalls) * 100); $NApercent = round($NApercent, 2); } @@ -650,7 +660,9 @@ else $average_na_seconds = sprintf("%10s", $average_na_seconds); } - $OUToutput .= "Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: $NAcalls $NApercent%\n"; + $OUToutput .= "Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: $totalNAcalls $NApercent%\n"; + $OUToutput .= "Total auto NA calls -system-set: $autoNAcalls\n"; + $OUToutput .= "Total manual NA calls -agent-set: $manualNAcalls\n"; $OUToutput .= "Durata Media Chiamate Senza Risposta in secondi: $average_na_seconds\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_days_detail.php b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_days_detail.php index 1266cccd..8650a7ce 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_days_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_days_detail.php @@ -268,14 +268,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEAD STATS BREAKDOWN:\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; - echo "| DATE | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| DATE | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+------------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "DATE,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "DATE,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } ### BEGIN loop through each user ### @@ -371,7 +371,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdate) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWcalls; @@ -391,7 +391,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWdate); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if ($file_download < 1) {echo "$Toutput";} @@ -409,11 +409,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_performance_detail.php index ea8b18f9..43dfd4df 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90523-0935 - Rewrite of seconds to minutes and hours conversion # 90717-1500 - Changed to be multi-campaign, multi-user-group select # 90908-1058 - Added DEAD time statistics +# 100203-1131 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -58,12 +59,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -78,7 +77,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -306,6 +305,9 @@ while ($i < $rows_to_print) $dispo_sec[$i] = $row[6]; $status[$i] = $row[7]; $dead_sec[$i] = $row[8]; + $customer_sec[$i] = ($talk_sec[$i] - $dead_sec[$i]); + if ($customer_sec[$i] < 1) + {$customer_sec[$i]=0;} if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) ) { $statusesTXT = sprintf("%8s", $status[$i]); @@ -326,10 +328,10 @@ while ($i < $rows_to_print) $i++; } -echo "CALL STATS BREAKDOWN:\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| USER NAME | ID | CALLS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "CALL STATS BREAKDOWN: (Statistics related to handling of calls only)\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| USER NAME | ID | LEADS | TIME | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG | CUSTOMER |CUSTAVG |$statusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; ### BEGIN loop through each user ### @@ -345,6 +347,7 @@ while ($m < $k) $Swait_sec=0; $Sdispo_sec=0; $Sdead_sec=0; + $Scustomer_sec=0; $SstatusesHTML=''; ### BEGIN loop through each status ### @@ -365,6 +368,7 @@ while ($m < $k) $Swait_sec = ($Swait_sec + $wait_sec[$i]); $Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]); $Sdead_sec = ($Sdead_sec + $dead_sec[$i]); + $Scustomer_sec = ($Scustomer_sec + $customer_sec[$i]); $SstatusTXT = sprintf("%8s", $calls[$i]); $SstatusesHTML .= " $SstatusTXT |"; $status_found++; @@ -387,6 +391,7 @@ while ($m < $k) $TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec); $TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec); $TOTtotDEAD=($TOTtotDEAD + $Sdead_sec); + $TOTtotCUSTOMER=($TOTtotCUSTOMER + $Scustomer_sec); $Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec); if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);} else {$Stalk_avg=0;} @@ -398,6 +403,8 @@ while ($m < $k) else {$Sdispo_avg=0;} if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);} else {$Sdead_avg=0;} + if ( ($Scalls > 0) and ($Scustomer_sec > 0) ) {$Scustomer_avg = ($Scustomer_sec/$Scalls);} + else {$Scustomer_avg=0;} $RAWuser = $Suser; $RAWcalls = $Scalls; @@ -429,6 +436,8 @@ while ($m < $k) $USERavgDISPO_MS = sec_convert($Sdispo_avg,'M'); $USERtotDEAD_MS = sec_convert($Sdead_sec,'H'); $USERavgDEAD_MS = sec_convert($Sdead_avg,'M'); + $USERtotCUSTOMER_MS = sec_convert($Scustomer_sec,'H'); + $USERavgCUSTOMER_MS = sec_convert($Scustomer_avg,'M'); $pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS); $pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS); @@ -441,19 +450,21 @@ while ($m < $k) $pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS); $pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS); $pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS); + $pfUSERtotCUSTOMER_MS = sprintf("%8s", $USERtotCUSTOMER_MS); + $pfUSERavgCUSTOMER_MS = sprintf("%6s", $USERavgCUSTOMER_MS); $PAUSEtotal[$m] = $pfUSERtotPAUSE_MS; - $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n"; + $Toutput = "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS | $pfUSERtotCUSTOMER_MS | $pfUSERavgCUSTOMER_MS |$SstatusesHTML\n"; $TOPsorted_output[$m] = $Toutput; if ($stage == 'ID') {$TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if ($stage == 'CALLS') + if ($stage == 'LEADS') {$TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} if ($stage == 'TIME') {$TOPsort[$m] = '' . sprintf("%08s", $Stime) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser);} - if (!ereg("ID|TIME|CALLS",$stage)) + if (!ereg("ID|TIME|LEADS",$stage)) {echo "$Toutput";} $m++; @@ -463,11 +474,11 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -if (ereg("ID|TIME|CALLS",$stage)) +if (ereg("ID|TIME|LEADS",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS",$stage)) + if (ereg("TIME|LEADS",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; @@ -531,6 +542,8 @@ if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';} else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);} if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';} else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);} +if ($TOTtotCUSTOMER < 1) {$TOTavgCUSTOMER = '0';} +else {$TOTavgCUSTOMER = ($TOTtotCUSTOMER / $TOTcalls);} $TOTtime_MS = sec_convert($TOTtime,'H'); $TOTtotTALK_MS = sec_convert($TOTtotTALK,'H'); @@ -538,11 +551,13 @@ $TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H'); $TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H'); $TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H'); $TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H'); +$TOTtotCUSTOMER_MS = sec_convert($TOTtotCUSTOMER,'H'); $TOTavgTALK_MS = sec_convert($TOTavgTALK,'M'); $TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H'); $TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H'); $TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H'); $TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H'); +$TOTavgCUSTOMER_MS = sec_convert($TOTavgCUSTOMER,'H'); $TOTtime_MS = sprintf("%10s", $TOTtime_MS); $TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS); @@ -550,11 +565,13 @@ $TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS); $TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS); $TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS); $TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS); +$TOTtotCUSTOMER_MS = sprintf("%10s", $TOTtotCUSTOMER_MS); $TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS); $TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS); $TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS); $TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS); $TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS); +$TOTavgCUSTOMER_MS = sprintf("%6s", $TOTavgCUSTOMER_MS); while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);} while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);} @@ -562,16 +579,18 @@ while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0 while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);} while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);} while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);} +while(strlen($TOTtotCUSTOMER_MS)>10) {$TOTtotCUSTOMER_MS = substr("$TOTtotCUSTOMER_MS", 0, -1);} while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);} while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);} while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);} while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);} while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);} +while(strlen($TOTavgCUSTOMER_MS)>6) {$TOTavgCUSTOMER_MS = substr("$TOTavgCUSTOMER_MS", 0, -1);} -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; -echo "| TOTALI AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n"; -echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; +echo "| TOTALI AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$TOTtotCUSTOMER_MS| $TOTavgCUSTOMER_MS |$SUMstatusesHTML\n"; +echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n"; echo "\n\n"; @@ -737,7 +756,7 @@ while ($m < $k) ### BEGIN sort through output to display properly ### -#if (ereg("ID|TIME|CALLS",$stage)) +#if (ereg("ID|TIME|LEADS",$stage)) # { # $n=0; # while ($n <= $m) diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_status_detail.php b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_status_detail.php index 2c8b8083..859e1413 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_status_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_status_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 90225-2252 - Added CSV download option # 90310-2030 - Admin header # 90508-0644 - Changed to PHP long tags +# 100119-0935 - Fixed bug 291 # @@ -314,14 +315,14 @@ else if ($file_download < 1) { - echo "CALL STATS BREAKDOWN:\n"; + echo "LEADS STATS BREAKDOWN:\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | CIcalls| DNC/CI%|$statusesHTML\n"; + echo "| USER NAME | ID | LEADS | CIcalls| DNC/CI%|$statusesHTML\n"; echo "+-----------------+----------+--------+--------+--------+$statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,CIcalls,DNC-CI%,$statusesFILE\n"; + $file_output .= "USER,ID,LEADS,CIcalls,DNC-CI%,$statusesFILE\n"; } @@ -372,6 +373,7 @@ else if ($status_found < 1) { $SstatusesHTML .= " 0 |"; + $SstatusesFILE .= "0,"; } ### END loop through each stat line ### $n++; @@ -431,7 +433,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -451,7 +453,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWdncPCT) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWdncPCT; } - if (!ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (!ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -467,11 +469,11 @@ else ### BEGIN sort through output to display properly ### - if (ereg("ID|TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("ID|TIME|LEADS|CI|DNCCI",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|CI|DNCCI",$stage)) + if (ereg("TIME|LEADS|CI|DNCCI",$stage)) {rsort($TOPsort, SORT_NUMERIC);} $m=0; diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_time_detail.php b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_time_detail.php index a98137e5..dbb85f42 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_time_detail.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/AST_agent_time_detail.php @@ -4,11 +4,12 @@ # Pulls time stats per agent selectable by campaign or user group # should be most accurate agent stats of all of the reports # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90522-0723 - First build # 90908-1103 - Added DEAD time stats +# 100203-1147 - Added CUSTOMER time statistics # require("dbconnect.php"); @@ -47,12 +48,10 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -67,7 +66,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); @@ -345,17 +344,20 @@ else $lead = $row[5]; $status = $row[6]; $dead = $row[7]; - if ($wait > 30000) {$wait=0;} if ($talk > 30000) {$talk=0;} if ($dispo > 30000) {$dispo=0;} if ($pause > 30000) {$pause=0;} if ($dead > 30000) {$dead=0;} + $customer = ($talk - $dead); + if ($customer < 1) + {$customer=0;} $TOTwait = ($TOTwait + $wait); $TOTtalk = ($TOTtalk + $talk); $TOTdispo = ($TOTdispo + $dispo); $TOTpause = ($TOTpause + $pause); $TOTdead = ($TOTdead + $dead); + $TOTcustomer = ($TOTcustomer + $customer); $TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;} @@ -377,6 +379,7 @@ else $Sdispo[$m] = ($Sdispo[$m] + $dispo); $Spause[$m] = ($Spause[$m] + $pause); $Sdead[$m] = ($Sdead[$m] + $dead); + $Scustomer[$m] = ($Scustomer[$m] + $customer); if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;} } $m++; @@ -390,6 +393,7 @@ else $Sdispo[$uc] = $dispo; $Spause[$uc] = $pause; $Sdead[$uc] = $dead; + $Scustomer[$uc] = $customer; if ($lead > 0) {$Scalls[$uc]++;} $uc++; } @@ -410,13 +414,13 @@ else if ($file_download < 1) { echo "AGENT TIME BREAKDOWN:\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| USER NAME | ID | CALLS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n"; - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| USER NAME | ID | LEADS | TIME CLOCK | AGENT TIME | WAIT | TALK | DISPO | PAUSE | DEAD | CUSTOMER | |$sub_statusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; } else { - $file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n"; + $file_output .= "USER,ID,LEADS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD,CUSTOMER$sub_statusesFILE\n"; } ##### END print the output to screen or put into file output variable @@ -445,6 +449,7 @@ else $Sdispo[$m]= sec_convert($Sdispo[$m],'H'); $Spause[$m]= sec_convert($Spause[$m],'H'); $Sdead[$m]= sec_convert($Sdead[$m],'H'); + $Scustomer[$m]= sec_convert($Scustomer[$m],'H'); $Stime[$m]= sec_convert($Stime[$m],'H'); $RAWtime = $Stime[$m]; @@ -453,6 +458,7 @@ else $RAWdispo = $Sdispo[$m]; $RAWpause = $Spause[$m]; $RAWdead = $Sdead[$m]; + $RAWcustomer = $Scustomer[$m]; $n=0; $user_name_found=0; @@ -547,6 +553,7 @@ else $Sdispo[$m]= sprintf("%10s", $Sdispo[$m]); $Spause[$m]= sprintf("%10s", $Spause[$m]); $Sdead[$m]= sprintf("%10s", $Sdead[$m]); + $Scustomer[$m]= sprintf("%10s", $Scustomer[$m]); $Scalls[$m]= sprintf("%8s", $Scalls[$m]); $Stime[$m]= sprintf("%10s", $Stime[$m]); @@ -568,11 +575,11 @@ else if ($file_download < 1) { - $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n"; + $Toutput = "| $Sname[$m] | $Suser[$m] | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | $Scustomer[$m] | |$SstatusesHTML\n"; } else { - $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n"; + $fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead,$RAWcustomer$SstatusesFILE\n"; } $TOPsorted_output[$m] = $Toutput; @@ -588,7 +595,7 @@ else $TOPsort[$m] = '' . sprintf("%08s", $RAWuser) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; } - if ($stage == 'CALLS') + if ($stage == 'LEADS') { $TOPsort[$m] = '' . sprintf("%08s", $RAWcalls) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWcalls; @@ -603,7 +610,7 @@ else $TOPsort[$m] = '' . sprintf("%010s", $RAWtimeTCsec) . '-----' . $m . '-----' . sprintf("%020s", $RAWuser); $TOPsortTALLY[$m]=$RAWtimeTCsec; } - if (!ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (!ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) if ($file_download < 1) {echo "$Toutput";} else @@ -620,15 +627,15 @@ else $TOT_AGENTS = sprintf("%4s", $m); $k=$m; - if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|
\n";} + if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTcustomer|$TOTALtime|$TOTcalls|$uc|
\n";} ### BEGIN sort through output to display properly ### - if (ereg("NAME|ID|TIME|CALLS|TCLOCK",$stage)) + if (ereg("NAME|ID|TIME|LEADS|TCLOCK",$stage)) { if (ereg("ID",$stage)) {sort($TOPsort, SORT_NUMERIC);} - if (ereg("TIME|CALLS|TCLOCK",$stage)) + if (ereg("TIME|LEADS|TCLOCK",$stage)) {rsort($TOPsort, SORT_NUMERIC);} if (ereg("NAME",$stage)) {rsort($TOPsort, SORT_STRING);} @@ -704,6 +711,7 @@ else $TOTdispo = sec_convert($TOTdispo,'H'); $TOTpause = sec_convert($TOTpause,'H'); $TOTdead = sec_convert($TOTdead,'H'); + $TOTcustomer = sec_convert($TOTcustomer,'H'); $TOTALtime = sec_convert($TOTALtime,'H'); $TOTtimeTC = sec_convert($TOTtimeTC,'H'); @@ -713,6 +721,7 @@ else $TOTdispo = sprintf("%11s", $TOTdispo); $TOTpause = sprintf("%11s", $TOTpause); $TOTdead = sprintf("%11s", $TOTdead); + $TOTcustomer = sprintf("%11s", $TOTcustomer); $TOTALtime = sprintf("%11s", $TOTALtime); $TOTtimeTC = sprintf("%11s", $TOTtimeTC); ###### END LAST LINE TOTALS FORMATTING ########## @@ -721,16 +730,16 @@ else if ($file_download < 1) { - echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; - echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n"; - echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; + echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead |$TOTcustomer | |$SUMstatusesHTML\n"; + echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n"; if ($AUTOLOGOUTflag > 0) {echo " * denotes AUTOLOGOUT from timeclock\n";} echo "\n\n"; } else { - $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n"; + $file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead,$TOTcustomer$SUMstatusesFILE\n"; } } diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/admin.php b/agc_2-X/trunk/LANG_www/vicidial_it/admin.php index 641f0af9..e32f1cb2 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/admin.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/admin.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # require("dbconnect.php"); @@ -2043,11 +2043,12 @@ else # 91228-1837 - Added timer action settings to in-groups and campaigns # 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # 100104-1454 - Fixed in-group/campaign copy duplication issue +# 100116-0718 - Added presets to script select list # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-233'; -$build = '100104-1454'; +$admin_version = '2.2.0-234'; +$build = '100116-0718'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6187,6 +6188,14 @@ if ($ADD==7111111) $user_custom_three = 'custom three'; $user_custom_four = 'custom four'; $user_custom_five = 'custom five'; + $preset_number_a = 'preset_a'; + $preset_number_b = 'preset_b'; + $preset_number_c = 'preset_c'; + $preset_number_d = 'preset_d'; + $preset_number_e = 'preset_e'; + $preset_number_f = 'preset_f'; + $preset_dtmf_a = 'preset_dtmf_a'; + $preset_dtmf_b = 'preset_dtmf_b'; echo "\n"; echo "\n"; @@ -6253,6 +6262,14 @@ if ($ADD==7111111) $user_custom_three = eregi_replace(' ','+',$user_custom_three); $user_custom_four = eregi_replace(' ','+',$user_custom_four); $user_custom_five = eregi_replace(' ','+',$user_custom_five); + $preset_number_a = eregi_replace(' ','+',$preset_number_a); + $preset_number_b = eregi_replace(' ','+',$preset_number_b); + $preset_number_c = eregi_replace(' ','+',$preset_number_c); + $preset_number_d = eregi_replace(' ','+',$preset_number_d); + $preset_number_e = eregi_replace(' ','+',$preset_number_e); + $preset_number_f = eregi_replace(' ','+',$preset_number_f); + $preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a); + $preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6308,6 +6325,14 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); + $script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text); + $script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text); + $script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text); + $script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text); + $script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text); + $script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text); + $script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -7362,6 +7387,19 @@ if ($ADD==1111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -20618,6 +20656,19 @@ if ($ADD==3111111) echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo ""; echo "
"; # END Insert Field @@ -23998,7 +24049,7 @@ if ($ADD==160000000000) $rslt=mysql_query($stmt, $link); $moh_to_print = mysql_num_rows($rslt); - echo "
TEXT-TO-SPEECH(TTS) LISTINGS:\n"; + echo "
MUSIC-ON-HOLD(MOH) LISTINGS:\n"; echo "
\n"; echo ""; echo ""; diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/call_report_export.php b/agc_2-X/trunk/LANG_www/vicidial_it/call_report_export.php index 77a49b05..3b032c1d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/call_report_export.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/call_report_export.php @@ -5,7 +5,7 @@ # and/or vicidial_closer_log information by status, list_id and date range. # downloads to a flat text file that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -14,6 +14,7 @@ # 90508-0644 - Changed to PHP long tags # 90721-1137 - Added rank and owner as vicidial_list fields # 91121-0253 - Added list name, list description and status name +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -60,8 +61,8 @@ if ($qm_conf_ct > 0) ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; if ($DB) {echo "|$stmt|\n";} @@ -70,7 +71,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -215,7 +216,7 @@ if ($run_export > 0) $k=0; if ($RUNcampaign > 0) { - $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $outbound_to_print = mysql_num_rows($rslt); @@ -231,9 +232,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; $outbound_calls++; @@ -243,7 +246,7 @@ if ($run_export > 0) if ($RUNgroup > 0) { - $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner,vi.lead_id from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; $rslt=mysql_query($stmtA, $link); if ($DB) {echo "$stmt\n";} $inbound_to_print = mysql_num_rows($rslt); @@ -259,9 +262,11 @@ if ($run_export > 0) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + $export_status[$k] = $row[2]; $export_list_id[$k] = $row[8]; - $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t"; + $export_rows[$k] = "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\t$row[35]\t"; $i++; $k++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/list_download.php b/agc_2-X/trunk/LANG_www/vicidial_it/list_download.php index 9914d2b2..c9115190 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/list_download.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/list_download.php @@ -4,13 +4,14 @@ # downloads the entire contents of a vicidial list ID to a flat text file # that is tab delimited # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 90209-1310 - First build # 90508-0644 - Changed to PHP long tags # 90721-1238 - Added rank and owner as vicidial_list fields +# 100119-1039 - Filtered comments for \n newlines # require("dbconnect.php"); @@ -35,18 +36,16 @@ $stmt = "SELECT use_non_latin FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and download_lists='1';"; if ($DB) {echo "|$stmt|\n";} @@ -55,7 +54,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { # Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); # Header("HTTP/1.0 401 Unauthorized"); @@ -122,6 +121,8 @@ while ($i < $leads_to_print) { $row=mysql_fetch_row($rslt); + $row[29] = preg_replace("/\n|\r/",'!N',$row[29]); + echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n"; $i++; diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial_it/listloader.pl index 052d93e0..72094d84 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_it/listloader.pl @@ -2,7 +2,7 @@ # # listloader.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -21,6 +21,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1425 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0537 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -598,6 +599,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -606,6 +615,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1028,6 +1045,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1094,6 +1177,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial_it/listloader_super.pl index 9b09bba7..93bfa20e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_it/listloader_super.pl @@ -2,7 +2,7 @@ # # listloader_super.pl version 2.2.0 # -# Copyright (C) 2009 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # # CHANGES @@ -20,6 +20,7 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 90721-1341 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0539 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # ### begin parsing run-time options ### @@ -600,6 +601,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -608,6 +617,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($NZL_DST) {$gmt_offset++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -1030,6 +1047,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ AUSTRALIA ONLY (country code 61) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $AUSE_DST=1; return 0; + } else { + $AUSE_DST=0; return 1; + } + } + } else { + $AUSE_DST=1; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1096,6 +1179,74 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND (country code 64) +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; return 0; + } else { + $NZLN_DST=0; return 1; + } + } + } else { + $NZLN_DST=1; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_it/new_listloader_superL.php index e19121fe..fe330845 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # AST GUI lead loader from formatted file # @@ -29,11 +29,12 @@ # 90522-0506 - Security fix # 90721-1339 - Added rank and owner as vicidial_list fields # 91112-0616 - Added title/alt-phone duplicate checking +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.2.0-33'; -$build = '91112-0616'; +$version = '2.2.0-34'; +$build = '100118-0543'; require("dbconnect.php"); @@ -2107,6 +2108,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Domenica in October to First Domenica in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Domenica in October and first Domenica in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Domenica October to Third Domenica March\n";} @@ -2174,6 +2243,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Domenica in September to First Domenica in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Domenica in September and first Domenica in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Domenica October to Last Domenica February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/non_agent_api.php b/agc_2-X/trunk/LANG_www/vicidial_it/non_agent_api.php index b64ab4c0..faecfc20 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/non_agent_api.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/non_agent_api.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # This script is designed as an API(Application Programming Interface) to allow # other programs to interact with all non-agent-screen VICIDIAL functions @@ -30,10 +30,11 @@ # 91026-1059 - Added AREACODE DNC option # 91203-1140 - Added agent_ingroup_info feature # 91216-0331 - Added duplication check features to add_lead function +# 100118-0543 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA) # -$version = '2.2.0-16'; -$build = '91216-0331'; +$version = '2.2.0-17'; +$build = '100118-0543'; require("dbconnect.php"); @@ -1255,7 +1256,7 @@ if ($function == 'add_lead') $duplicate_lists .= "'$row[0]',"; $L++; } - $duplicate_lists = eregi_replace(",$",'',$dup_lists); + $duplicate_lists = eregi_replace(",$",'',$duplicate_lists); } } } @@ -1287,7 +1288,7 @@ if ($function == 'add_lead') } if (eregi("DUPCAMP",$duplicate_check)) # duplicate check within campaign lists { - if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP\n";} + if ($DB>0) {echo "DEBUG: Checking for duplicates - DUPCAMP - $duplicate_lists\n";} $duplicate_found=0; $stmt="SELECT lead_id,list_id from vicidial_list where phone_number='$phone_number' and list_id IN($duplicate_lists) limit 1;"; $rslt=mysql_query($stmt, $link); @@ -2046,6 +2047,74 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) if ($AUST_DST) {$gmt_offset++;} $AC_processed++; } + +if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -2113,6 +2182,75 @@ if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) $AC_processed++; } +if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_it/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_it/user_stats.php index dcf5245d..e23daa53 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_it/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_it/user_stats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -20,6 +20,7 @@ # 90508-0644 - Changed to PHP long tags # 90524-2009 - Changed time display to use functions.php # 91130-2037 - Added user closer log manager flag display +# 100203-1008 - Added agent activity log section # header ("Content-type: text/html; charset=utf-8"); @@ -506,40 +507,150 @@ echo "
MOH ID


\n"; ##### vicidial agent inbound calls for this time period ##### echo "INBOUND/CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNA WAIT (S) LIST LEAD HANGUP REASON
\n"; +echo "\n"; - $stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; - $rslt=mysql_query($stmt, $link); - $logs_to_print = mysql_num_rows($rslt); +$stmt="select call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); - $u=0; - while ($logs_to_print > $u) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $u)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} +$u=0; +$TOTALinSECONDS=0; +$TOTALagentSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - $u++; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + $TOTALinSECONDS = ($TOTALinSECONDS + $row[1]); + $AGENTseconds = ($row[1] - $row[5]); + if ($AGENTseconds < 0) + {$AGENTseconds=0;} + $TOTALagentSECONDS = ($TOTALagentSECONDS + $AGENTseconds); + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; } +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNA WAIT (S) AGENT (S) LIST LEAD HANGUP REASON
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1] $row[17]
$u$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $AGENTseconds $row[6] $row[7] $row[8]
TOTALI $TOTALinSECONDS   $TOTALagentSECONDS  


\n"; + + +##### vicidial agent activity records for this time period ##### +echo "AGENT ACTIVITY FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="select event_time,lead_id,campaign_id,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,status,sub_status,user_group from vicidial_agent_log where user='" . mysql_real_escape_string($user) . "' and event_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' and ( (pause_sec > 0) or (wait_sec > 0) or (talk_sec > 0) or (dispo_sec > 0) ) order by event_time desc limit 10000;"; +$rslt=mysql_query($stmt, $link); +$logs_to_print = mysql_num_rows($rslt); + +$u=0; +$TOTALpauseSECONDS=0; +$TOTALwaitSECONDS=0; +$TOTALtalkSECONDS=0; +$TOTALdispoSECONDS=0; +$TOTALdeadSECONDS=0; +$TOTALcustomerSECONDS=0; +while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + $event_time = $row[0]; + $lead_id = $row[1]; + $campaign_id = $row[2]; + $pause_sec = $row[3]; + $wait_sec = $row[4]; + $talk_sec = $row[5]; + $dispo_sec = $row[6]; + $dead_sec = $row[7]; + $status = $row[8]; + $pause_code = $row[9]; + $user_group = $row[10]; + $customer_sec = ($talk_sec - $dead_sec); + if ($customer_sec < 0) + {$customer_sec=0;} + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $TOTALpauseSECONDS = ($TOTALpauseSECONDS + $pause_sec); + $TOTALwaitSECONDS = ($TOTALwaitSECONDS + $wait_sec); + $TOTALtalkSECONDS = ($TOTALtalkSECONDS + $talk_sec); + $TOTALdispoSECONDS = ($TOTALdispoSECONDS + $dispo_sec); + $TOTALdeadSECONDS = ($TOTALdeadSECONDS + $dead_sec); + $TOTALcustomerSECONDS = ($TOTALcustomerSECONDS + $customer_sec); + + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$TOTALpauseSECONDShh = sec_convert($TOTALpauseSECONDS,'H'); +$TOTALwaitSECONDShh = sec_convert($TOTALwaitSECONDS,'H'); +$TOTALtalkSECONDShh = sec_convert($TOTALtalkSECONDS,'H'); +$TOTALdispoSECONDShh = sec_convert($TOTALdispoSECONDS,'H'); +$TOTALdeadSECONDShh = sec_convert($TOTALdeadSECONDS,'H'); +$TOTALcustomerSECONDShh = sec_convert($TOTALcustomerSECONDS,'H'); + +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; echo "
  these fields are in seconds  
# DATE/TIME PAUSE WAIT TALK DISPO DEAD CUSTOMER STATUS LEAD CAMPAGNA PAUSE CODE
$u$event_time $pause_sec $wait_sec $talk_sec $dispo_sec $dead_sec $customer_sec $status $lead_id $campaign_id $pause_code
TOTALI $TOTALpauseSECONDS $TOTALwaitSECONDS $TOTALtalkSECONDS $TOTALdispoSECONDS $TOTALdeadSECONDS $TOTALcustomerSECONDS  
(in HH:MM:SS) $TOTALpauseSECONDShh $TOTALwaitSECONDShh $TOTALtalkSECONDShh $TOTALdispoSECONDShh $TOTALdeadSECONDShh $TOTALcustomerSECONDShh  


\n"; + ##### vicidial recordings for this time period ##### echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; diff --git a/agc_2-X/trunk/bin/build_translation_www_files.pl b/agc_2-X/trunk/bin/build_translation_www_files.pl index fb7d083d..9e9a079f 100644 --- a/agc_2-X/trunk/bin/build_translation_www_files.pl +++ b/agc_2-X/trunk/bin/build_translation_www_files.pl @@ -1,15 +1,16 @@ #!/usr/bin/perl # -# build_translation_www_files.pl version 2.0.5 +# build_translation_www_files.pl version 2.2.0 # # converts web pages to other language # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # changes: # 60808-1029 - Changed to use /etc/astguiclient.conf for configs # 70402-1305 - Added error log generation for not found phrases # 90317-0127 - Changed internationalization link for admin +# 100203-1331 - Added PATHweb override # ############################################ @@ -53,13 +54,6 @@ foreach(@conf) $i++; } -# -# path to home directory: (assumes it already exists) -$home = $PATHhome; - -# path to web root directory: (assumes it already exists) -$webroot = $PATHweb; - ############################################ $secX = time(); @@ -75,99 +69,114 @@ $admin_error_file = "language_admin_error.txt"; ### begin parsing run-time options ### if (length($ARGV[0])>1) -{ + { $i=0; while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } + { + $args = "$args $ARGV[$i]"; + $i++; + } if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[--admin-only] = only translate admin pages\n[--client-only] = only translate client pages\n[--without-en] = only translate non-english\n[--language=] = which language to build, 2 letter code, defaults to es-spanish\n\n"; + { + print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[--admin-only] = only translate admin pages\n[--client-only] = only translate client pages\n[--without-en] = only translate non-english\n[--language=] = which language to build, 2 letter code, defaults to es-spanish\n[--PATHweb=] = override to use this directory as source\n\n"; - exit; - } + exit; + } else - { + { if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } + { + $DB=1; # Debug flag + } if ($args =~ /--language/i) - { - $LANG=1; - print "\n----- LANGUAGE WEB SCRIPT ONLY BUILD -----\n\n"; - } + { + $LANG=1; + print "\n----- LANGUAGE WEB SCRIPT ONLY BUILD -----\n\n"; + } if ($args =~ /--language=/i) - { - @data_in = split(/--language=/,$args); - $CLIlanguage = $data_in[1]; - } + { + @data_in = split(/--language=/,$args); + @CLIlanguageX = split(/ /,$data_in[1]); + $CLIlanguage = $CLIlanguageX[0]; + } else {$CLIlanguage = 'es';} # default to build all languages + if ($args =~ /--PATHweb=/i) + { + @PATHwebA = split(/--PATHweb=/,$args); + @PATHwebB = split(/ /,$PATHwebA[1]); + $PATHweb = $PATHwebB[0]; + print "\n----- WEB PATH OVERRIDE: $PATHweb -----\n\n"; + } if ($args =~ /-admin-only/i) - { - $admin_only=1; # Admin flag - print "\n----- ADMIN PAGES ONLY BUILD -----\n\n"; - } + { + $admin_only=1; # Admin flag + print "\n----- ADMIN PAGES ONLY BUILD -----\n\n"; + } if ($args =~ /-client-only/i) - { - $client_only=1; # Client flag - print "\n----- CLIENT PAGES ONLY BUILD -----\n\n"; - } + { + $client_only=1; # Client flag + print "\n----- CLIENT PAGES ONLY BUILD -----\n\n"; + } if ($args =~ /-without-en/i) - { - print "\n----- NON-ENGLISH ONLY BUILD -----\n\n"; - $without_en=1; - } + { + print "\n----- NON-ENGLISH ONLY BUILD -----\n\n"; + $without_en=1; + } if ($args =~ /-t/i) - { - $TEST=1; - $T=1; + { + $TEST=1; + $T=1; + } } } -} else -{ -# print "no command line options set\n"; -} + { + # print "no command line options set\n"; + } ### end parsing run-time options ### +# +# path to home directory: (assumes it already exists) +$home = $PATHhome; + +# path to web root directory: (assumes it already exists) +$webroot = $PATHweb; + if ($LANG) -{ -if ( (!$admin_only) && (!$client_only) ) - {$admin_only=1; $client_only=1;} - -if ($admin_only==1) { - print "\n----- LANGUAGE BUILD: $CLIlanguage -----\n\n"; - $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$admin_error_file"; - $LANG_FILE_ADMIN = "./translations/$CLIlanguage$US$language_admin_file"; - open(lang, "$LANG_FILE_ADMIN") || die "can't open $LANG_FILE_ADMIN: $!\n"; - @lang = ; - close(lang); - &translate_pages; - } + if ( (!$admin_only) && (!$client_only) ) + {$admin_only=1; $client_only=1;} -@lang=@MT; -@LANGUAGES=@MT; -@FILES=@MT; -@TRANSLATIONS=@MT; -@TRANSLATIONS_RAW=@MT; + if ($admin_only==1) + { + print "\n----- LANGUAGE BUILD: $CLIlanguage -----\n\n"; + $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$admin_error_file"; + $LANG_FILE_ADMIN = "./translations/$CLIlanguage$US$language_admin_file"; + open(lang, "$LANG_FILE_ADMIN") || die "can't open $LANG_FILE_ADMIN: $!\n"; + @lang = ; + close(lang); + &translate_pages; + } -if ($client_only==1) - { - $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$error_file"; - $LANG_FILE = "./translations/$CLIlanguage$US$language_file"; - open(lang, "$LANG_FILE") || die "can't open $LANG_FILE: $!\n"; - @lang = ; - close(lang); - &translate_pages; + @lang=@MT; + @LANGUAGES=@MT; + @FILES=@MT; + @TRANSLATIONS=@MT; + @TRANSLATIONS_RAW=@MT; + + if ($client_only==1) + { + $LANG_FILE_ERROR = "$PATHlogs/$CLIlanguage$US$error_file"; + $LANG_FILE = "./translations/$CLIlanguage$US$language_file"; + open(lang, "$LANG_FILE") || die "can't open $LANG_FILE: $!\n"; + @lang = ; + close(lang); + &translate_pages; + } } -} $secy = time(); $secz = ($secy - $secX); $minz = ($secz/60); # calculate script runtime so far print "\n - process runtime ($secz sec) ($minz minutes)\n"; @@ -179,173 +188,150 @@ exit; sub translate_pages -{ -#***LANGUAGES*** -#en-English|es-Espaol| -#***FILES*** -#agc/astguiclient.php -#agc/vicidial.php -#***TRANSLATIONS*** -#English|Ingls| -#Spanish|Espaol| - -##### PARSE THE LANGUAGES SETTING FILE ##### -$section=''; -$i=0; -$Lct=0; $Fct=0; $Tct=0; -foreach(@lang) { - if ($lang[$i] !~ /^\#/) + #***LANGUAGES*** + #en-English|es-Espaol| + #***FILES*** + #agc/astguiclient.php + #agc/vicidial.php + #***TRANSLATIONS*** + #English|Ingls| + #Spanish|Espaol| + + ##### PARSE THE LANGUAGES SETTING FILE ##### + $section=''; + $i=0; + $Lct=0; $Fct=0; $Tct=0; + foreach(@lang) { - if ($lang[$i] =~ /^\*\*\*/) + if ($lang[$i] !~ /^\#/) { - $section = $lang[$i]; - $section =~ s/\*|\n|\r//gi; - # print "section heading: $section: $lang[$i]"; - } - else - { - if ($section =~ /LANGUAGES/) + if ($lang[$i] =~ /^\*\*\*/) { - $LANGUAGES = $lang[$i]; - $Lct++; + $section = $lang[$i]; + $section =~ s/\*|\n|\r//gi; + # print "section heading: $section: $lang[$i]"; } else { - if ($section =~ /FILES/) + if ($section =~ /LANGUAGES/) { - # print "section: $section line: $lang[$i]"; - $FILES[$Fct] = $lang[$i]; - $Fct++; + $LANGUAGES = $lang[$i]; + $Lct++; } else { - if ($section =~ /TRANSLATIONS/) + if ($section =~ /FILES/) { # print "section: $section line: $lang[$i]"; - @TRANSlineX = split(/\|/, $lang[$i]); - $ORIGtextX = "$TRANSlineX[0]"; - $lengthX = length($ORIGtextX); - $lengthX = sprintf("%04d",$lengthX); - $TRANSLATIONS_RAW[$Tct] = "$lengthX|$lang[$i]"; - $Tct++; + $FILES[$Fct] = $lang[$i]; + $Fct++; + } + else + { + if ($section =~ /TRANSLATIONS/) + { + # print "section: $section line: $lang[$i]"; + @TRANSlineX = split(/\|/, $lang[$i]); + $ORIGtextX = "$TRANSlineX[0]"; + $lengthX = length($ORIGtextX); + $lengthX = sprintf("%04d",$lengthX); + $TRANSLATIONS_RAW[$Tct] = "$lengthX|$lang[$i]"; + $Tct++; + } } } } } + $i++; } - $i++; - } -if ($DB) - { - print "LANGUAGE FILE PARSE RESULTS: $#lang lines in file\n"; - print "LANGUAGES: $LANGUAGES\n"; - print "FILES: $Fct\n"; - print "TRANSLATIONS: $Tct\n"; - } - -#@TRANSLATIONS = sort { length($b) <=> length($a) } @TRANSLATIONS_RAW; -@TRANSLATIONS = sort { $b <=> $a } @TRANSLATIONS_RAW; - -#$k=0; -#foreach(@TRANSLATIONS) -# { -# $length = length($TRANSLATIONS[$k]); -# print "$TRANSLATIONS[$k]|$length|\n"; -# $k++; -# } - -##### LOOP THROUGH THE LANGUAGES -@lang_list = split(/\|/, $LANGUAGES); -@lang_link_list = @lang_list; -$i=0; -$gif = '.gif'; -foreach(@lang_list) - { - if (length($lang_list[$i]) > 2) + if ($DB) { - @lang_detail = split(/-/, $lang_list[$i]); - $lang_abb = $lang_detail[0]; - $lang_name = $lang_detail[1]; + print "LANGUAGE FILE PARSE RESULTS: $#lang lines in file\n"; + print "LANGUAGES: $LANGUAGES\n"; + print "FILES: $Fct\n"; + print "TRANSLATIONS: $Tct\n"; + } - if ( ($without_en==1) && ($lang_abb =~ /en/) ) + #@TRANSLATIONS = sort { length($b) <=> length($a) } @TRANSLATIONS_RAW; + @TRANSLATIONS = sort { $b <=> $a } @TRANSLATIONS_RAW; + + #$k=0; + #foreach(@TRANSLATIONS) + # { + # $length = length($TRANSLATIONS[$k]); + # print "$TRANSLATIONS[$k]|$length|\n"; + # $k++; + # } + + ##### LOOP THROUGH THE LANGUAGES + @lang_list = split(/\|/, $LANGUAGES); + @lang_link_list = @lang_list; + $i=0; + $gif = '.gif'; + foreach(@lang_list) + { + if (length($lang_list[$i]) > 2) { - print "SKIPPING ENGLISH COPYING: $lang_abb|$i\n\n"; - } - else - { - ##### LOOP THROUGH THE FILES - $Fct=0; - foreach(@FILES) + @lang_detail = split(/-/, $lang_list[$i]); + $lang_abb = $lang_detail[0]; + $lang_name = $lang_detail[1]; + + if ( ($without_en==1) && ($lang_abb =~ /en/) ) { - $a=0; - @file_detail = split(/\|/, $FILES[$Fct]); - $file_path = $file_detail[0]; - $file_name = $file_detail[1]; - $file_name =~ s/\t|\r|\n//gi; - $file_passthru = $file_detail[2]; - $file_passthru =~ s/\t|\r|\n//gi; - if (-e "$webroot/$file_path/$file_name") + print "SKIPPING ENGLISH COPYING: $lang_abb|$i\n\n"; + } + else + { + ##### LOOP THROUGH THE FILES + $Fct=0; + foreach(@FILES) { - open(file, "$webroot/$file_path/$file_name") || die "can't open $webroot/$file_path/$file_name: $!\n"; - @file = @MT; - @file = ; - close(file); + $a=0; + @file_detail = split(/\|/, $FILES[$Fct]); + $file_path = $file_detail[0]; + $file_name = $file_detail[1]; + $file_name =~ s/\t|\r|\n//gi; + $file_passthru = $file_detail[2]; + $file_passthru =~ s/\t|\r|\n//gi; + if (-e "$webroot/$file_path/$file_name") + { + open(file, "$webroot/$file_path/$file_name") || die "can't open $webroot/$file_path/$file_name: $!\n"; + @file = @MT; + @file = ; + close(file); - print "File exists: ./$file_path/$file_name\n"; - if (-e "$webroot/$file_path$US$lang_abb") - { - print "Lang Directory exists: $webroot/$file_path$US$lang_abb\n"; - } - else - { - `mkdir $webroot/$file_path$US$lang_abb`; - `chmod 0777 $webroot/$file_path$US$lang_abb`; - print "Lang Directory created: $webroot/$file_path$US$lang_abb\n"; - } - - if ($file_passthru < 1) - { - ##### LOOP THROUGH THE TRANSLATIONS - $Tct=0; - foreach(@TRANSLATIONS) + print "File exists: ./$file_path/$file_name\n"; + if (-e "$webroot/$file_path$US$lang_abb") { - @TRANSline = split(/\|/, $TRANSLATIONS[$Tct]); - $ORIGtext = "$TRANSline[1]"; - $TRANStext = "$TRANSline[$i+1]"; - $LINESct=0; - foreach(@file) + print "Lang Directory exists: $webroot/$file_path$US$lang_abb\n"; + } + else + { + `mkdir $webroot/$file_path$US$lang_abb`; + `chmod 0777 $webroot/$file_path$US$lang_abb`; + print "Lang Directory created: $webroot/$file_path$US$lang_abb\n"; + } + + if ($file_passthru < 1) + { + ##### LOOP THROUGH THE TRANSLATIONS + $Tct=0; + foreach(@TRANSLATIONS) { - if ($file[$LINESct] !~ /^\#|^\s*function |'INCALL'|'PAUSED'|'READY'|'NEW'|xmlhttp|ILPV |ILPA |SELECT cmd_line_f|=\"SELECT|Header\(\"/) + @TRANSline = split(/\|/, $TRANSLATIONS[$Tct]); + $ORIGtext = "$TRANSline[1]"; + $TRANStext = "$TRANSline[$i+1]"; + $LINESct=0; + foreach(@file) { - $phrase_found_counter=0; - if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/) + if ($file[$LINESct] !~ /^\#|^\s*function |'INCALL'|'PAUSED'|'READY'|'NEW'|xmlhttp|ILPV |ILPA |SELECT cmd_line_f|=\"SELECT|Header\(\"/) { - $file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/ILPV/g; - $e=0; - $gif = '.gif'; - foreach(@lang_link_list) + $phrase_found_counter=0; + if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/) { - if (length($lang_link_list[$e]) > 2) - { - @lang_list_detail = split(/-/, $lang_link_list[$e]); - $lang_list_abb = $lang_list_detail[0]; - $lang_list_name = $lang_list_detail[1]; - if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';} - else {$list_bgcolor = '';} - if ($file_name =~ /admin/) {$link_file_name = 'admin.php';} - else {$link_file_name = $file_name;} - $file[$LINESct] .= "echo \"
$lang_list_name $lang_list_name $lang_list_name $lang_list_name